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.
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"
}Real Response Example
This is a real production response for the example payload. Large arrays are intentionally shown as returned by the API.
{
"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": {
"name": "Bhadrapada",
"amanta": true,
"vikram_samvat": 2054
},
"tithi": {
"number": 21,
"name": "Shashti",
"ends_at": "07:38:58",
"ends_at_iso": "1997-09-22T07:38:58.096672+05:30",
"paksha": "Krishna"
},
"nakshatra": {
"number": 4,
"name": "Rohini",
"ends_at": "18:29:18",
"ends_at_iso": "1997-09-22T18:29:18.330247+05:30",
"pada": 2,
"lord": "Moon"
},
"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",
"ayanamsha": "lahiri",
"timezone_used": "Asia/Kolkata",
"calculation_basis": "sunrise_day_with_transition_times",
"request_local_time": "1997-09-22T23:25:00+05:30"
}
}