Varga
POST https://starsapi.com/api/v3/vedic/charts/varga
Returns signed chart image URLs (North Indian and South Indian
styles) for any of the 16 Parashari divisional charts — D1 through D60.
Each call returns one chart for 1 credit. The images can be embedded directly
in an <img> tag or downloaded — no additional
authentication is needed to fetch them.
For planet position data (for tables and analysis), use
/charts/varga-planets
instead. Both endpoints accept the same chart parameter.
Authentication
Required. Three methods accepted:
| Method | Example |
|---|---|
| Header (recommended) | X-Api-Key: am_live_xxxxxxxxxxxx |
| Bearer | Authorization: Bearer am_live_xxxxxxxxxxxx |
| Query | ?api_key=am_live_xxxxxxxxxxxx |
See authentication for security considerations.
Request body
Send a JSON object with Content-Type: application/json. All core
fields are required. The chart parameter selects the divisional chart.
| Field | Type | Required | Description |
|---|---|---|---|
chart | string | No | Divisional chart code or Sanskrit name. Default D1. See supported charts below. |
year | integer | Yes | Birth year, 4-digit (e.g. 1990). |
month | integer | Yes | Birth month, 1–12. |
day | integer | Yes | Day of month, 1–31. |
hour | integer | Yes | Hour in 24-hour local clock time, 0–23. |
minute | integer | Yes | Minute, 0–59. |
second | integer | No | Second, 0–59. Default 0. |
latitude | number | Yes | Signed decimal degrees, −90…90. Positive = North. |
longitude | number | Yes | Signed decimal degrees, −180…180. Positive = East. |
timezone | string | Yes | IANA timezone identifier (e.g. Asia/Kolkata). |
ayanamsa | string | No | Default lahiri. Full list → |
node_type | string | No | mean (default) or true. |
Supported charts
Pass any D-code or Sanskrit name (case-insensitive). Common spelling variants are accepted.
| Code | Name | Significance |
|---|---|---|
D1 | Rashi | Birth chart — overall life, physical body |
D2 | Hora | Wealth and financial prosperity |
D3 | Drekkana | Siblings, courage, and co-borns |
D4 | Chaturthamsa | Fortune, property, and fixed assets |
D7 | Saptamsa | Children and progeny |
D9 | Navamsa | Marriage, spouse, and dharma |
D10 | Dasamsa | Career and profession |
D12 | Dwadasamsa | Parents and ancestry |
D16 | Shodasamsa | Vehicles, comforts, and happiness |
D20 | Vimsamsa | Spiritual progress and worship |
D24 | Siddhamsa | Education, learning, and knowledge |
D27 | Saptavimshamsa | Strength and weakness |
D30 | Trimsamsa | Misfortunes and evils |
D40 | Khavedamsa | Auspicious and inauspicious effects |
D45 | Akshavedamsa | General indications |
D60 | Shashtiamsa | Past life karma and all matters |
Response shape
A single data.chart object with chart metadata, minimal ascendant
info, and two signed image URLs.
| Field | Type | Description |
|---|---|---|
| data.chart | ||
code | string | Chart code (e.g. D9). |
name | string | Sanskrit chart name (e.g. Navamsa). |
significance | string | What this chart governs. |
| data.chart.ascendant | ||
sign | string | Ascendant sign in this chart. |
sign_lord | string | Ruling planet. |
| data.chart.images | ||
north | string (URL) | Signed URL for the North Indian style chart image. |
south | string (URL) | Signed URL for the South Indian style chart image. |
expires timestamp and a token. The image
can be fetched directly (no API key needed) but will return 403 after expiry. Generate
fresh URLs by calling this endpoint again.
Use cases
- Kundli apps — render D1, D9, D10 charts side by side with one call per chart.
- PDF reports — download the chart images and embed them in generated kundli reports.
- Chat/messaging — send chart image URLs directly in WhatsApp, Telegram, or in-app chat.
- North vs South preference — both styles are always returned — let users choose their regional format.
Errors
| HTTP | Code | Cause |
|---|---|---|
| 400 | MISSING_FIELD | A required birth field is absent. |
| 400 | INVALID_DATE | Invalid calendar date. |
| 400 | INVALID_TIME | Hour/minute/second out of range. |
| 400 | INVALID_TIMEZONE | Numeric or non-IANA timezone. |
| 400 | INVALID_COORDINATE | latitude / longitude out of range. |
| 400 | INVALID_CHART | Unrecognised chart code or name. |
| 401 | AUTH_MISSING_KEY | No API key in request. |
| 401 | AUTH_INVALID_KEY | Key format invalid or not found. |
| 401 | AUTH_REVOKED_KEY | Key has been revoked. |
| 403 | AUTH_ORIGIN_DENIED | Request from non-whitelisted origin. |
| 405 | METHOD_NOT_ALLOWED | Non-POST request. |
| 429 | RATE_LIMIT_EXCEEDED | Plan quota exceeded. |
| 500 | CALCULATION_ERROR | Ephemeris calculation failed. |
Error response format
{
"success": false,
"error": {
"code": "INVALID_CHART",
"message": "Unknown chart. Accepted: D1-D60 or Sanskrit names (rasi, hora, navamsa, dashamsa, etc.)"
}
}
See also
- Divisional Planets — planet position data for tables and analysis
- Chart Image (Natal) — D1 image shortcut from the natal namespace
- Vedic Astrology overview — full category index