LifeAstroAPILifeAstroAPI

API Reference / Vedic Astrology / Panchang

GET
10 credits

/v1/panchang/rahu-kaal

Rahu Kaal interval for the day.

What this tells you

Rahu Kaal is a daily window considered inauspicious for starting new work, journeys or agreements. The API divides the daylight span (sunrise to sunset on `date`) into 8 equal parts and returns one of them, chosen by weekday: Sunday 8th, Monday 2nd, Tuesday 7th, Wednesday 5th, Thursday 6th, Friday 4th, Saturday 3rd. It lasts one eighth of the daylight span, about 1.5 hours, longer in summer and shorter in winter. In this example (a Friday) Rahu Kaal is the 4th part of the day, 11:11 to 12:30. On Sundays it is the last part and ends exactly at sunset.

`*_jd` values are Julian Days in UT. `*_local` strings are local wall-clock time in the request `tz`, formatted "YYYY-MM-DD HH:MM:SS" with no offset. If the Sun does not rise or set 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/rahu-kaal?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",
  "window": {
    "start_jd": 2461420.737208,
    "end_jd": 2461420.792024,
    "start_local": "2027-01-15 11:11:35",
    "end_local": "2027-01-15 12:30: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. The `*_local` times are in this zone.
example: "Asia/Kolkata"
window.start_jdnumber
Start of Rahu Kaal, as a Julian Day in UT.
example: 2461420.737208
window.end_jdnumber
End of Rahu Kaal, as a Julian Day in UT.
example: 2461420.792024
window.start_localstring (YYYY-MM-DD HH:MM:SS)
Start in local time (request `tz`), with no offset suffix.
example: "2027-01-15 11:11:35"
window.end_localstring (YYYY-MM-DD HH:MM:SS)
End in local time (request `tz`), with no offset suffix.
example: "2027-01-15 12:30:31"

Usage tips

How to use it

  • Show as a banner, not a modal
    If the current time falls in Rahu Kaal, a small warning banner is friendly. A modal is intrusive.
  • Cache per date and location
    Rahu Kaal depends only on sunrise, sunset and weekday. Cache it for the day, keyed by (date, lat, lon). The `time` parameter does not change it.
  • Pair with Yamaganda and Gulika
    Almanacs show all three windows together. Call /v1/panchang/yamaganda and /v1/panchang/gulika, or /v1/panchang/advanced, which returns `muhurta.rahu_kaal`, `muhurta.yamaganda`, `muhurta.gulika`, `muhurta.abhijit` and `muhurta.brahma_muhurat` in one response.
  • Duration is not returned
    Compute it as (window.end_jd − window.start_jd) × 1440 to get minutes.

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.