POST · VEDIC

Nakshatra

Endpoint 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:

MethodExample
Header (recommended)X-Api-Key: am_live_xxxxxxxxxxxx
BearerAuthorization: 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.

FieldTypeRequiredDescription
yearintegerYesBirth year, 4-digit (e.g. 1990).
monthintegerYesBirth month, 112.
dayintegerYesDay of month, 131.
hourintegerYesHour in 24-hour local clock time, 023.
minuteintegerYesMinute, 059.
secondintegerNoSecond, 059. Default 0.
latitudenumberYesSigned decimal degrees, −90…90. Positive = North (e.g. 28.6139).
longitudenumberYesSigned decimal degrees, −180…180. Positive = East (e.g. 77.2090).
timezonestringYesIANA timezone identifier (e.g. Asia/Kolkata). DST is resolved automatically.
namestringNoNative’s name. Use /vedic/birth-details to retrieve it.
placestringNoBirth place label. Use /vedic/birth-details to retrieve it.
ayanamsastringNoSidereal 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.

FieldTypeDescription
namestringNakshatra name (e.g. Uttara Bhadrapada).
numberintegerNakshatra number, 1 = Ashwini … 27 = Revati.
nakshatra_lordstringVimshottari dasha lord.
nakshatra_padaintegerPada (quarter), 14.
deitystringPresiding deity of the nakshatra.
symbolstringTraditional symbol.
tatvastringElement: Fire, Earth, Air, Water, or Ether.
typestringNakshatra type: Fixed, Movable, Soft, Sharp, etc.
directionstringAssociated direction (e.g. West).
moon_longitudenumberMoon’s absolute sidereal longitude (0–360).
moon_longitude_dmsstringSame 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_lord determines the Mahadasha at birth.
  • Direction-based advice — the direction field supports traditional muhurta and travel recommendations.
  • Onboarding — surface the user’s birth nakshatra the moment they enter their details.

Errors

HTTPCodeCause
400MISSING_FIELDA required birth field is absent.
400INVALID_DATEInvalid calendar date.
400INVALID_TIMEHour/minute/second out of range.
400INVALID_TIMEZONENumeric or non-IANA timezone.
400INVALID_COORDINATElatitude / longitude out of range.
401AUTH_MISSING_KEYNo API key in request.
401AUTH_INVALID_KEYKey format invalid or not found.
401AUTH_REVOKED_KEYKey has been revoked.
403AUTH_ORIGIN_DENIEDRequest from non-whitelisted origin.
405METHOD_NOT_ALLOWEDNon-POST request.
429RATE_LIMIT_EXCEEDEDPlan quota exceeded.
500CALCULATION_ERROREphemeris 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