LifeAstroAPILifeAstroAPI

Quickstart

Make your first LifeAstroAPI call in under 5 minutes.

1. Sign up and get a key

Create a free account. The free tier gives you 1,500 credits every month (up to 500 a day), no card required. After signup, open Dashboard → API Keys and copy your key. It starts with dv_live_. The examples below use YOUR_API_KEY where your key goes.

Security: treat dv_live_* keys like passwords. Store in environment variables or a secret manager. Never commit to source control. Never embed in mobile or web bundles.

2. Make your first call

Fetch the tithi for a date and place, in the language of your choice:

GET /v1/panchang/tithi
curl "https://api.lifeastroapi.com/v1/panchang/tithi?date=2026-04-19&tz=Asia/Kolkata&lat=28.61&lon=77.21" \
-H "Authorization: Bearer YOUR_API_KEY"

You should see a response like:

{
"date": "2026-04-19",
"location": { "lat": 28.61, "lon": 77.21, "alt": 0 },
"tz": "Asia/Kolkata",
"index": 1,
"name": "Dwitiya",
"paksha": "Shukla",
"tithi_in_paksha": 2,
"deity": "Brahma",
"type": "Bhadra",
"end_jd": 2461149.722061077,
"end_local": "2026-04-19 10:49:46"
}

The tithi is the one current at local sunrise, and end_local is when it ends. Daily panchang values like this are computed from sunrise, so the endpoint needs no time.

Check that it worked: a successful call returns HTTP 200. It used 10 credits, and the X-Credits-Remaining response header shows your new balance. Each endpoint's credit cost is listed in the API reference. If you get 401, the key is missing or wrong; 402 means you are out of credits; 429 means you hit the rate limit, so wait for Retry-After seconds. Every error code is explained in Errors.

3. Shared query parameters

Endpoints that calculate for a specific moment use these civil-time parameters. Daily panchang endpoints (tithi, nakshatra, Rahu Kaal and similar) work from local sunrise, so they read date, tz, lat and lon and ignore time. Each endpoint's reference page lists exactly which parameters it reads and which are required.

ParameterExampleNotes
date2026-04-19ISO 8601 date (YYYY-MM-DD)
time06:3024-hour HH:MM local time
tzAsia/KolkataIANA zone name (recommended) or a fixed offset like +05:30 — when using an offset, URL-encode the + as %2B (tz=%2B05:30)

Location (for location-sensitive endpoints such as panchang, sunrise, lagna):

ParameterExampleNotes
lat28.61Decimal degrees, north positive
lon77.21Decimal degrees, east positive

Don't know the coordinates? Call GET /v1/geo/search?q=Mumbai — it returns latitude, longitude and the IANA timezone for 5 million+ places.

Birth-chart endpoints (kundli, dasha, varshaphal) use the same parameters for the birth moment. Match-making endpoints prefix the birth details with boy. / girl. (boy.date, boy.time, boy.tz, girl.date …). Endpoints that compare a birth chart with another moment (tarabala, Sade Sati, transit vedha) take the chart as birth.date, birth.time, birth.tz and the moment as date, time, tz.

4. Response headers worth reading

HeaderMeaning
X-Credits-RemainingCredits left on your account after this call
X-RateLimit-Limit / X-RateLimit-Remaining / X-RateLimit-ResetPer-minute rate limit for your plan
X-CacheHIT when served from the response cache (no extra compute)
X-Request-IDQuote this when contacting support

5. Next steps