LifeAstroAPILifeAstroAPI

API Reference / Vedic Astrology / Panchang

GET
10 credits

/v1/panchang/karana

Karana (half-tithi).

What this tells you

Karana is half a tithi: every 6° of Moon–Sun separation is one karana, so a lunar month has 60 karana slots. Seven movable karanas repeat eight times through the month, and four fixed karanas fall around Amavasya. Karanas are used in muhurta, mostly to avoid Vishti (Bhadra). This endpoint returns the karana running at local sunrise on `date` and the one after it, each with its end time.

`end_jd` values are Julian Days in UT. `end_local` values are local wall-clock time in the request `tz`, formatted "YYYY-MM-DD HH:MM:SS" with no offset. The `time` parameter does not change the result. 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/karana?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",
  "slots": [
    {
      "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"
    }
  ]
}

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` values are in this zone.
example: "Asia/Kolkata"
slotsarray
The karana running at sunrise on `date` (first item), then the karana that follows it (second item).
example: [{ "index": 48, "name": "Vanija", … }, { "index": 49, "name": "Vishti", … }]
slots[].indexinteger (0–59)
Karana slot in the lunar month: floor((Moon − Sun) / 6°). 0 = Kimstughna, 1–56 = the 7 movable karanas repeating, 57 = Shakuni, 58 = Chatushpada, 59 = Naga.
example: 13
Jyotish: Each tithi holds two karanas: tithi index × 2 is its first karana slot and tithi index × 2 + 1 its second.
slots[].namestring
Karana name.
example: "Vanija"
Jyotish: Movable: Bava, Balava, Kaulava, Taitila, Garaja, Vanija, Vishti. Fixed: Shakuni, Chatushpada, Naga, Kimstughna. Vishti (also called Bhadra) is avoided for new work.
slots[].deitystring
Presiding deity of the karana.
example: "Lakshmi"
slots[].specialstring
Classical note on what the karana suits or should be avoided for. Always in English, even when `locale` is set.
example: "Good for trade and commerce"
slots[].end_jdnumber
When this karana ends, as a Julian Day in UT.
example: 2461420.863881
slots[].end_localstring (YYYY-MM-DD HH:MM:SS)
When this karana ends, in local time (request `tz`), with no offset suffix.
example: "2027-01-15 14:13:59"

Usage tips

How to use it

  • Vishti = warning badge
    When a slot is Vishti, show a warning in muhurta and scheduling screens. The API names it "Vishti", never "Bhadra". If you pass `locale`, check `index` instead of the name: Vishti slots are 7, 14, 21, 28, 35, 42, 49 and 56.
  • Only two karanas are returned
    The response holds the sunrise karana and the next one. A third karana can begin before the next sunrise; it is not included. It starts at the second slot's `end_local`.
  • Fixed karanas are rare
    The four fixed karanas only run from the second half of Krishna Chaturdashi to the first half of Shukla Pratipada. On most days both slots are movable karanas.

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.