Panchang and calendar
The panchang describes a day: its tithi, nakshatra, yoga and karana, the lunar month, and the times of sunrise, sunset, moonrise and moonset. All of these depend on where you are, because the Hindu day starts at local sunrise. Every panchang endpoint therefore takes a place.
One day
Section titled “One day”curl "https://api.navapatra.com/v1/panchang/day?date=2083-01-01&calendar=BS&lat=27.7172&lng=85.324" \ -H "Authorization: Bearer $NAVAPATRA_API_KEY"const url = new URL('https://api.navapatra.com/v1/panchang/day');url.search = new URLSearchParams({ date: '2083-01-01', calendar: 'BS', lat: '27.7172', lng: '85.324' }).toString();
const res = await fetch(url, { headers: { Authorization: `Bearer ${process.env.NAVAPATRA_API_KEY}` } });const day = await res.json();console.log(day.tithi.name, day.sunrise.local); // Dwadashi 2026-04-14T05:44:16+05:45import osimport requests
res = requests.get( "https://api.navapatra.com/v1/panchang/day", params={"date": "2083-01-01", "calendar": "BS", "lat": 27.7172, "lng": 85.324}, headers={"Authorization": f"Bearer {os.environ['NAVAPATRA_API_KEY']}"},)day = res.json()print(day["tithi"]["name"], day["sunrise"]["local"]) # Dwadashi 2026-04-14T05:40:27+05:45<?phprequire 'vendor/autoload.php';
$client = new GuzzleHttp\Client();$res = $client->get('https://api.navapatra.com/v1/panchang/day', [ 'query' => ['date' => '2083-01-01', 'calendar' => 'BS', 'lat' => 27.7172, 'lng' => 85.324], 'headers' => ['Authorization' => 'Bearer ' . getenv('NAVAPATRA_API_KEY')],]);$day = json_decode((string) $res->getBody(), true);echo $day['tithi']['name'], ' ', $day['sunrise']['local'], PHP_EOL;| Parameter | Required | Notes |
|---|---|---|
date |
Yes | YYYY-MM-DD |
calendar |
No | AD (default) or BS, the calendar of date |
lat, lng |
Yes | The place. Kathmandu is 27.7172, 85.324 |
tzid |
No | Overrides the zone lookup |
ayanamsha |
No | lahiri (default), lahiri_icrc, true_chitra, raman, kp |
tradition |
No | nepal (default, purnimanta) or amanta |
sunriseConvention |
No | upper_limb_refracted (default) or center_geometric |
lang, numerals |
No | Label language and digits |
The response for BS 2083 Baishakh 1 in Kathmandu (shortened to three choghadiya periods):
{ "date": "2026-04-14", "bs": { "date": "2083-01-01", "year": 2083, "month": { "index": 1, "name": "Baishakh" }, "day": 1, "status": "published", "text": "1 Baishakh 2083" }, "tzid": "Asia/Kathmandu", "sunrise": { "utc": "2026-04-13T23:55:27Z", "local": "2026-04-14T05:40:27+05:45" }, "sunset": { "utc": "2026-04-14T12:43:00Z", "local": "2026-04-14T18:28:00+05:45" }, "moonrise": { "utc": "2026-04-13T21:49:09Z", "local": "2026-04-14T03:34:09+05:45" }, "moonset": { "utc": "2026-04-14T09:30:11Z", "local": "2026-04-14T15:15:11+05:45" }, "vara": { "index": 2, "name": "Tuesday" }, "tithi": { "index": 27, "name": "Dwadashi", "start": "2026-04-13T19:39:13Z", "end": "2026-04-14T18:42:54Z", "paksha": { "id": "krishna", "index": 2, "name": "Krishna" } }, "nakshatra": { "index": 24, "name": "Shatabhisha", "start": "2026-04-13T10:33:49Z", "end": "2026-04-14T10:36:10Z" }, "yoga": { "index": 24, "name": "Shukla", "start": "2026-04-13T11:46:48Z", "end": "2026-04-14T10:09:35Z" }, "karana": { "index": 3, "name": "Kaulava", "start": "2026-04-13T19:39:13Z", "end": "2026-04-14T07:16:57Z" }, "lunarMonth": { "index": 1, "name": "Vaishakha", "start": "2026-04-02T02:12:02Z", "end": "2026-05-01T17:23:11Z", "adhik": false, "scheme": "purnimanta" }, "nepalSambat": { "year": 1146, "month": { "index": 6, "name": "Chaula" }, "paksha": { "index": 2, "name": "Ga" }, "day": 12, "adhik": false, "text": "1146 Chaula Ga 12" }, "choghadiya": { "day": [ { "period": 1, "id": "rog", "index": 7, "name": "Rog", "start": "2026-04-13T23:55:27Z", "end": "2026-04-14T01:31:23Z" }, { "period": 2, "id": "udveg", "index": 1, "name": "Udveg", "start": "2026-04-14T01:31:23Z", "end": "2026-04-14T03:07:20Z" } ], "night": [ { "period": 1, "id": "kaal", "index": 5, "name": "Kaal", "start": "2026-04-14T12:43:00Z", "end": "2026-04-14T14:06:55Z" } ] }, "meta": { "engineVersion": "0.1.0", "apiVersion": "2026-11-01", "ayanamsha": { "id": "lahiri", "degrees": 24.22586 }, "tradition": "nepal", "sunriseConvention": "upper_limb_refracted", "tzdbVersion": "unknown", "deltaTModelVersion": "iers-c01-2026.5+quad2100-v1", "bsTableVersion": "2026.10.1", "overridesVersion": null }}How to read it:
dateis always the AD date;bsgives the same day in Bikram Sambat.- Tithi, nakshatra, yoga and karana are the ones running at sunrise, with the instants they started and end. A tithi can start before sunrise and end after the next one, or be skipped entirely between two sunrises (a kshaya tithi); the start and end instants show this.
- Times for rise and set come as
{ utc, local }; the local form carries the place’s offset. Element start and end instants are UTC. sunrise,sunset,moonriseandmoonsetcan benull: the Moon does not rise every calendar day, and near the poles the Sun may not either.- Tithi indexes run 1 to 30: 1 to 15 shukla paksha, 16 to 30 krishna paksha. Index 27 is krishna Dwadashi.
Choghadiya (barbela)
Section titled “Choghadiya (barbela)”choghadiya.day has 8 periods from sunrise to sunset and choghadiya.night 8 periods from sunset to the next sunrise, each one eighth of its span. Each period has its position (period 1 to 8), a stable id and a localized name:
id |
index |
Character |
|---|---|---|
udveg |
1 | Inauspicious |
char |
2 | Neutral, good for travel |
labh |
3 | Auspicious |
amrit |
4 | Most auspicious |
kaal |
5 | Inauspicious |
shubh |
6 | Auspicious |
rog |
7 | Inauspicious |
The sequence depends on the weekday. The API returns the periods in order, so you do not need to know the rotation.
A date range
Section titled “A date range”The same parameters, with from and to (inclusive, both in calendar) instead of date. A range covers 1 to 366 days and costs one credit per started 31 days: a 31-day month is 1 credit, a full year 12. The cost is counted on the AD span, so a BS range costs the same as the matching AD dates. Choghadiya is left out unless you add include=choghadiya.
curl "https://api.navapatra.com/v1/panchang/range?from=2083-01-01&to=2083-01-31&calendar=BS&lat=27.7172&lng=85.324" \ -H "Authorization: Bearer $NAVAPATRA_API_KEY"{ "from": "2026-04-14", "to": "2026-05-14", "days": [ { "date": "2026-04-14", "bs": { "text": "1 Baishakh 2083", "...": "..." }, "tithi": { "index": 27, "name": "Dwadashi", "...": "..." }, "...": "..." } ], "meta": { "...": "..." }}A longer range, or to before from, returns 400 invalid_input. The demo key cannot call this endpoint.
BS month grid
Section titled “BS month grid”Everything a calendar view needs for one BS month: every day’s AD date, weekday and tithi at sunrise, plus the month’s bsStatus.
curl "https://api.navapatra.com/v1/calendar/month?year=2083&month=1&calendar=BS" \ -H "Authorization: Bearer $NAVAPATRA_API_KEY"{ "calendar": "BS", "year": 2083, "month": { "index": 1, "name": "Baishakh" }, "bsStatus": "published", "days": [ { "ad": "2026-04-14", "bs": { "date": "2083-01-01", "day": 1, "text": "1" }, "weekday": { "index": 2, "name": "Tuesday" }, "tithi": { "index": 27, "name": "Dwadashi", "paksha": { "id": "krishna", "index": 2, "name": "Krishna" } } } ], "meta": { "engineVersion": "0.1.0", "apiVersion": "2026-11-01", "tzdbVersion": "unknown", "deltaTModelVersion": "iers-c01-2026.5+quad2100-v1", "bsTableVersion": "2026.10.1", "overridesVersion": null, "tzid": "Asia/Kathmandu" }}Tithi at sunrise is computed for Kathmandu unless you pass lat and lng. Send both or neither: only one of them returns 400 invalid_input. tradition and lang / numerals work as above; with lang=ne, bs.text is the day in Devanagari digits, ready for a grid cell.
Convert a date
Section titled “Convert a date”GET /v1/calendar/convert turns a BS date into AD or back, with Nepal Sambat on request. See Bikram Sambat dates.
Demo key
Section titled “Demo key”With the demo key, the panchang day, month grid and Nepal Sambat conversions accept the five sample places (Pokhara, Kathmandu, Biratnagar, New Delhi, Varanasi; see the Quickstart) and any date.