LifeAstroAPILifeAstroAPI

API Reference / Vedic Astrology / Panchang

GET
10 credits

/v1/panchang/nakshatra

Nakshatra + pada + lord at moment.

What this tells you

Nakshatras are the 27 lunar mansions of the sidereal zodiac, each 13°20' wide. Every nakshatra has a ruling planet, a deity and a temperament (gana). The Moon's nakshatra at birth (janma nakshatra) sets the Vimshottari dasha sequence, and the nakshatra of the day is a core input to muhurta. This endpoint returns the nakshatra the Moon occupies at local sunrise on `date`, its pada at that moment, and when the Moon leaves the nakshatra.

`end_jd` is a Julian Day in UT. `end_local` is local wall-clock time in the request `tz`, formatted "YYYY-MM-DD HH:MM:SS" with no offset. If the Sun does not rise on `date` (polar day or night) the API returns 422 `data_unavailable`.

Request

All requests require an Authorization header with your dv_live_* API key.

example request
curl "https://api.lifeastroapi.com/v1/panchang/nakshatra?date=2027-01-15&tz=Asia%2FKolkata&lat=28.6139&lon=77.209" \
  -H "Authorization: Bearer YOUR_API_KEY"

Query parameters

Checked against the API: a parameter is marked required when the request fails without it.

NameRequiredExampleDescription
dateyes2027-01-15Date (YYYY-MM-DD).
tzyesAsia/KolkataTimezone: IANA name (Asia/Kolkata) or UTC offset (+05:30).
latyes28.6139Latitude in decimal degrees.
lonyes77.209Longitude in decimal degrees.
ayanamsano—Ayanamsa (sidereal offset) to use. Defaults to lahiri.

Response (200 OK)

The real response to the example request above, generated from the API itself. Long arrays are trimmed to their first two items. Field names are stable across versions.

200 response
{
  "date": "2027-01-15",
  "location": {
    "lat": 28.6139,
    "lon": 77.209,
    "alt": 0
  },
  "tz": "Asia/Kolkata",
  "index": 26,
  "name": "Revati",
  "pada": 2,
  "ruling_planet": "Mercury",
  "deity": "Pushan",
  "gana": "Deva",
  "end_jd": 2461421.264565,
  "end_local": "2027-01-15 23:50:58"
}

Field reference

Every field in the response, with its type, a real example, and what it means.

FieldTypeMeaning
datestring
Echo of the `date` parameter (local date).
example: "2027-01-15"
locationobject
Echo of `lat`, `lon` and `alt` (metres, default 0).
example: { "lat": 28.6139, "lon": 77.209, "alt": 0 }
tzstring
Echo of the `tz` parameter. `end_local` is in this zone.
example: "Asia/Kolkata"
indexinteger (0–26)
Position of the nakshatra, counted from 0 (Ashwini = 0, Revati = 26).
example: 26
Jyotish: 27 nakshatras divide the sidereal zodiac into slices of 13°20'. The Moon's sidereal longitude at sunrise decides which one is returned.
namestring
Nakshatra name.
example: "Revati"
Jyotish: English names in order: Ashwini, Bharani, Krittika, Rohini, Mrigashira, Ardra, Punarvasu, Pushya, Ashlesha, Magha, Purva Phalguni, Uttara Phalguni, Hasta, Chitra, Swati, Vishakha, Anuradha, Jyeshtha, Mula, Purva Ashadha, Uttara Ashadha, Shravana, Dhanishta, Shatabhisha, Purva Bhadrapada, Uttara Bhadrapada, Revati.
padainteger (1–4)
Quarter of the nakshatra the Moon is in. Each pada spans 3°20'.
example: 2
Jyotish: Each pada corresponds to one navamsa (D9) sign.
ruling_planetstring
Vimshottari lord of the nakshatra.
example: "Mercury"
Jyotish: Lords repeat in the order Ketu, Venus, Sun, Moon, Mars, Rahu, Jupiter, Saturn, Mercury, starting from Ashwini. The lord of the birth nakshatra sets the first Vimshottari mahadasha.
deitystring
Presiding deity of the nakshatra.
example: "Pushan"
ganastring
Temperament: Deva, Manushya or Rakshasa. Used in Gana Koota matching.
example: "Deva"
end_jdnumber
When the Moon leaves this nakshatra, as a Julian Day in UT.
example: 2461421.264565
end_localstring (YYYY-MM-DD HH:MM:SS)
When the Moon leaves this nakshatra, in local time (request `tz`), with no offset suffix.
example: "2027-01-15 23:50:58"

Usage tips

How to use it

  • Sunrise value, not the current one
    The nakshatra is taken at sunrise on `date`. The `time` parameter does not change it. After `end_local`, the next nakshatra (index + 1, wrapping 26 → 0) is running. `pada` is the pada at sunrise only.
  • Choose the ayanamsa
    Nakshatra depends on the sidereal zodiac. Pass `ayanamsa` (lahiri by default; also raman, krishnamurti, fagan, yukteshwar, true_chitrapaksha) to match your users' tradition.
  • Gana is for matchmaking
    The `gana` field feeds Gana Koota in Ashtakoota matching. Pairs with the same gana score highest.
  • Localized names
    Pass `locale` (for example `hi`) to get `name`, `ruling_planet`, `deity` and `gana` in that language. Use `index` for logic, not the name.

Errors

Every error follows the same envelope. Use the error.code field (not the message) for conditional logic in your integration.

401 Unauthorized

{
  "error": {
    "code": "unauthorized",
    "message": "missing or invalid API key",
    "request_id": "req_01hqy7k8c3e7m1n"
  }
}

402 Payment Required

{
  "error": {
    "code": "trial_exhausted",
    "message": "your free trial credits are exhausted — pick a plan to continue",
    "top_up_url": "https://lifeastroapi.com/pricing",
    "request_id": "req_01hqy7k8c3e7m1n"
  }
}

429 Too Many Requests

{
  "error": {
    "code": "rate_limited",
    "message": "rate limit exceeded; retry after 12 seconds",
    "request_id": "req_01hqy7k8c3e7m1n"
  }
}

Try it

Get a dv_live_* key from your dashboard and paste into the cURL snippet above. New accounts get 1,500 free credits. Sign up.