API documentation
Everything under /ext/v1 · One JSON envelope · One key header
Quick start
curl "https://api.parvchakra.com/ext/v1/panchang/day?date=2026-11-08&city=delhi" \
-H "X-API-Key: pc_live_YOUR_KEY"
# or use Authorization header
curl "https://api.parvchakra.com/ext/v1/panchang/day?date=2026-11-08&city=delhi" \
-H "Authorization: Bearer pc_live_YOUR_KEY"
Get a free API key → (500 calls/month, no card)
Authentication
Send your key in either header:
X-API-Key: pc_live_a1b2c3… # or Authorization: Bearer pc_live_a1b2c3…
Keys are shown once at creation. Test keys start with pc_test_ and count against quota like live keys — so development traffic can't become a surprise bill.
Response envelope
Every response — success or error — uses this shape:
{
"data": { … },
"meta": {
"request_id": "req_01jd…",
"computed_with": { "ayanamsa": "lahiri", "tradition": "north" }
},
"errors": []
}
On failure, data is null and errors contains objects with code and message.
Rate limits & quota
Every response carries:
X-RateLimit-Limit: 10000 X-RateLimit-Remaining: 9843 X-RateLimit-Reset: 2026-12-01T00:00:00Z X-API-Key-Id: a1b2
-1 = unlimited (Enterprise). Monthly cap exhausted → 429 with details.quota_exceeded = true. Per-minute throttle → 429 with Retry-After. Overage is never auto-charged.
Caching
Panchang answers are stable for a given date and place. The API sends ETag. Send If-None-Match and a matching request returns 304 with no body — and does not consume quota.
Endpoints
| Method | Path | Returns |
|---|---|---|
| GET | /ext/v1/panchang/day | Full panchang for a date and place: five limbs, sunrise/sunset, muhurta windows. |
| GET | /ext/v1/panchang/month | A month of day cards for a calendar grid. |
| GET | /ext/v1/panchang | Combined panchang plus festivals for the home screen shape. |
| GET | /ext/v1/muhurta/day | Every muhurta window for a day, with its reason key. |
| GET | /ext/v1/choghadiya | Day and night Choghadiya with quality bands. |
| GET | /ext/v1/muhurta/hora | The 24 planetary hours. |
| GET | /ext/v1/muhurta/find | The next windows suitable for a purpose. |
| GET | /ext/v1/aaj | Composite 'today' payload. |
| GET | /ext/v1/vrat | Vrat and festival observance list. |
| GET | /ext/v1/widget/today | Compact payload for a home-screen widget. |
| GET | /ext/v1/sun-moon | Sunrise, sunset, moonrise and moonset table. |
Error codes
| HTTP | code | Meaning |
|---|---|---|
| 401 | unauthenticated / token_invalid | Missing or unusable API key. |
| 402 | premium_required | The endpoint needs a higher tier than this key's plan. |
| 404 | not_found / unknown_city | The resource or city does not exist. |
| 422 | validation_failed | A parameter is missing or malformed; `details.fields` names it. |
| 429 | rate_limited | Monthly quota or per-minute limit reached. Read `X-RateLimit-Reset`. |
| 503 | service_unavailable | Brief maintenance. `Retry-After` says how long. |
Code samples
Python
import requests
r = requests.get(
"https://api.parvchakra.com/ext/v1/panchang/day",
params={"date": "2026-11-08", "city": "delhi"},
headers={"X-API-Key": "pc_live_…"},
timeout=10,
)
r.raise_for_status()
panchang = r.json()["data"]
print(panchang["tithi"][0]["name"], panchang["sunrise"])
Node.js
const res = await fetch(
"https://api.parvchakra.com/ext/v1/muhurta/day"
+ "?date=2026-11-08&city=jaipur",
{ headers: { "X-API-Key": process.env.PARVCHAKRA_API_KEY } }
);
if (!res.ok) {
const { errors } = await res.json();
throw new Error(errors[0].message);
}
const { data } = await res.json();
console.log(data.windows);
PHP (Laravel)
$response = Http::withHeaders([
'X-API-Key' => config('services.parvchakra.key'),
])->get(
config('services.parvchakra.url') . '/ext/v1/aaj',
['city' => 'udaipur']
);
$panchang = $response->throw()->json('data');
Support
Include meta.request_id from the failing response when contacting support — it identifies the exact call in our logs.
Email: support@parvchakra.app