Back to Docs

Panchang

Panchang

POST/api/v2/vedic/panchang

Calculate 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/panchang
Safe 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.

Field
year
Type
integer
Required
Yes
Description
Birth year.
Field
month
Type
integer
Required
Yes
Description
Birth month (1-12).
Field
day
Type
integer
Required
Yes
Description
Birth day.
Field
hour
Type
integer
Required
Yes
Description
Birth hour (0-23).
Field
minute
Type
integer
Required
Yes
Description
Birth minute (0-59).
Field
city
Type
string
Required
No
Description
Birth city. Optional when lat/lng are provided.
Field
lat
Type
float
Required
No
Description
Birth latitude. Recommended for production.
Field
lng
Type
float
Required
No
Description
Birth longitude. Recommended for production.
Field
tz_str
Type
string
Required
No
Description
Optional timezone override such as Asia/Kolkata, Europe/London, AUTO, or LMT. Defaults to AUTO when omitted.
Field
ayanamsha
Type
string
Required
No
Description
Vedic ayanamsha. Default is lahiri.
Field
house_system
Type
string
Required
No
Description
House system. Default is whole_sign.
Field
node_type
Type
string
Required
No
Description
Lunar node type: mean or true.

Response Shape

Field
date
Type
string
Required
n/a
Description
Requested local date.
Field
sunrise / sunset
Type
string
Required
n/a
Description
Local sunrise and sunset times.
Field
weekday
Type
object
Required
n/a
Description
Weekday number and name.
Field
lunar_month
Type
object
Required
n/a
Description
Lunar month name, Amanta flag, and Vikram Samvat year.
Field
tithi / nakshatra / yoga / karanas
Type
object
Required
n/a
Description
Core Panchang elements with transition times.
Field
rahu_kalam
Type
object
Required
n/a
Description
Daily Rahu Kalam start and end.
Field
request_time_panchang
Type
object
Required
n/a
Description
Panchang values active at the requested local time.
Field
metadata
Type
object
Required
n/a
Description
Endpoint version, ruleset, ayanamsha, timezone, and calculation basis.

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.

V2
{
  "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"
  }
}

Related Docs