Diwali Offer — Premium Kundali just ₹99 · Reports from ₹49 · Ends 30 Nov View offers →

Developers / Panchang API

Developer API

Panchang API — Tithi, Nakshatra, Yoga & Muhurat API

The Hindu calendar's five limbs — tithi, vara, nakshatra, yoga and karana — with exact start and end times, sunrise, sunset, Rahu kaal, Yamaganda, Gulika kaal and Abhijit muhurat, for any date and place.

What the Panchang API returns

The five limbs

Tithi, vara (weekday), nakshatra, yoga and karana, each with its name and exact start/end time — plus every limb occurring during the sunrise-to-sunrise day.

Sun & moon timings

Sunrise, sunset, next sunrise, moonrise and moonset for the exact place and date you send.

Inauspicious periods

Rahu kaal, Yamaganda and Gulika kaal, computed from sunrise using the day-of-week part tables, not fixed clock times.

Abhijit muhurat

Start, end and whether it applies that day (it does not fall on Wednesdays).

Request and response

Request

curl -X POST https://api.astronirnay.com/v1/panchang \
  -H "x-api-key: YOUR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "date": "2025-10-11",
    "latitude": 19.076,
    "longitude": 72.8777,
    "timezone": "Asia/Kolkata"
  }'

The same call in Node.js

const res = await fetch("https://api.astronirnay.com/v1/panchang", {
  method: "POST",
  headers: { "x-api-key": process.env.ASTRONIRNAY_KEY, "content-type": "application/json" },
  body: JSON.stringify({ date: "2025-10-11", latitude: 19.076,
                          longitude: 72.8777, timezone: "Asia/Kolkata" }),
});
const { data } = await res.json();
console.log(data.tithi.name, data.nakshatra.name); // "Dwadashi" "Uttara Ashadha"

Response (shortened)

{
  "success": true,
  "data": {
    "date": "2025-10-11",
    "weekday": "Saturday",
    "sunrise": "2025-10-11T06:18:42+05:30",
    "sunset": "2025-10-11T17:52:10+05:30",
    "tithi": { "number": 12, "name": "Dwadashi", "paksha": "shukla",
               "start": "2025-10-10T22:04:11+05:30", "end": "2025-10-11T19:41:03+05:30" },
    "nakshatra": { "number": 21, "name": "Uttara Ashadha", "pada": 2, "lord": "Sun" },
    "yoga": { "number": 7, "name": "Sukarma" },
    "karana": { "number": 23, "name": "Taitila" },
    "inauspicious": {
      "rahu_kaal": { "start": "2025-10-11T09:08:00+05:30", "end": "2025-10-11T10:37:00+05:30" }
    },
    "auspicious": {
      "abhijit_muhurta": { "start": "2025-10-11T11:58:00+05:30", "end": "2025-10-11T12:44:00+05:30", "applicable": true }
    }
  },
  "engine": { "ayanamsha": "lahiri", "day_starts_at": "sunrise" },
  "meta": { "request_id": "req_0123456789abcdef", "api_version": "v1" }
}

2 credits per successful call. Failed requests are never charged.

Panchang API: common questions

Does this cover Tithi, Muhurat and the Hindu calendar in one call?

Yes. One request to POST /v1/panchang returns tithi, nakshatra, yoga, karana, sunrise/sunset and the day's auspicious/inauspicious windows together.

How is the day boundary defined?

Sunrise to the next sunrise, as in traditional panchang — not midnight to midnight. The response's engine.day_starts_at field states this explicitly.

Does a limb that changes mid-day show both values?

Yes. The limb at sunrise is returned at the top level, and every occurrence of each limb between sunrise and the next sunrise is listed under during_day.

Can I use this for Muhurat (auspicious timing) selection?

The API returns Abhijit muhurat and the three major inauspicious windows (Rahu kaal, Yamaganda, Gulika kaal). For full Muhurta rule sets across multiple days, see our Muhurta endpoints in the API docs.

What if I only have a city name, not coordinates?

Use GET /v1/places/search first to resolve a place name to latitude, longitude and time zone, then pass those into the panchang request.

Free prediction on Instagram1 free question daily · @astronirnay Ask on WhatsApp₹50 per question · +91 81212 99090