LifeAstroAPILifeAstroAPI

API Reference / Vedic Astrology / Panchang

GET
10 credits

/v1/panchang/vara

Vedic weekday (vara) with lord.

What this tells you

Vara is the weekday, one of the five limbs of the panchang. In the Vedic reckoning the day runs from sunrise to the next sunrise, not from midnight to midnight. Each vara is ruled by a planet, and that planet rules the first hora of the day. This endpoint returns the weekday of the sunrise on `date` in the request `tz`. That is the same as the civil weekday of `date`.

The weekday is computed from sunrise, so `lat` and `lon` are required. 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/vara?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.

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",
  "weekday": "Friday",
  "weekday_index": 5,
  "lord": "Venus",
  "hindi_name": "शुक्रवार"
}

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.
example: "Asia/Kolkata"
weekdaystring
Weekday name. Translated when `locale` is set.
example: "Friday"
weekday_indexinteger (0–6)
0 = Sunday, 1 = Monday, …, 6 = Saturday.
example: 5
lordstring
Planetary lord of the weekday: Sun, Moon, Mars, Mercury, Jupiter, Venus or Saturn (Sunday to Saturday).
example: "Venus"
Jyotish: The vara lord rules the first hora after sunrise.
hindi_namestring
Hindi (Devanagari) weekday name. Always Hindi, whatever the `locale`.
example: "शुक्रवार"

Usage tips

How to use it

  • Before sunrise, use the previous date
    The API does not look at `time`. Between midnight and sunrise the running vara is still the previous day's, so pass the previous `date` in that window. Get the sunrise time from /v1/panchang/sunrise-sunset.
  • Horas come ready-made
    The vara lord rules the first hora after sunrise. /v1/panchang/hora returns all 24 horas of the day, so you rarely need to compute them yourself.
  • Use the index for logic
    With `locale` set, `weekday` and `lord` are translated. Branch on `weekday_index`, not on 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.