Nakshatra
POST https://starsapi.com/api/v3/vedic/natal/nakshatra
Returns the birth nakshatra (Janma Nakshatra) — the lunar mansion occupied by the Moon at the moment of birth. The nakshatra is one of the most important factors in Vedic astrology: it determines the Vimshottari dasha lord, the namakshar (name syllable), and shapes the native’s core temperament.
The response includes the nakshatra name, number, pada, Vimshottari lord, presiding
deity, symbol, element (tatva), type, direction, and the Moon’s exact sidereal
longitude. For the full avakhada breakdown (varna, gana, yoni, nadi, paya), call
/natal/avakhada.
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.
| 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. |
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). DST is resolved automatically. |
name | string | No | Native’s name. Use /vedic/birth-details to retrieve it. |
place | string | No | Birth place label. Use /vedic/birth-details to retrieve it. |
ayanamsa | string | No | Sidereal mode. Default lahiri. Full list of 45+ ayanamsas → |
Response shape
A single data.nakshatra object. Birth input is not
echoed back — call
/vedic/birth-details
separately.
| Field | Type | Description |
|---|---|---|
name | string | Nakshatra name (e.g. Uttara Bhadrapada). |
number | integer | Nakshatra number, 1 = Ashwini … 27 = Revati. |
nakshatra_lord | string | Vimshottari dasha lord. |
nakshatra_pada | integer | Pada (quarter), 1–4. |
deity | string | Presiding deity of the nakshatra. |
symbol | string | Traditional symbol. |
tatva | string | Element: Fire, Earth, Air, Water, or Ether. |
type | string | Nakshatra type: Fixed, Movable, Soft, Sharp, etc. |
direction | string | Associated direction (e.g. West). |
moon_longitude | number | Moon’s absolute sidereal longitude (0–360). |
moon_longitude_dms | string | Same in D°M′S″ format. |
Use cases
- Nakshatra profile cards — display deity, symbol, element, and type for a rich nakshatra overview.
- Dasha starting point — the
nakshatra_lorddetermines the Mahadasha at birth. - Direction-based advice — the
directionfield supports traditional muhurta and travel recommendations. - Onboarding — surface the user’s birth nakshatra the moment they enter their details.
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
- Avakhada — namakshar, paya, and classificatory attributes
- Moon Sign — Moon’s sidereal sign with element and quality
- Vedic Astrology overview — full category index