Ascendant
POST https://starsapi.com/api/v3/vedic/natal/ascendant
Returns the sidereal Ascendant (Lagna) for a given birth — the rising sign at the exact moment and location of birth. The Ascendant is the most personal point in a Vedic horoscope: it determines the house framework, sets the Dasha starting point, and shapes the native’s physical constitution and outlook.
The response includes the sign (with Hindi name, lord, element, and quality), ecliptic longitude, degree within the sign, nakshatra, nakshatra lord, and pada — everything needed to anchor a chart or power a horoscope UI.
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. The core
fields are required — the ascendant depends on the precise time and
place of birth, so an approximate value in any field shifts the rising sign.
| Field | Type | Required | Description |
|---|---|---|---|
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. Improves precision — the Ascendant moves ∼1° every 4 minutes. |
latitude | number | Yes | Signed decimal degrees, −90…90. Positive = North (e.g. 28.6139). |
longitude | number | Yes | Signed decimal degrees, −180…180. Positive = East (e.g. 77.2090). |
timezone | string | Yes | IANA timezone identifier (e.g. Asia/Kolkata, America/New_York). DST is resolved automatically. |
name | string | No | Native’s name. Not returned by this endpoint; use /vedic/birth-details to retrieve it. |
place | string | No | Birth place label. Not returned by this endpoint; use /vedic/birth-details to retrieve it. |
ayanamsa | string | No | Sidereal mode. Default lahiri. Popular: lahiri, raman, kp, kp_new, kp_senthil, fagan_bradley, yukteshwar. Full list of 45+ ayanamsas → |
timezone of the birth place — the backend converts to
UTC internally. Do not pre-convert to UTC yourself.
Response shape
A successful response carries a top-level status + success
flag, a data.ascendant object, and a meta envelope with
request metadata. Birth input (name, date, time, gender, location) is
not echoed back — call
/vedic/birth-details
separately to retrieve resolved birth details.
| Field | Type | Description |
|---|---|---|
status | integer | HTTP status code echo (200 on success). |
success | boolean | Always true on success. |
| data.ascendant | ||
sign | string | Rising sign in English (e.g. Virgo). |
sign_hindi | string | Hindi / Sanskrit name (e.g. Kanya). |
sign_number | integer | Sign number, 1 = Aries … 12 = Pisces. |
sign_lord | string | Ruling planet of the rising sign — the chart lord. |
element | string | Element (tattva): Fire, Earth, Air, or Water. |
quality | string | Modality: Movable (Cardinal), Fixed, or Dual (Mutable). |
longitude | number | Absolute sidereal ecliptic longitude in decimal degrees (0–360). |
longitude_dms | string | Same longitude in D°M′S″ format. |
degree_in_sign | number | Degree within the sign (0–30). |
degree_in_sign_dms | string | Same in D°M′S″ format. |
nakshatra | string | Lunar mansion the Ascendant falls in. |
nakshatra_lord | string | Vimshottari lord of the nakshatra. |
nakshatra_pada | integer | Quarter within the nakshatra (1–4). |
| meta | ||
meta.endpoint | string | Echo of the called endpoint path. |
meta.version | string | API version (currently 3.0). |
meta.response_time_ms | integer | Server-side response time in milliseconds. |
meta.timestamp | string (ISO 8601) | Time the response was served. |
meta.credits_remaining | integer | API credits remaining on your plan. |
meta.request_id | string | Unique request identifier — include in support tickets. |
meta.ayanamsa.name | string | Name of the sidereal mode applied (e.g. Lahiri). |
meta.ayanamsa.value | number | Ayanamsa offset in decimal degrees. |
meta.ayanamsa.value_dms | string | Same in D°M′S″ format. |
Use cases
- Chart casting — the ascendant fixes house 1; pair it with the planetary-positions endpoint to assemble a full Lagna chart.
- Onboarding — surface a user’s rising sign and chart lord the moment they enter birth details, before computing anything heavier.
- Personality summaries — combine
sign,sign_lord, andnakshatrafor a rising-sign profile card. - Localized UI — the dual English / Hindi fields let you render the same response in either language without a second call.
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. |
| 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_TIMEZONE",
"message": "Unrecognised timezone: 'Asia/Calcutta_'. Use a valid IANA identifier such as 'Asia/Kolkata'."
}
}
See also
- Vedic Astrology overview — full category index
- Authentication — keys, headers, origin whitelisting
- Errors reference — universal error codes