API Reference / Vedic Astrology / Panchang
/v1/panchang/yoga
Yoga with transition JD.
What this tells you
Yoga (nitya yoga) is the sum of the sidereal longitudes of the Sun and Moon, divided into 27 parts of 13°20'. Each yoga has a name and is classed as auspicious or inauspicious. Muhurta selection avoids the inauspicious ones, especially Vyatipata and Vaidhriti. This endpoint returns the yoga running at local sunrise on `date` and when it ends.
Request
All requests require an Authorization header with your dv_live_* API key.
curl "https://api.lifeastroapi.com/v1/panchang/yoga?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.
| Name | Required | Example | Description |
|---|---|---|---|
date | yes | 2027-01-15 | Date (YYYY-MM-DD). |
tz | yes | Asia/Kolkata | Timezone: IANA name (Asia/Kolkata) or UTC offset (+05:30). |
lat | yes | 28.6139 | Latitude in decimal degrees. |
lon | yes | 77.209 | Longitude in decimal degrees. |
ayanamsa | no | — | 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.
{
"date": "2027-01-15",
"location": {
"lat": 28.6139,
"lon": 77.209,
"alt": 0
},
"tz": "Asia/Kolkata",
"index": 19,
"name": "Shiva",
"special": "Auspicious",
"end_jd": 2461420.949764,
"end_local": "2027-01-15 16:17:40"
}Field reference
Every field in the response, with its type, a real example, and what it means.
| Field | Type | Meaning |
|---|---|---|
| date | string | Echo of the `date` parameter (local date). example: "2027-01-15" |
| location | object | Echo of `lat`, `lon` and `alt` (metres, default 0). example: { "lat": 28.6139, "lon": 77.209, "alt": 0 } |
| tz | string | Echo of the `tz` parameter. `end_local` is in this zone. example: "Asia/Kolkata" |
| index | integer (0–26) | Position of the yoga, counted from 0 (Vishkumbha = 0, Vaidhriti = 26). example: 19Jyotish: Yoga = floor((Sun longitude + Moon longitude) / 13°20'), using sidereal longitudes. |
| name | string | Name of the yoga. example: "Shiva"Jyotish: The 27 names as returned: Vishkumbha, Priti, Ayushman, Saubhagya, Shobhana, Atiganda, Sukarma, Dhriti, Shoola, Ganda, Vriddhi, Dhruva, Vyaghata, Harshana, Vajra, Siddhi, Vyatipata, Variyan, Parigha, Shiva, Siddha, Sadhya, Shubha, Shukla, Brahma, Indra, Vaidhriti. |
| special | string | "Auspicious" or "Inauspicious". Always in English, even when `locale` is set. example: "Auspicious"Jyotish: The nine inauspicious yogas: Vishkumbha, Atiganda, Shoola, Ganda, Vyaghata, Vajra, Vyatipata, Parigha, Vaidhriti. The other 18 are auspicious. |
| end_jd | number | When this yoga ends, as a Julian Day in UT. example: 2461420.949764 |
| end_local | string (YYYY-MM-DD HH:MM:SS) | When this yoga ends, in local time (request `tz`), with no offset suffix. example: "2027-01-15 16:17:40" |
Usage tips
How to use it
- Combine with tithi for muhurtaA muhurta is not picked from tithi alone; the yoga should be auspicious too. Use this with /v1/panchang/tithi, or call /v1/panchang/basic to get all five limbs in one request.
- Warn on inauspicious yogasShow a warning badge when `special` is "Inauspicious". The value is never translated, so the comparison is safe in every locale.
- Sunrise value, not the current oneThe yoga is taken at sunrise on `date`. The `time` parameter does not change it. After `end_local`, the next yoga (index + 1, wrapping 26 → 0) is running.
- Choose the ayanamsaYoga uses sidereal longitudes, so it depends on `ayanamsa` (lahiri by default; also raman, krishnamurti, fagan, yukteshwar, true_chitrapaksha).
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.