LifeAstroAPILifeAstroAPI

API Reference / Vedic Astrology / Panchang

GET
10 credits

/v1/panchang/panchaka

Panchaka type (5-fold inauspicious).

What this tells you

This endpoint uses the formula form of Panchaka ("the five-fold"). The tithi, weekday and nakshatra numbers at local sunrise of `date` are added, and the remainder after dividing by 9 picks the type. Five of the nine remainders are adverse (Roga, Agni, Raja and two Mrityu slots); the other four mean no Panchaka. Each type has its own area of caution. The rising sign is not part of this calculation. This is not the nakshatra Panchak (Moon in Dhanishta to Revati); for that, use /v1/muhurta/panchaka-rahita.

Request

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

example request
curl "https://api.lifeastroapi.com/v1/panchang/panchaka?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",
  "is_panchaka": true,
  "type": "Agni",
  "formula_mod": 1,
  "components": {
    "tithi_number": 7,
    "vara_number": 6,
    "nakshatra_number": 27
  },
  "avoidance": "construction,electrical_work,fire_rituals"
}

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.
example: "2027-01-15"
locationobject
Echo of lat, lon and alt (metres).
example: { "lat": 28.6139, "lon": 77.209, "alt": 0 }
tzstring
Echo of the tz you sent.
example: "Asia/Kolkata"
is_panchakaboolean
Whether a Panchaka type is in effect for the day.
example: true
typestring
One of Roga, Agni, Mrityu, Raja. Empty string "" when is_panchaka is false. Translated when you pass `locale`.
example: "Agni"
formula_modinteger (0–8)
((tithi_number − 1) + (vara_number − 1) + (nakshatra_number − 1)) mod 9.
example: 1
Jyotish: 0 = Roga, 1 = Agni, 3 = Mrityu, 5 = Raja, 8 = Mrityu. 2, 4, 6 and 7 mean no Panchaka.
components.tithi_numberinteger (1–30)
Tithi at local sunrise: 1 = Shukla Pratipada … 15 = Purnima, 16 = Krishna Pratipada … 30 = Amavasya.
example: 7
components.vara_numberinteger (1–7)
Weekday at local sunrise: 1 = Sunday … 7 = Saturday.
example: 6
components.nakshatra_numberinteger (1–27)
Nakshatra at local sunrise: 1 = Ashwini … 27 = Revati.
example: 27
avoidancestring (comma-separated)
Activity codes to avoid. Empty string when is_panchaka is false.
example: "construction,electrical_work,fire_rituals"
Jyotish: Roga: surgery,travel,new_medicines. Agni: construction,electrical_work,fire_rituals. Mrityu: new_beginnings,griha_pravesh,marriage. Raja: financial_transactions,legal_matters,asset_purchase.

Usage tips

How to use it

  • Avoid for specific activities only
    Unlike Rahu Kaal, which is avoided for everything, Panchaka is avoided only for the activities in `avoidance`. Split the string on commas to get the codes and map them to your own labels.
  • One value per day
    The result is fixed by the elements at sunrise; the `time` parameter does not change it. Cache it per (date, lat, lon).

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.