Panchang
Panchang
/api/v2/vedic/panchangCalculate the V2 sunrise-based daily Panchang for a date, time, and location, including Tithi, Nakshatra, Yoga, Karana, and Rahu Kalam.
Authentication: send x-api-key.
Full URL
https://api.freeastroapi.com/api/v2/vedic/panchangSafe retries with Idempotency-Key
Authenticated, billable astrology POST requests accept the optional header Idempotency-Key: <client-generated unique operation key>. Reuse the same key only when retrying the exact same method, path, query string, and JSON body after a timeout or network failure.
A completed replay returns the first response with Idempotency-Replayed: true, does not rerun the calculation, and does not consume extra quota. Keys are retained for about 24 hours.
Reusing a key with a changed request returns 409 idempotency_key_reused. A duplicate while the first request is still running returns 409 request_in_progress with Retry-After.
What It Returns
A daily almanac payload with sunrise, sunset, weekday, lunar month, core Panchang elements, transition times, Rahu Kalam, request-time Panchang values, and calculation metadata.
Lunar months and year conventions (V2)
Lunar months use the Amanta calendar and are evaluated at local sunrise. The month remains the same throughout its lunation. Zero solar ingresses identify an Adhika month; two identify a Kshaya event. The response keeps the base month name separate from month_type so clients can distinguish identity from classification.
chaitra_shukladi(default): advance the year at the opening new moon of the first Chaitra lunation, including Adhika Chaitra.chaitra_krishnadi: advance at the full moon preceding that Chaitra lunation. This supports a Purnimanta-style year boundary; month output stays Amanta.kartika_shukladi: advance at the opening new moon of the first Kartika lunation, including Adhika Kartika, for the Gujarati year convention.
These are calendar phase rules, not festival-observance dates. For example, Delhi sunrise on March 19, 2026 precedes the Chaitra conjunction, so the default daily year changes on March 20. Changing the request hour or adding "lang": "hi"does not change those sunrise facts. Language does not select a region or calendar.
Kshaya example: January 20, 1983
The continuing month is Pausha; Magha is omitted as a separate lunation. Some calendars label this period “Kshaya Magha”. Read both identities:
{
"lunar_month": {
"number": 10,
"name": "Pausha",
"amanta": true,
"month_type": "kshaya",
"omitted_month": {
"number": 11,
"name": "Magha"
},
"vikram_samvat": 2039,
"vikram_samvat_convention": "chaitra_shukladi"
}
}In Hindi, these names become पौष and माघ. The identifiers andmonth_type stay unchanged. If a year-start month is omitted, its containing Kshaya lunation supplies the year boundary.
This corrects earlier approximate month names and the fixed March 22 year cutoff. The shared V2 Panchang calculation, including the default English result embedded in /calculate, uses these corrections. The standalone endpoint acceptsyear_convention; V1 is unchanged. The /calculate response omits omitted_month when it is null.
Dates without sunrise or sunset
V2 returns HTTP 422 when there is no sunrise on the requested local date, or no sunset within the following 24 hours. This can happen during polar day or night. A later date's sunrise is never substituted. The same error applies when /api/v2/vedic/calculate includes Panchang.
Read detail.code for sunrise_unavailable orsunset_unavailable. The error includes detail.dateand an English detail.message, including for Hindi requests.
Example Request
curl -X POST "https://api.freeastroapi.com/api/v2/vedic/panchang" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"year": 1997,
"month": 9,
"day": 22,
"hour": 23,
"minute": 25,
"city": "Mumbai",
"lat": 19.391928,
"lng": 72.839732,
"tz_str": "Asia/Kolkata",
"ayanamsha": "lahiri",
"house_system": "whole_sign",
"node_type": "mean"
}'Request Parameters
Provide either city or both lat and lng. Coordinates are recommended for stable production results.
Response Shape
Real Request Example
This request was captured from the live production endpoint and is the same payload used in the code tabs.
{
"year": 1997,
"month": 9,
"day": 22,
"hour": 23,
"minute": 25,
"city": "Mumbai",
"lat": 19.391928,
"lng": 72.839732,
"tz_str": "Asia/Kolkata",
"ayanamsha": "lahiri",
"house_system": "whole_sign",
"node_type": "mean"
}Response Example
V2Generated from the current V2 implementation for the example request, including explicit lunar-month classification and year convention.
{
"date": "1997-09-22",
"location": {
"lat": 19.391928,
"lng": 72.839732
},
"sunrise": "06:27:14",
"sunset": "18:35:15",
"weekday": {
"number": 2,
"name": "Monday"
},
"lunar_month": {
"number": 6,
"name": "Bhadrapada",
"month_type": "regular",
"omitted_month": null,
"amanta": true,
"vikram_samvat": 2054,
"vikram_samvat_convention": "chaitra_shukladi"
},
"tithi": {
"number": 21,
"name": "Shashti",
"paksha": "Krishna",
"ends_at": "07:38:58",
"ends_at_iso": "1997-09-22T07:38:58.096672+05:30"
},
"nakshatra": {
"number": 4,
"name": "Rohini",
"pada": 2,
"lord": "Moon",
"ends_at": "18:29:18",
"ends_at_iso": "1997-09-22T18:29:18.330247+05:30"
},
"yoga": {
"number": 16,
"name": "Siddhi",
"ends_at": "25:42:19",
"ends_at_iso": "1997-09-23T01:42:19.175767+05:30"
},
"karanas": [
{
"number": 6,
"name": "Vanij",
"ends_at": "07:38:58",
"ends_at_iso": "1997-09-22T07:38:58.096672+05:30"
},
{
"number": 7,
"name": "Vishti",
"ends_at": "19:15:41",
"ends_at_iso": "1997-09-22T19:15:41.241485+05:30"
},
{
"number": 1,
"name": "Bhav",
"ends_at": "31:04:25",
"ends_at_iso": "1997-09-23T07:04:25.830624+05:30"
}
],
"rahu_kalam": {
"start": "07:58",
"end": "09:29"
},
"request_time_panchang": {
"tithi": {
"number": 22,
"name": "Saptami",
"paksha": "Krishna"
},
"nakshatra": {
"number": 5,
"name": "Mrigashirsha",
"pada": 1,
"lord": "Mars"
},
"yoga": {
"number": 16,
"name": "Siddhi"
},
"karana": {
"number": 1,
"name": "Bhav"
},
"sun_sign": {
"sign_id": 6,
"name": "Virgo",
"degree": 5.9305
},
"moon_sign": {
"sign_id": 2,
"name": "Taurus",
"degree": 26.0527
}
},
"metadata": {
"endpoint_version": "v2",
"ruleset_version": "astrosage_panchang_v1",
"calendar_ruleset_version": "amanta_conjunction_v1",
"ayanamsha": "lahiri",
"timezone_used": "Asia/Kolkata",
"calculation_basis": "sunrise_day_with_transition_times",
"request_local_time": "1997-09-22T23:25:00+05:30"
}
}Related Docs
FAQ
Is Panchang available in Hindi?
Yes. Send "lang": "hi" to /api/v2/vedic/panchang for Hindi names, including request-time Panchang labels. "language": "hi" is also accepted. Omit the parameter or use "en" for English. JSON keys, identifiers and calculated values stay the same. This option applies to the standalone V2 endpoint; Panchang inside /calculate remains in English.