Skip to content
POST/api/vrat-upavas/1 credit

Vrat and upavas

Vrat and upavas are the recurring fasting and observance days of the Hindu month, each tied to a particular tithi. This endpoint returns every occurrence of the types you ask for across a whole year, read from a precomputed table rather than calculated on the request, so a year of eighteen observance types is one indexed query. Each type is defined purely by which tithi numbers it matches, in the 1-30 scheme where 1-15 are Shukla Pratipada to Purnima, 16-29 are Krishna Pratipada to Chaturdashi and 30 is Amavasya. So `ekadashi` returns both Ekadashis of every month, `pradosham` both Trayodashis, `shivarathri` the Krishna Chaturdashi of every month (the monthly Masik Shivaratri, not only Maha Shivaratri), `sashti` and `durgashtami` and `vinayaka_chathurthi` the Shukla sixth, eighth and fourth, `kaalashtami` and `sankatahara_chathurthi` their Krishna counterparts, `amavasya` and `pournami` the new and full Moons, `sathyanarayana_puja` the full Moon, `chandra_dharshan` and `moondraam_pirai` the first and third days of the waxing Moon, and `srartha_yoga`, `ashtaka`, `manvaadhi` and `yugadhi` their own small sets of tithis. Be aware that `mahalaya_paksha` matches every tithi from 15 to 30, which means the whole dark fortnight of every lunar month rather than just the Bhadrapada Pitru Paksha. `year` and `keys` are required. Passing `latitude`, `longitude` and `timezone_as_float` as well adds two live-computed fields to each event: `moonrise`, the evening moonrise falling inside that event's tithi window at your location, and, for `vinayaka_chathurthi` rows only, `puja_muhurat` with `start`, `end` and `duration_minutes` for the Madhyahna Ganesha Puja window. Both come back null if they cannot be computed, and neither is present at all if you omit the coordinates. The response is `{data}` keyed by each requested type, each holding a chronological list of `{date, month, tithi, paksha, start_time, end_time}` where the times are the exact instants the tithi begins and ends. Dates are precomputed for 2006 to 2046 inclusive; a year outside that range returns empty lists rather than an error.

https://yogataraapi.prahlad.app/api/vrat-upavas/
Test Request

Authentication

Send your key in the X-API-Key header. Keys are server-side credentials — never put one in browser JavaScript or a mobile app.

X-API-Key: yt_live_a1b2c3d4_…
Content-Type: application/json

Request fields

FieldTypeRequiredNotes
keysarrayrequired

Which calculations to return, as a list of names. See the key table for this endpoint; an unrecognised name rejects the whole request. One call costs one credit however many keys you ask for, so request everything you need at once rather than making several calls.

amavasyaashtakachandra_dharshandurgashtamiekadashikaalashtamimahalaya_pakshamanvaadhimoondraam_piraipournamipradoshamsankatahara_chathurthi

Which observances to return. Ask for several in one call - the response is keyed by type and the cost is the same.

yearintegerrequired

Year of birth as a number, e.g. 1990. Four digits.

Four-digit year. Dates are precomputed for 2006 to 2046; outside that range the response is empty.

latitudenumber (double)optional

Latitude of the place, in decimal degrees. Positive is north, negative is south. Example: 26.9124 for Jaipur, 40.7128 for New York. Minutes and seconds are not accepted - convert first.

longitudenumber (double)optional

Longitude of the place, in decimal degrees. Positive is east, negative is west. Example: 75.7873 for Jaipur, -74.0060 for New York. Note the sign: a missing minus puts New York in China.

timezone_as_floatnumber (double)optional

UTC offset of the place, in hours, as a decimal. Example: 5.5 for India (UTC+05:30), -5 for New York in winter, 5.75 for Nepal. This is NOT validated against date_time - if the two disagree you get a successful response for the wrong moment, so derive both from the same source. Use the offset in force on that date, not today's: a summer birth in a country with daylight saving needs the summer offset.

Example request

curl -X POST https://yogataraapi.prahlad.app/api/vrat-upavas/ \
  -H "X-API-Key: $OCCULT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"year":2026,"month":9,"keys":["ekadashi","amavasya","pradosham"]}'

Response

{
  "_truncated": true,
  "_note": "Response shortened for the catalogue.",
  "preview": "{\"data\": {\"ekadashi\": [{\"date\": \"2026-01-14\", \"month\": \"Magha\", \"tithi\": \"Ekadashi\", \"paksha\": \"Krishna\", \"start_time\": \"2026-01-13T15:19:08+05:30\", \"end_time\": \"2026-01-14T17:53:57+05:30\"}, {\"date\": \"2026-01-29\", \"month\": \"Phalguna\", \"tithi\": \"Ekadashi\", \"paksha\": \"Sukla\", \"start_time\": \"2026-01-28T16:37:06+05:30\", \"end_time\": \"2026-01-29T13:56:12+05:30\"}, {\"date\": \"2026-02-13\", \"month\": \"Phalguna\", \"tithi\": \"Ekadashi\", \"paksha\": \"Krishna\", \"start_time\": \"2026-02-12T12:23:19+05:30\", \"end_time\": \"2026-02-13T14:27:04+05:30\"}, {\"date\": \"2026-02-27\", \"month\": \"Chaitra\", \"tithi\": \"Ekadashi\", \"paksha\": \"Sukla\", \"start_time\": \"2026-02-27T00:34:31+05:30\", \"end_time\": \"2026-02-27T22:33:54+05:30\"}, {\"date\": \"2026-03-15\", \"month\": \"Chaitra\", \"tithi\": \"Ekadashi\", \"paksha\": \"Krishna\", \"start_time\": \"2026-03-14T08:12:06+05:30\", \"end_time\": \"2026-03-15T09:17:39+05:30\"}, {\"date\": \"2026-03-29\", \"month\": \"Vaisakha\", \"tithi\": \"Ekadashi\", \"paksha\": \"Sukla\", \"start_time\": \"2026-03-28T08:46:49+05:30\", \"end_time\": \"2026-03-29T07:47:32+05:30\"}, {\"date\": \"2026-04-13\", \"month\": \"Vaisakha\", \"tithi\": \"Ekadashi\", \"paksha\": \"Krishna\", \"start_time\": \"2026-04-13T01:18:00+05:30\", \"end_time\": \"2026-04-14T01:09:45+05:30\"}, {\"date\": \"2026-04-27\", \"month\": \"Jyeshtha\", \"tithi\": \"Ekadashi\", \"paksha\": \"Sukla\", \"start_time\": \"2026-04-26T18:08:02+05:30\", \"end_time\": \"2026-04-27T18:17:03+05:30\"}, {\"date\": \"2026-05-13\", \"month\": \"Jyeshtha\", \"tithi\": \"Ekadashi\", \"paksha\": \"Krishna\", \"start_time\": \"2026-05-12T14:53:26+05:30\", \"end_time\": \"2026-05-13T13:30:53+05:30\"}, {\"date\": \"2026-05-26\", \"month\": \"Ashadha\", \"tithi\": \"Ekadashi\", \"paksha\": \"Sukla\", \"start_time\": \"2026-05-26T05:11:58+05:30\", \"end_time\": \"2026-05-27T06:22:50+05:30\"}, {\"date\": \"2026-05-27\", \"month\": \"Ashadha\", \"tithi\": \"Ekadashi\", \"paksha\": \"Sukla\", \"start_time\": \"2026-05-26T05:11:58+05:30\", \"end_time\": \"2026-05-27T06:22:50+05:30\"}, {\"date\": \"2026-06-11\", \"month\": \"Ashadha\", \"tithi\": \"Ekadashi\", \"paksha\": \"Krishna\", \"start_time\": \"2026-06-11T00:58:46+05:30\", \"end_time\": \"2026-06-11T22:37:13+05:30\"}, {\"date\": \"2026-06-25\", \"month\": \"Ashadha\", \"tithi\": \"Ekadashi\", \"paksha\": \"Sukla\", \"start_time\": \"2026-06-24T18:13:24+05:30\", \"end_time\": \"2026-06-25T20:10:27+05:30\"}, {\"date\": \"2026-07-25\", \"month\": \"Shravana\", \"tithi\": \"Ekadashi\", \"paksha\": \"Sukla\", \"start_time\": \"2026-07-24T09:13:54+05:30\", \"end_time\": \"2026-07-25T11:35:24+05:30\"}, {\"date\": \"2026-08-09\", \"month\": \"Shravana\", \"tithi\": \"Ekadashi\", \"paksha\": \"Krishna\", \"start_time\": \"2026-08-08T14:00:14+05:30\", \"end_time\": \"2026-08-09T11:05:59+05:30\"}, {\"date\": \"2026-08-23\", \"month\": \"Bhadrapada\", \"tithi\": \"Ekadashi\", \"paksha\": \"Sukla\", \"start_time\": \"2026-08-23T02:01:28+05:30\", \"end_time\": \"2026-08-24T04:19:48+05:30\"}, {\"date\": \"2026-09-07\", \"month\": \"Bhadrapada\", \"tithi\": \"Ekadashi\", \"paksha\": \"Krishna\", \"start_time\": \"2026-09-06T19:30:12+05:30\", \"end_time\": \"2026-09-07T17:05:07+05:30\"}, {\"date\": \"2026-09-22\", \"month\": \"Ashwin\", \"tithi\": \"Ekadashi\", \"paksha\": \"Sukla\", \"start_time\": \"2026-09-21T20:01:57+05:30\", \"end_time\": \"2026-09-22T21:44:20+05:30\"}, {\"date\": \"2026-10-06\", \"month\": \"Ashwin\", \"tithi\": \"Ekadashi\", \"paksha\": \"Krishna\", \"start_time\": \"2026-10-06T02:08:30+05:30\", \"end_time\": \"2026-10-07T00:35:31+05:30\"}, {\"date\": \"2026-10-22\", \"month\": \"Kartika\", \"tithi\": \"Ekadashi\", \"paksha\": \"Sukla\", \"start_time\": \"2026-10-21T14:12:55+05:30\", \"end_time\": \"2026-10-22T14:49:06+05:30\"}, {\"date\": \"2026-11-05\", \"month\": \"Kartika\", \"tithi\": \"Ekadashi\", \"paksha\": \"Krishna\", \"start_time\": \"2026-11-04T11:04:18+05:30\", \"end_time\": \"2026-11-05T10:36:40+05:30\"}, {\"date\": \"2026-11-21\", \"month\": \"Margashirsha\", \"tithi\": \"Ekadashi\", \"paksha\": \"Sukla\", \"start_time\": \"2026-11-20T07:16:41+05:30\", \"end_time\": \"2026-11-21T06:32:32+05:30\"}, {\"date\": \"2026-12-04\", \"month\": \"Margashirsha\", \"tithi\": \"Ekadashi\", \"paksha\": \"Krishna\", \"start_time\": \"2026-12-03T23:04:36+05:30\", \"end_time\": \"2026-12-04T23:45:50+05:30\"}, {\"date\": \"2026-12-20\", \"month\": \"Pausha\", \"tithi\": \"Ekadashi\", \"paksha\""
}

Captured from a real call using the exact request above. Results sit under data.

Errors

Metering errors return { "error": "…", "message": "<code>", "is_error": true }. Show error to people and branch on message. See the error reference.