LifeAstroAPILifeAstroAPI

API Reference / Vedic Astrology / Panchang

GET
20 credits

/v1/panchang/basic

All 5 panchang elements + sunrise/sunset/moonrise/moonset + transition end-times — single call replaces 7 atomic calls.

What this tells you

The `basic` endpoint bundles the five panchang elements — tithi, nakshatra, yoga, karana and vara — at local sunrise, together with sunrise, sunset, moonrise and moonset, in one call. Each element carries its end time, and the karana list adds the karana that follows the sunrise one, with its deity and a short note. For tithi deity and type, nakshatra gana, sun and moon signs, Hindu month, muhurta windows and Choghadiya, use /v1/panchang/advanced.

Request

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

example request
curl "https://api.lifeastroapi.com/v1/panchang/basic?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",
  "sunrise_jd": 2461420.572762,
  "sunrise_local": "2027-01-15 07:14:47",
  "sunset_jd": 2461421.011285,
  "sunset_local": "2027-01-15 17:46:15",
  "moonrise_jd": 2461420.740844,
  "moonrise_local": "2027-01-15 11:16:49",
  "moonset_jd": 2461421.295876,
  "moonset_local": "2027-01-16 00:36:04",
  "has_moonrise": true,
  "has_moonset": true,
  "tithi": {
    "index": 6,
    "name": "Saptami",
    "paksha": "Shukla",
    "tithi_in_paksha": 7,
    "end_jd": 2461420.863881,
    "end_local": "2027-01-15 14:13:59"
  },
  "nakshatra": {
    "index": 26,
    "name": "Revati",
    "pada": 2,
    "end_jd": 2461421.264565,
    "end_local": "2027-01-15 23:50:58"
  },
  "yoga": {
    "index": 19,
    "name": "Shiva",
    "end_jd": 2461420.949764,
    "end_local": "2027-01-15 16:17:40"
  },
  "karana": [
    {
      "index": 13,
      "name": "Vanija",
      "deity": "Lakshmi",
      "special": "Good for trade and commerce",
      "end_jd": 2461420.863881,
      "end_local": "2027-01-15 14:13:59"
    },
    {
      "index": 14,
      "name": "Vishti",
      "deity": "Yama",
      "special": "Very inauspicious; avoid all important works",
      "end_jd": 2461421.357302,
      "end_local": "2027-01-16 02:04:31"
    }
  ],
  "vara": {
    "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 (YYYY-MM-DD)
The requested date. All elements are taken at local sunrise of this date.
example: "2027-01-15"
location, tzobject, string
Echo of the location (alt in metres) and timezone you sent. All *_local times are in this zone.
example: { "lat": 28.6139, "lon": 77.209, "alt": 0 }, "Asia/Kolkata"
sunrise_jd / sunset_jdnumber
Sunrise and sunset as Julian Day in UT.
example: 2461420.572762
sunrise_local / sunset_localstring (YYYY-MM-DD HH:MM:SS)
Local sunrise and sunset.
example: "2027-01-15 07:14:47"
moonrise_jd / moonrise_localnumber / string
First moonrise at or after local midnight of `date`. Left out when has_moonrise is false.
example: 2461420.740844 / "2027-01-15 11:16:49"
moonset_jd / moonset_localnumber / string
First moonset at or after local midnight of `date`. When the Moon does not set on `date` this is on the next date, as here. Left out when has_moonset is false.
example: 2461421.295876 / "2027-01-16 00:36:04"
has_moonrise / has_moonsetboolean
false when no moonrise or moonset was found (possible at high latitudes).
example: true
tithi.indexinteger (0–29)
Tithi at sunrise: 0 = Shukla Pratipada … 14 = Purnima, 15 = Krishna Pratipada … 29 = Amavasya.
example: 6
tithi.name / tithi.pakshastring
Tithi name and paksha (Shukla or Krishna). Translated when you pass `locale`.
example: "Saptami" / "Shukla"
tithi.tithi_in_pakshainteger (1–15)
Number of the tithi within its paksha.
example: 7
tithi.end_jd / tithi.end_localnumber / string
When the sunrise tithi ends — so you can show "Saptami until 14:13" straight from this endpoint.
example: 2461420.863881 / "2027-01-15 14:13:59"
nakshatra.index / name / padainteger (0–26) / string / integer (1–4)
Moon's nakshatra and pada at sunrise. 0 = Ashwini … 26 = Revati.
example: 26 / "Revati" / 2
nakshatra.end_jd / nakshatra.end_localnumber / string
When the sunrise nakshatra ends.
example: 2461421.264565 / "2027-01-15 23:50:58"
yoga.index / yoga.nameinteger (0–26) / string
Yoga at sunrise. 0 = Vishkumbha … 26 = Vaidhriti.
example: 19 / "Shiva"
yoga.end_jd / yoga.end_localnumber / string
When the sunrise yoga ends.
example: 2461420.949764 / "2027-01-15 16:17:40"
karanaarray (1–2 items)
The karana running at sunrise, then the karana that follows it.
example: [{ "index": 13, "name": "Vanija", … }, { "index": 14, "name": "Vishti", … }]
Jyotish: A karana is half a tithi. Classical texts assign a deity and a quality to each of the 11 karana types.
karana[].indexinteger (0–59)
Position of the half-tithi in the lunar month: 0 = Kimstughna, 1–56 = the 7 movable karanas repeating (Bava, Balava, Kaulava, Taitila, Garaja, Vanija, Vishti), 57 = Shakuni, 58 = Chatushpada, 59 = Naga.
example: 13
karana[].name / deitystring
Karana name and its presiding deity. Translated when you pass `locale`.
example: "Vanija" / "Lakshmi"
karana[].specialstring
Short English note on what the karana is good or bad for.
example: "Good for trade and commerce"
karana[].end_jd / end_localnumber / string
When this karana ends.
example: 2461420.863881 / "2027-01-15 14:13:59"
vara.weekday / vara.weekday_indexstring / integer (0–6)
Weekday at sunrise. 0 = Sunday … 6 = Saturday.
example: "Friday" / 5
vara.lordstring
Ruling planet of the weekday.
example: "Venus"
vara.hindi_namestring
Hindi name of the weekday, always in Devanagari.
example: "शुक्रवार"

Usage tips

How to use it

  • One call for the daily panchang
    Elements, rise and set times and end times come back together, so a daily panchang screen needs a single request.
  • Show transition times
    Use `tithi.end_local` and `nakshatra.end_local` to display "Saptami until 14:13, Revati until 23:50".
  • Moon times can fall on the next date
    Moonrise and moonset are the first ones after local midnight. On days when the Moon does not rise or set before midnight, the value carries the next date (in the example, moonset is 2027-01-16 00:36). Read the date part, not just the time.
  • Cache per day per location
    Cache for 24 hours keyed by (date, lat-rounded, lon-rounded). Values anchor to sunrise of `date`; the `time` parameter does not change them.

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.