Overview
Panchang API returns complete Hindu calendar data — tithi, nakshatra, yoga, karana, festivals, muhurtas, sunrise/sunset, choghadiya, and sankranti — for any date, city, or coordinate. It serves the global Hindu diaspora across 67 countries, not just India.
Rule of thumb: most gateway endpoints under /v1/... use POST. Public read-only endpoints use GET — including GET /health, GET /status, and GET /v1/demo/today.
All responses use a standard JSON envelope with data, meta, and optional dev_notes fields. Error responses always carry a machine-readable error and a docs_url link.
All sidereal calculations use the Lahiri ayanamsha, consistent with the standard adopted by the Government of India's Calendar Reform Committee. Festival and observance data is generated by an 11-layer deterministic rule engine, regression-tested against retained validation evidence.
New to Hindu calendar terminology? Jump to the Glossary for plain-language definitions of every term used in API responses — tithi, nakshatra, yoga, muhurat, choghadiya, and more.
Code Examples
All examples below call the Daily Panchang endpoint for Ujjain on 2026-04-15. Swap YOUR_API_KEY, the date, and city to match your use case.
Get Started in 4 Steps
Go from signup to production in a few minutes.
Sign up free - no credit card needed. Your key is ready instantly.
POST with a date, city, and your key. One request, full response.
Tithi, nakshatra, sunrise, festivals - all in one JSON object.
Integrate into your app. Upgrade your plan as you scale.
curl -X POST "https://panchang.devdarsha.com/v1/panchang/daily" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"date":"2026-04-15","city_id":"ujjain"}'// Use header auth - never put api_key in client-side code
const response = await fetch("https://panchang.devdarsha.com/v1/panchang/daily", {
method: "POST",
headers: {
"X-Api-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
date: "2026-04-15",
city_id: "ujjain"
})
});
const data = await response.json();
console.log(data.data.tithi[0].name); // "Trayodashi"
console.log(data.data.sun.rise); // "15-04-2026 05:46:10"
console.log(data.data.festivals.total); // 2import requests
response = requests.post(
"https://panchang.devdarsha.com/v1/panchang/daily",
headers={"X-Api-Key": "YOUR_API_KEY"},
json={"date": "2026-04-15", "city_id": "ujjain"}
)
data = response.json()
print(data["data"]["tithi"][0]["name"]) # Trayodashi
print(data["data"]["sun"]["rise"]) # 15-04-2026 05:16:44
print(data["data"]["festivals"]["total"]) # 2Sample Response (condensed)
Here is a representative slice of a real Daily Panchang response for Ujjain, April 15, 2026:
{
"data": {
"date": "2026-04-15",
"city": "Ujjain",
"tithi": [{ "name": "Trayodashi", "paksha": "Krishna", "end": "15-04-2026 22:32:21" }],
"nakshatra":[{ "name": "Purva Bhadrapada" }, { "name": "Uttara Bhadrapada" }],
"yoga": [{ "name": "Brahma" }, { "name": "Indra" }],
"sun": { "rise": "15-04-2026 05:16:44", "set": "15-04-2026 17:56:48" },
"muhurat": { "rahu_kaal": { "start": "11:36:46", "end": "13:11:46" } },
"festivals":{ "total": 2, "data": [{ "name": "Bhauma Pradosh" }, { "name": "Masik Shivratri" }] }
},
"meta": {
"version": "v1",
"computed_at": "2026-04-15T00:00:00.000Z",
"resolved_timezone": "Asia/Kolkata",
"data_source": "live",
"cache_age_seconds": 0
}
}Attached JSON PayloadExpand to inspect the full cached response
{
"data": {
"date": "2026-04-15",
"weekday": "Wednesday",
"timezone": "Asia/Kolkata",
"utc_offset": "+05:30",
"city": "Ujjain",
"city_id": "ujjain",
"bengali_date": {
"day": 1,
"month": "Baishakh",
"year": 1433
},
"calendars": {
"vikram_samvat": 2083,
"shaka_samvat": 1948,
"bengali": {
"year": 1433,
"month": "Chaitra",
"day": 26
},
"hijri": {
"year": 1447,
"month": 10,
"day": 17,
"month_name": "Rajab",
"note": "Tabular Kuwaiti method. Moon-sighted calendars may differ by ±1–2 days."
}
},
"sun": {
"rise": "15-04-2026 05:16:44",
"set": "15-04-2026 17:56:48",
"longitude": 25.05,
"rashi": "Mesha"
},
"moon": {
"rise": "15-04-2026 03:33:09",
"set": "15-04-2026 15:57:40",
"rashi": "Kumbha"
},
"lunar_month": {
"name": "Chaitra",
"adhik": false
},
"adhik": false,
"lunar_month_label": "Chaitra",
"lunar_context": {
"lunar_month": "Chaitra",
"is_adhik": false,
"adhik": false,
"lunar_month_label": "Chaitra"
},
"flags": {
"is_purnima": false,
"is_amavasya": false,
"is_ekadashi": false,
"is_sankashti": false,
"is_parana": false
},
"tithi": [
{
"number": 28,
"name": "Trayodashi",
"paksha": "Krishna",
"start": "15-04-2026 05:16:44",
"end": "15-04-2026 22:32:21"
}
],
"nakshatra": [
{
"number": 25,
"name": "Purva Bhadrapada",
"start": "15-04-2026 05:16:44",
"end": "15-04-2026 15:22:21"
},
{
"number": 26,
"name": "Uttara Bhadrapada",
"start": "15-04-2026 15:23:21",
"end": "16-04-2026 13:58:21"
}
],
"yoga": [
{
"number": 25,
"name": "Brahma",
"start": "15-04-2026 05:16:44",
"end": "15-04-2026 13:23:36"
},
{
"number": 26,
"name": "Indra",
"start": "15-04-2026 13:24:36",
"end": "16-04-2026 10:35:51"
}
],
"karana": [
{
"number": 55,
"name": "Garaja",
"start": "15-04-2026 05:16:44",
"end": "15-04-2026 11:28:36"
},
{
"number": 56,
"name": "Vanija",
"start": "15-04-2026 11:28:36",
"end": "16-04-2026 05:16:44"
}
],
"muhurat": {
"rahu_kaal": {
"start": "15-04-2026 11:36:46",
"end": "15-04-2026 13:11:46"
},
"gulika_kaal": {
"start": "15-04-2026 10:01:45",
"end": "15-04-2026 11:36:46"
},
"yamaganda_kaal": {
"start": "15-04-2026 06:51:44",
"end": "15-04-2026 08:26:45"
},
"abhijit": {
"start": null,
"end": null
},
"brahma": {
"start": "15-04-2026 03:40:44",
"end": "15-04-2026 04:28:44"
},
"vijaya": {
"start": "15-04-2026 14:08:46",
"end": "15-04-2026 14:59:27"
},
"varjyam": {
"start": "15-04-2026 11:36:46",
"end": "15-04-2026 12:52:46"
},
"durmuhurta": {
"start": "15-04-2026 06:46:44",
"end": "15-04-2026 08:16:44"
},
"amrit_siddhi": {
"start": "15-04-2026 16:15:27",
"end": "15-04-2026 16:40:47"
}
},
"choghadiya": {
"day": [
{
"type": "Labh",
"quality": "Beneficial",
"start": "15-04-2026 05:16:44",
"end": "15-04-2026 06:51:44"
},
{
"type": "Amrit",
"quality": "Very Auspicious",
"start": "15-04-2026 06:51:44",
"end": "15-04-2026 08:26:45"
},
{
"type": "Kaal",
"quality": "Inauspicious",
"start": "15-04-2026 08:26:45",
"end": "15-04-2026 10:01:45"
},
{
"type": "Shubh",
"quality": "Auspicious",
"start": "15-04-2026 10:01:45",
"end": "15-04-2026 11:36:46"
},
{
"type": "Rog",
"quality": "Inauspicious",
"start": "15-04-2026 11:36:46",
"end": "15-04-2026 13:11:46"
},
{
"type": "Udveg",
"quality": "Inauspicious",
"start": "15-04-2026 13:11:46",
"end": "15-04-2026 14:46:47"
},
{
"type": "Char",
"quality": "Neutral",
"start": "15-04-2026 14:46:47",
"end": "15-04-2026 16:21:47"
},
{
"type": "Labh",
"quality": "Beneficial",
"start": "15-04-2026 16:21:47",
"end": "15-04-2026 17:56:48"
}
],
"night": [
{
"type": "Rog",
"quality": "Inauspicious",
"start": "15-04-2026 17:56:48",
"end": "15-04-2026 19:21:47"
},
{
"type": "Udveg",
"quality": "Inauspicious",
"start": "15-04-2026 19:21:47",
"end": "15-04-2026 20:46:47"
},
{
"type": "Char",
"quality": "Neutral",
"start": "15-04-2026 20:46:47",
"end": "15-04-2026 22:11:46"
},
{
"type": "Labh",
"quality": "Beneficial",
"start": "15-04-2026 22:11:46",
"end": "15-04-2026 23:36:46"
},
{
"type": "Amrit",
"quality": "Very Auspicious",
"start": "15-04-2026 23:36:46",
"end": "16-04-2026 01:01:45"
},
{
"type": "Kaal",
"quality": "Inauspicious",
"start": "16-04-2026 01:01:45",
"end": "16-04-2026 02:26:45"
},
{
"type": "Shubh",
"quality": "Auspicious",
"start": "16-04-2026 02:26:45",
"end": "16-04-2026 03:51:44"
},
{
"type": "Rog",
"quality": "Inauspicious",
"start": "16-04-2026 03:51:44",
"end": "16-04-2026 05:16:44"
}
]
},
"festivals": {
"total": 2,
"data": [
{
"id": "2026-04-15_PRADOSH",
"name": "Bhauma Pradosh",
"slug": "bhauma-pradosh",
"type": "vrat",
"category": "hindu_shaiva",
"observed_in": [
"all-india"
],
"start": "15-04-2026 16:26:48",
"end": "15-04-2026 18:56:48",
"duration_note": "2h 30m",
"note": "Pradosh: 1.5 hrs before sunset to 1 hr after"
},
{
"id": "2026-04-15_MASIK_SHIVRATRI",
"name": "Masik Shivratri",
"slug": "masik-shivratri",
"type": "vrat",
"category": "hindu_shaiva",
"observed_in": [
"all-india"
],
"start": "15-04-2026 22:33:25",
"end": "16-04-2026 20:12:48",
"duration_note": "21h 39m (ends next day)"
}
]
},
"metadata": {
"api_version": "2.0",
"engine": "v5.0",
"ayanamsha": "Lahiri",
"ayanamsa_used": 24.21733,
"resolved_via": "exact_match",
"resolved_lat": 22.5726,
"resolved_lon": 88.3639,
"offline": true,
"region_variant": "east_india",
"region_resolved_via": "exact_match",
"compute_time_ms": 45,
"last_updated": "2026-04-14T19:52:18.392Z"
}
},
"meta": {
"version": "1.0",
"computed_at": "2026-04-14T19:52:18.393Z",
"resolved_timezone": "Asia/Kolkata",
"data_source": "live",
"cache_age_seconds": 0
},
"dev_notes": [],
"profile": "emerald",
"features": {
"muhurat": true,
"choghadiya": true,
"metadata": true,
"monthly_api": true
}
}Authentication
Every protected endpoint requires an API key. Send it in the X-Api-Key request header and keep requests server-side.
How to get a key
- Sign up — free, no credit card.
- Open the Dashboard and create a key. You can name, rotate, and revoke keys from there.
- Copy the key once — it is shown in full only at creation time. Store it as a server-side secret.
The same lifecycle is also available programmatically — see API Keys below.
Recommended method
Pass your key as an X-Api-Key request header. This keeps keys out of URLs, browser history, proxy logs, and analytics exports.
POST https://panchang.devdarsha.com/v1/panchang/daily X-Api-Key: YOUR_API_KEY
Deprecated migration mode
URL query-string API keys are deprecated and will be blocked after first-party callers finish migration. Do not build new integrations with ?api_key=....
# Use header auth instead
curl -X POST "https://panchang.devdarsha.com/v1/panchang/daily" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"date":"2026-06-15","city_id":"chennai"}'X-Api-Key.Base URL
https://panchang.devdarsha.com/v1
Quick Start
For all /v1/... endpoints, send a JSON body with your request fields and authenticate using X-Api-Key. Use city_id for supported cities, or pass lat and lon for coordinate-based lookups (Amethyst plans and above; Free is city_id only). Add faith_filter and timezone when you want more specific results.
Prefer working code? View official DevDarsha API code examples on GitHub — copy-paste examples in Node.js, Python, PHP, WordPress, and cURL.
Use a supported city
The canonical gateway format when the location exists in the city directory.
curl -X POST "https://panchang.devdarsha.com/v1/panchang/daily" \
-H "x-api-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"date":"2026-03-27","city_id":"ujjain"}'Use exact coordinates
Best when you need Panchang calculations for places outside the city directory.
curl -X POST "https://panchang.devdarsha.com/v1/panchang/daily" \
-H "x-api-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"date":"2026-03-27","lat":22.5726,"lon":88.3639}'Common URL Combinations
Use these request bodies when you want to layer tradition-specific filtering or timezone-aware output onto the standard daily gateway call.
Add a faith filter
Return festival and observance data narrowed to a specific tradition.
curl -X POST "https://panchang.devdarsha.com/v1/panchang/daily" \
-H "x-api-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"date":"2026-03-27","city_id":"ujjain","faith_filter":"hindu"}'Add a timezone override
Use this when you want output times resolved for a specific IANA timezone.
curl -X POST "https://panchang.devdarsha.com/v1/panchang/daily" \
-H "x-api-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"date":"2026-03-27","city_id":"ujjain","faith_filter":"hindu","timezone":"Asia/Kolkata"}'Plans & Feature Gates
Each plan controls how many calls you can make, how fast you can call, which endpoints you can reach, and which lookup modes are available. Full pricing and discounts live on pricing.
Access gates
- Free: daily endpoint only, supported
city_idonly (no coordinates), and a near-term demo date window (today-3 .. today+7). Free is for evaluation, not production. - Amethyst and above: coordinate (
lat/lon) lookup is available. - Endpoints: monthly requires Amethyst+; yearly requires Sapphire+.
- Paid public date window: 2025-01-01 through 2030-12-31 across all paid plans.
Quotas & rate limits
| Plan | Monthly calls | Calls/minute | Overage | Trial |
|---|---|---|---|---|
| Free | 2,000 | 10 | Not available | — |
| Amethyst | 50,000 | 60 | ₹10 / 1,000 calls | 7 days, no card |
| Sapphire | 3,00,000 | 180 | ₹5 / 1,000 calls | 7 days, no card |
| Emerald | 20,00,000 | 600 | ₹2.50 / 1,000 calls | 7 days, no card |
Trial: Paid plans start with a 7-day free trial. If you do not add a payment method, the account auto-downgrades to Free on day 8.
Quota cost per call
Each call costs 1 request, except the yearly endpoint:
POST /v1/panchang/daily— 1 requestPOST /v1/panchang/monthly— 1 requestPOST /v1/panchang/yearly— 12 requests per callGET /v1/demo/today,GET /health,GET /status— free, no quota cost
A cache hit still consumes quota. The actual cost charged is echoed back in the X-Quota-Cost response header.
Separately, a coverage meter limits the distinct location-date pairs an account may retrieve per month (an anti-extraction control). It is independent of the per-call quota above — it is not a per-day charge.
Feature availability
| Feature | Free | Amethyst | Sapphire | Emerald |
|---|---|---|---|---|
| Daily Panchang | Yes | Yes | Yes | Yes |
| Monthly Panchang | — | Yes | Yes | Yes |
| Yearly Panchang | — | — | Yes | Yes |
| Muhurat timings | — | Yes | Yes | Yes |
| Core festivals | — | Yes | Yes | Yes |
| All festival layers | — | — | Yes | Yes |
| Regional festivals | — | — | Yes | Yes |
| Eclipse data | — | — | Yes | Yes |
| Faith filter | — | Yes | Yes | Yes |
city_id lookup | Yes | Yes | Yes | Yes |
lat/lon lookup | — | Yes | Yes | Yes |
| SLA guarantee | — | — | — | 99.9% |
If you call an endpoint or feature that is not on your plan, the response is 403 plan_required. See Error Codes.
Signup
Create a new DevDarsha account programmatically. Returns an account record and a first API key. No authentication required.
Most users will sign up through the website signup form instead — this endpoint is for partners and SDKs that provision accounts on a user's behalf.
Request Body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
email | string | Required | Valid email address. Becomes the account login. |
password | string | Required | Minimum 8 characters. |
name | string | Optional | Display name shown in dashboard and invoices. |
plan | string | Optional | free (default), amethyst, sapphire, or emerald. Paid plans start a 7-day trial. |
Example Request
curl -X POST "https://panchang.devdarsha.com/v1/signup" \
-H "Content-Type: application/json" \
-d '{"email":"[email protected]","password":"a-strong-password","plan":"free"}'Response
{
"data": {
"account": { "id": "acc_...", "email": "[email protected]", "plan": "free" },
"api_key": "sk_live_..."
},
"meta": { "version": "v1", "computed_at": "2026-04-29T10:00:00Z" }
}The full api_key is returned only once at signup. After this, the dashboard shows a masked preview. If you lose it, create a new key and revoke the old one.
API Key Management
List, create, rotate, and revoke API keys for your account. All key endpoints require an existing API key with admin scope (your first key has admin scope by default). You can also manage keys from the Dashboard.
Operations
| Operation | Method & path | Description |
|---|---|---|
| Create | POST /v1/keys | Create a new key with an optional name and scope. |
| List | POST /v1/keys/list | List your keys (masked previews only — never the full secret). |
| Rotate | POST /v1/keys/rotate | Issue a replacement key for an existing key id. Old key keeps working for 24 h. |
| Revoke | POST /v1/keys/revoke | Permanently invalidate a key. Cannot be undone. |
Create a key
curl -X POST "https://panchang.devdarsha.com/v1/keys" \
-H "X-Api-Key: YOUR_ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"production-server","scope":"read"}'Request fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Optional | Friendly label, e.g. production-server. |
scope | string | Optional | read (default) or admin. Admin keys can manage other keys. |
key_id | string | Required for rotate/revoke | Public id of the key (e.g. key_abc123) — never the secret. |
Response (create / rotate)
{
"data": {
"key_id": "key_abc123",
"api_key": "sk_live_...",
"name": "production-server",
"scope": "read",
"created_at": "2026-04-29T10:00:00Z"
},
"meta": { "version": "v1" }
}The api_key field is returned only on create and rotate. List operations show a masked preview such as sk_live_...wXyZ. Treat keys like passwords.
Usage
Returns the current month's usage and remaining quota for the authenticated key. Useful for surfacing a quota meter in your own dashboard or alerting before you run out.
Example Request
curl "https://panchang.devdarsha.com/v1/usage" \ -H "X-Api-Key: YOUR_API_KEY"
Response
{
"data": {
"plan": "amethyst",
"period_start": "2026-04-01T00:00:00Z",
"period_end": "2026-05-01T00:00:00Z",
"calls_used": 12480,
"calls_included": 50000,
"calls_remaining": 37520,
"overage_units": 0,
"overage_inr": 0
},
"meta": { "version": "v1", "computed_at": "2026-04-29T10:00:00Z" }
}Response fields
| Field | Type | Description |
|---|---|---|
plan | string | Active plan slug. |
period_start / period_end | string | ISO 8601 boundaries of the current billing month (UTC). |
calls_used | integer | Requests consumed this period (yearly endpoint counts as 12 each). |
calls_included | integer | Calls included in the plan. |
calls_remaining | integer | calls_included − calls_used. Negative values mean you are in overage. |
overage_units | integer | Calls past calls_included on overage-eligible plans. |
overage_inr | number | Overage charge in INR for the period so far. |
Daily Panchang
Returns the complete Panchang for a single date and location. This is the core endpoint — a single call returns the five classical Panchang elements (tithi, vara, nakshatra, yoga, karana), plus muhurtas, choghadiya, festival data, sunrise/sunset times, and regional calendar conversions (Vikram Samvat, Shaka Samvat, Bengali, Hijri). Not familiar with these terms? See the Glossary.
Request Body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
date | string | Required | ISO 8601 date: YYYY-MM-DD |
city_id | string | One of city_id or lat+lon | City slug, e.g. ujjain, mumbai. See City IDs. |
lat | number | One of city_id or lat+lon | Latitude in decimal degrees - Amethyst+ plans only |
lon | number | One of city_id or lat+lon | Longitude in decimal degrees - Amethyst+ plans only |
faith_filter | string | Optional | hindu | islamic | sikh | buddhist | christian | all (default: all) |
timezone | string | Optional | IANA timezone override, e.g. Asia/Kolkata. Defaults to city's local timezone. |
Authentication is passed separately via the X-Api-Key header, not in the JSON body or URL.
Response Fields
| Field | Type | Description |
|---|---|---|
data.tithi | array | Tithi objects: number, name, paksha, start, end |
data.nakshatra | array | Active nakshatras for the day with start/end times |
data.yoga | array | Active yogas with start/end times |
data.karana | array | Active karanas with start/end times |
data.paksha | string | Shukla (waxing) or Krishna (waning) |
data.lunar_month | object | Lunar month name and adhik (leap) flag |
data.sun | object | Sunrise, sunset, solar longitude, and rashi |
data.moon | object | Moonrise, moonset, and lunar rashi |
data.festivals | object | total count and data array of festival objects |
data.muhurat | object | Rahu kaal, gulika, yamaganda, abhijit, brahma, vijaya, and more |
data.choghadiya | object | day and night arrays of 8 choghadiya slots each |
data.sankranti | object | null | Solar ingress details if applicable, otherwise null |
data.bengali_date | object | Bengali calendar equivalent — kept for backward compatibility. Use data.calendars.bengali in new code. |
data.calendars | object | All regional calendar equivalents for the day. Includes Vikram Samvat, Shaka Samvat, Bengali, and Hijri. Prefer this over top-level data.bengali_date in new code. |
data.calendars.vikram_samvat | integer | Vikram Samvat year, e.g. 2083 for Gregorian 2026 |
data.calendars.shaka_samvat | integer | Shaka Samvat year, e.g. 1948 for Gregorian 2026 |
data.calendars.bengali | object | Bengali calendar date — same data as data.bengali_date |
data.calendars.hijri | object | Hijri date using the tabular Kuwaiti method. Disclosed variance: ±1–2 days from moon-sighted calendars. |
data.metadata | object | Engine version, ayanamsha value, resolved coordinates, compute time, and region details |
data.metadata.engine | string | Panchang engine version, e.g. v5.0 |
data.metadata.api_version | string | Engine-internal response schema version (e.g. "2.0"). This is not the gateway API version — the gateway API is always /v1/.... Do not use this field for version negotiation. |
data.metadata.region_variant | string | Auto-detected regional ruleset used for festival calculations. Possible values: north_india, south_india, west_india, east_india, default. Affects which festivals appear and their dates. |
data.metadata.resolved_via | string | How the city or location was matched: exact_match (city_id found directly), fuzzy_match (closest city slug), or coordinate (lat/lon used) |
data.metadata.offline | boolean | true when the result was computed entirely on-engine without calling any external service |
meta.version | string | API version string |
meta.computed_at | string | ISO 8601 computation timestamp |
meta.resolved_timezone | string | IANA timezone used for computation |
meta.data_source | string | cache, engine, or live |
meta.cache_age_seconds | number | Seconds since cached (0 if computed live) |
Monthly Panchang Amethyst+
Returns Panchang data for every day of a given Gregorian month. The response contains a month-level envelope with a days array — each element has the same structure as a single Daily response. Typical use: building calendar views, generating monthly Panchang PDFs, or pre-fetching a full month for offline use.
Quota cost: 1 request per call. Not available on the Free plan.
Request Body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
year | integer | Required | 4-digit year |
month | integer | Required | 1–12 |
city_id | string | Required | City slug |
faith_filter | string | Optional | Same values as Daily — filters festival data |
timezone | string | Optional | IANA timezone override |
Authenticate with the X-Api-Key header.
Example Request
curl -X POST "https://panchang.devdarsha.com/v1/panchang/monthly" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"year":2026,"month":4,"city_id":"ujjain"}'const res = await fetch("https://panchang.devdarsha.com/v1/panchang/monthly", {
method: "POST",
headers: {
"X-Api-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({ year: 2026, month: 4, city_id: "ujjain" })
});
const { data } = await res.json();
// data.days — one object per calendar day, same shape as Daily
console.log(data.days.length); // 30
console.log(data.days[0].tithi[0].name); // "Trayodashi"
console.log(data.days[0].sun.rise); // "01-04-2026 05:46:10"import requests
resp = requests.post(
"https://panchang.devdarsha.com/v1/panchang/monthly",
headers={"X-Api-Key": "YOUR_API_KEY"},
json={"year": 2026, "month": 4, "city_id": "ujjain"}
)
data = resp.json()["data"]
print(len(data["days"])) # 30
print(data["days"][0]["tithi"][0]["name"]) # TrayodashiSample Response (condensed)
April 2026, Ujjain — first day shown; 29 more follow in the days array.
{
"data": {
"year": 2026,
"month": 4,
"city": "Ujjain",
"days": [
{
"date": "2026-04-01",
"tithi": [{ "name": "Trayodashi", "paksha": "Krishna" }],
"nakshatra":[{ "name": "Purva Bhadrapada" }],
"sun": { "rise": "01-04-2026 05:46:10", "set": "01-04-2026 18:04:30" },
"festivals":{ "total": 0, "data": [] }
}
// ... 29 more day objects
]
},
"meta": {
"version": "v1",
"computed_at": "2026-04-01T00:00:00.000Z",
"resolved_timezone": "Asia/Kolkata",
"data_source": "engine",
"cache_age_seconds": 0
}
}Yearly Panchang Sapphire+
Content-Type: application/json. Query-string parameters are also accepted and take precedence when both are present.Returns Panchang data for every day of a full calendar year. The response contains all 365 (or 366) daily Panchang objects for the given year and city. Typical use: year-view calendar apps, annual festival lists, or pre-caching a year of data for fast rendering.
Quota cost: 12 requests flat per call regardless of year length. Available on Sapphire and Emerald plans only.
Request Body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
city_id | string | Required | City slug, e.g. ujjain |
year | integer | Required | 4-digit year, e.g. 2026 |
faith_filter | string | Optional | Same values as Daily — filters festival data |
Authenticate with the X-Api-Key header.
Example Request
curl -X POST "https://panchang.devdarsha.com/v1/panchang/yearly" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"year":2026,"city_id":"ujjain"}'const res = await fetch("https://panchang.devdarsha.com/v1/panchang/yearly", {
method: "POST",
headers: {
"X-Api-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({ year: 2026, city_id: "ujjain" })
});
const { data } = await res.json();
// data.months — array of 12 month objects, each with a days array
console.log(data.months.length); // 12
console.log(data.months[0].month_name); // "January"
console.log(data.months[0].days[0].tithi[0].name); // first day tithiimport requests
resp = requests.post(
"https://panchang.devdarsha.com/v1/panchang/yearly",
headers={"X-Api-Key": "YOUR_API_KEY"},
json={"year": 2026, "city_id": "ujjain"}
)
data = resp.json()["data"]
print(len(data["months"])) # 12
print(data["months"][0]["month_name"]) # January
print(data["months"][0]["days"][0]["tithi"][0]["name"])Sample Response (condensed)
Full year 2026, Ujjain — January shown; 11 more month objects follow.
{
"data": {
"year": 2026,
"months": [
{
"month": 1,
"month_name": "January",
"days": [
{
"date": "2026-01-01",
"tithi": [{ "name": "Dwadashi", "paksha": "Krishna" }],
"nakshatra":[{ "name": "Purva Ashadha" }],
"sun": { "rise": "01-01-2026 06:54:14", "set": "01-01-2026 17:44:32" },
"festivals":{ "total": 1, "data": [{ "name": "New Year" }] }
}
// ... 30 more day objects
]
}
// ... months 2–12
]
},
"meta": {
"version": "1.0",
"computed_at": "2026-01-01T00:00:00.000Z",
"resolved_timezone": "Asia/Kolkata",
"data_source": "live",
"cache_age_seconds": 0
}
}Demo
Returns today's Panchang for a default profile. No authentication, no quota cost. Useful for kicking the tyres or wiring up a test in your CI before you have a key. Response shape matches the Daily Panchang envelope, so you can swap to /v1/panchang/daily without changing parsing code.
curl https://panchang.devdarsha.com/v1/demo/today
Demo responses are heavily cached and may be a few seconds stale. For production traffic, use POST /v1/panchang/daily with your key.
Health Check
Returns gateway and upstream engine status. No authentication required. Always responds with X-Data-Source: live. Use this endpoint to monitor API availability in your own dashboards.
{ "status": "ok", "engine": "ok", "redis": "ok" }Status
Public status feed used by the DevDarsha status page. No authentication required. Returns current incident state, recent uptime, and degraded-mode flags. Polite polling (≥ 60 s) is recommended; this endpoint is rate-limited per IP.
{
"status": "operational",
"degraded": false,
"incidents": [],
"uptime_30d": 99.98,
"checked_at": "2026-04-29T10:00:00Z"
}Possible status values: operational, degraded, partial_outage, major_outage, maintenance. When degraded is true, regular API responses also carry X-Degraded-* headers — see Response Headers.
Accuracy Manifest
Returns a signed JSON document describing the public release-validation snapshot for DevDarsha Engine v5.0.0. No authentication required. Responses are cached for 24 hours and include a SHA-256 hash for tamper detection.
Use this endpoint to verify the public validation boundary before going live, or to display release-corpus pass rates in your own dashboard.
Release statement: Engine v5.0.0 is production-ready for deterministic panchang generation across the 2020-2030 launch corpus, with 100% pass rate on structural, range, ordering, muhurat, choghadiya, and festival-emission invariants across 28,126 profile-days.
The four sections
| Section key | What it covers | Public validation method |
|---|---|---|
sun_moon | Sunrise and sunset calculation integrity | Deterministic release-validation invariant sweep |
tithi_etc | Tithi, nakshatra, yoga, karana | Deterministic release-validation invariant sweep |
muhurat | Required muhurat windows and choghadiya slot ordering | Deterministic release-validation invariant sweep |
festivals | Festival emission validity and daily engine stability | Deterministic release-validation invariant sweep |
Example request
curl https://panchang.devdarsha.com/v1/accuracy/manifest
Response shape
{
"schema": "devdarsha-public-accuracy-manifest-v2",
"generated_at": "2026-05-10T08:51:12.551Z",
"snapshot_date": "2026-05-10",
"engine_version": "5.0.0",
"ayanamsa": "Lahiri 1955",
"system": "Purnimanta",
"profiles": ["Kolkata", "Mumbai", "Delhi", "..."],
"window": {
"start_date": "2020-01-01",
"end_date": "2030-12-31",
"profile_day_count": 28126
},
"sections": {
"sun_moon": { "tested": 56252, "passed": 56252, "pass_rate": 100 },
"tithi_etc": { "tested": 112504, "passed": 112504, "pass_rate": 100 },
"muhurat": { "tested": 56252, "passed": 56252, "pass_rate": 100 },
"festivals": { "tested": 28126, "passed": 28126, "pass_rate": 100 }
},
"hash": "sha256:a1b2c3d4..."
}Response fields
| Field | Type | Description |
|---|---|---|
window.profile_day_count | integer | Number of date/profile combinations covered by the release-validation corpus |
sections[key].tested | integer | Number of validation checks run for this section |
sections[key].passed | integer | Number of validation checks that passed |
sections[key].pass_rate | number | Public pass rate for the covered release-validation corpus |
sections[key].coverage | string | Plain-language summary of the public validation boundary for that section |
validation_boundary | object | Public scope, evidence policy, and high-risk-use note for the manifest |
hash | string | SHA-256 of the manifest body (excluding the hash field itself). Compare with the static copy at /accuracy-manifest.sig to detect tampering. |
https://panchang.devdarsha.com/accuracy-manifest. The raw JSON is available at /accuracy-manifest.sig and can be downloaded from the viewer when needed. Public artifacts summarize release validation; detailed internal artifacts and retained audit evidence are maintained by DevDarsha.Feedback Endpoint
Submit feedback about the API. Does not require authentication.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Required | Your name |
email | string | Required | Your email |
plan | string | Required | free | amethyst | sapphire | emerald | none |
message | string | Required | Feedback text (10–2000 chars) |
Contact
Send a sales, partnership, or support enquiry. Mirrors the contact form on the website. No authentication required. Submissions are rate-limited per IP and per email.
Request Body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Required | Your name (2–120 chars). |
email | string | Required | Reply-to email. |
subject | string | Optional | Short topic line. |
message | string | Required | Body of the enquiry (10–4000 chars). |
topic | string | Optional | sales, support, partnership, or other. |
Example Request
curl -X POST "https://panchang.devdarsha.com/v1/contact" \
-H "Content-Type: application/json" \
-d '{"name":"Aanya","email":"[email protected]","topic":"sales","message":"Volume pricing for 5M calls/month?"}'Responds with 202 Accepted on success. Replies usually arrive within 1 business day at the email you supplied.
Billing & Webhooks
Most users will manage subscriptions, invoices, and payment methods from the Dashboard. The endpoints below let you do the same programmatically and let payment providers notify DevDarsha when something changes.
Operations
| Operation | Method & path | Description |
|---|---|---|
| Start checkout | POST /v1/billing/checkout | Create a hosted checkout session for a paid plan. Returns a redirect URL. |
| Subscription status | POST /v1/billing/subscription | Current plan, renewal date, trial state, payment method preview. |
| List invoices | POST /v1/billing/invoices | Past invoices with INR amount and PDF link. (GST line items will be added once GST registration is active.) |
| Cancel | POST /v1/billing/cancel | Cancel at end of the current billing period. |
| Webhooks | POST /v1/billing/webhook | Receives events from your configured payment provider — see below. |
All operations except webhook require an authenticated admin key.
Start a checkout
curl -X POST "https://panchang.devdarsha.com/v1/billing/checkout" \
-H "X-Api-Key: YOUR_ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{"plan":"sapphire","return_url":"https://example.com/billing/done"}'Checkout fields
| Field | Type | Required | Description |
|---|---|---|---|
plan | string | Required | amethyst, sapphire, or emerald. |
return_url | string | Required | HTTPS URL the customer is sent to after checkout completes or is cancelled. |
Webhook events
Configure your webhook endpoint in the Dashboard. DevDarsha forwards normalized billing events as JSON. Always verify the X-Webhook-Signature header against your webhook secret before trusting the body. Events are at-least-once — make handlers idempotent on event.id.
| Event | When |
|---|---|
subscription.activated | Trial converted or first payment captured. |
subscription.renewed | Recurring payment succeeded. |
subscription.cancelled | User cancelled or trial ended without a payment method. |
invoice.paid | An invoice was paid in full. |
invoice.payment_failed | A scheduled charge failed; retry will follow. |
plan.changed | User upgraded or downgraded. |
invoice.paid events will be extended to include the GSTIN, HSN/SAC code, and tax breakdown, and this section will be updated. See the Terms of Service and Refund Policy for current billing details.Response Envelope
All successful responses use this shape:
{
"data": { /* endpoint-specific payload */ },
"meta": {
"version": "1.0.0",
"computed_at": "2026-03-27T00:00:00.000Z",
"resolved_timezone": "Asia/Kolkata",
"data_source": "engine",
"cache_age_seconds": 0
}
}Note: meta.version may appear as "1.0", "1.0.0", or "v1" depending on the endpoint — all refer to API version 1. Use the URL path (/v1/...) for version routing, not this field.
Error responses always use:
{
"error": "snake_case_code",
"message": "Human-readable description.",
"docs_url": "https://platform.devdarsha.com/documentation#errors"
}Error Codes
| HTTP | error | Meaning |
|---|---|---|
| 400 | missing_parameter | A required parameter is absent (usually date) |
| 400 | invalid_date | Date format is not YYYY-MM-DD or is out of range |
| 400 | invalid_json | POST body is malformed JSON |
| 400 | invalid_parameter | A parameter value is invalid (e.g. month out of 1-12) |
| 400 | missing_location | Neither city_id nor both lat and lon were provided |
| 400 | request_too_large | The requested date range is too large to process |
| 401 | missing_api_key | No api_key provided |
| 401 | invalid_api_key | Key not found or revoked |
| 403 | plan_required | Your plan does not include this endpoint |
| 403 | coordinate_access_restricted | Coordinate (lat/lon) lookup needs Amethyst or above; Free is city_id only |
| 403 | free_demo_date_window_exceeded | Free is limited to near-term demo dates (today-3 .. today+7) |
| 403 | public_date_window_exceeded | Paid public access supports dates from 2025-01-01 through 2030-12-31 |
| 403 | key_suspended / account_suspended / key_expired | The API key or account is suspended or expired |
| 403 | subscription_lapsed | Subscription has lapsed; renew to restore access |
| 405 | method_not_allowed | Wrong HTTP method for this route |
| 429 | monthly_limit_exceeded | Monthly request quota exhausted |
| 429 | rate_limit_exceeded | Per-minute rate limit hit |
| 429 | daily_burst_limit_exceeded | Per-day burst limit hit |
| 429 | date_limit_exceeded | Too many unique dates queried today |
| 429 | coverage_limit_exceeded | Monthly distinct location-date coverage limit reached |
| 429 | coverage_daily_limit_exceeded | Daily distinct location-date coverage ceiling reached |
| 429 | city_year_cap_exceeded | Distinct city-year cap reached for the yearly endpoint this month |
| 429 | ip_abuse_detected | Too many keys created/used from one IP |
| 502 | upstream_error | Engine returned an unexpected error |
| 503 | service_unavailable | Gateway is in degraded mode |
| 503 | coverage_enforcement_unavailable | Coverage enforcement is temporarily unavailable; retry shortly |
City IDs
Panchang API supports 5,681 cities across 67 countries, covering India and the global Hindu diaspora - including the USA, Canada, UK, Malaysia, Bangladesh, and more. Pass city_id as a lowercase slug for any supported city.
city_id - Simple
Named city lookup
Use a pre-defined slug for any of the 5,681 supported cities. Fastest, most reliable for known locations.
{ "city_id": "mumbai" }lat + lon - Precise
Coordinate lookup
Use decimal degree coordinates for any location worldwide. Best for custom or unlisted locations. Amethyst+ plans only.
{ "lat": 19.0760, "lon": 72.8777 }Common city_id values
| city_id | City | State |
|---|---|---|
kolkata | Kolkata | West Bengal |
mumbai | Mumbai | Maharashtra |
delhi | New Delhi | Delhi |
bangalore | Bengaluru | Karnataka |
chennai | Chennai | Tamil Nadu |
hyderabad | Hyderabad | Telangana |
ahmedabad | Ahmedabad | Gujarat |
pune | Pune | Maharashtra |
jaipur | Jaipur | Rajasthan |
varanasi | Varanasi | Uttar Pradesh |
Use lat + lon for worldwide coordinates on Amethyst+. To request a named city_id
Contact us on : [email protected].
Faith Filter
Use faith_filter to return only festivals relevant to a specific tradition:
| Value | Description |
|---|---|
all | Return all festivals (default) |
hindu | Hindu festivals only |
islamic | Islamic festivals only |
sikh | Sikh festivals and Gurpurabs |
buddhist | Buddhist observances |
christian | Christian festivals only |
Versioning & Sunset Policy
The current API version is v1. All routes are prefixed /v1/. We use URI versioning — when a backwards-incompatible version exists, you opt in by changing the prefix (e.g. /v2/...), never by toggling a header.
- Current: No warnings. Fully supported.
- Deprecated: Minimum 12-month notice for breaking changes. Responses carry:
Sunset— RFC 8594 HTTP date when the version stops responding.Link: <...>; rel="successor-version"— pointer to the recommended next version.X-API-Deprecated: trueandX-API-Sunset-Datefor older clients.- A
dev_notesentry on every response with migration guidance.
- Sunset: Returns
410 Gonewith a JSON error body and aLinkheader pointing at the successor version. - Security emergencies: A version may be sunset on shorter notice if there is a critical security issue with no safe forward fix.
Full versioning policy: api-versioning-policy
Rate Limits
| Plan | Monthly calls | Calls/minute | Overage |
|---|---|---|---|
| Free | 2,000 | 10 | Not available |
| Amethyst | 50,000 | 60 | ₹10 / 1,000 calls |
| Sapphire | 3,00,000 | 180 | ₹5 / 1,000 calls |
| Emerald | 20,00,000 | 600 | ₹2.50 / 1,000 calls |
When rate-limited, a Retry-After header specifies seconds until the window resets. Quotas reset on the 1st of each month. To check live consumption from your app, call GET /v1/usage.
Response Headers
| Header | Description |
|---|---|
X-Quota-Cost | Requests consumed by this call (1 for daily, 1 for monthly, 12 for yearly) |
X-Data-Source | cache or engine or live |
X-Cache-Age | Seconds since the cached result was generated |
X-Request-ID | Unique UUID for this request — include in support tickets |
X-RateLimit-Limit | Your per-minute limit |
X-RateLimit-Remaining | Requests remaining this minute |
X-RateLimit-Reset | Unix timestamp when the window resets |
Retry-After | Present on 429 responses. Seconds to wait before retrying. |
X-Degraded | true when the API is serving from a fallback path (e.g. cache-only). Body is still valid; freshness may be reduced. |
X-Degraded-Reason | Short slug describing why, e.g. cache_only, partial_outage. Mirrors the /status feed. |
Sunset | Present on deprecated versions. RFC 8594 HTTP date when this version stops responding. |
Link | Present on deprecated/sunset versions with rel="successor-version" pointing at the recommended replacement. |
Cache-Control | Always private, no-store |
Panchang Glossary
A quick reference for the Sanskrit and Vedic calendar terms used throughout this API and its responses.
| Term | Meaning |
|---|---|
| Tithi | Lunar day, derived from the angular separation between the moon and sun. There are 30 tithis in a lunar month. |
| Nakshatra | One of 27 lunar mansions - the segment of sky the moon occupies on a given day. |
| Yoga | A sum-based angular relationship between the sun and moon. There are 27 yogas, each ranging from auspicious to inauspicious. |
| Karana | A half-tithi subdivision. Each tithi contains two karanas, each with its own quality. |
| Paksha | Shukla = waxing (bright) fortnight. Krishna = waning (dark) fortnight of the lunar month. |
| Vara | The weekday in the traditional Hindu calendar (e.g. Somavar = Monday, Mangalavar = Tuesday). |
| Muhurta | An auspicious time window calculated astronomically. Used to schedule ceremonies, travel, and important events. |
| Choghadiya | Vedic time-division system splitting the day and night into 8 slots each, classified as Very Auspicious, Auspicious, Neutral, or Inauspicious. |
| Sankranti | Solar ingress - the moment the sun moves from one zodiac sign (rashi) to the next. Makar Sankranti is the most widely observed. |
| Ayanamsha (Lahiri) | The offset applied to convert tropical (Western) longitudes to sidereal (Vedic) longitudes. Panchang API uses the Lahiri value - the standard adopted by the Government of India's Calendar Reform Committee. |