curl -X POST https://yogataraapi.prahlad.app/api/astro/panchanga/ \
-H "X-API-Key: $OCCULT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"date_time":"2026-06-02T06:30:52.786Z","keys":["midday"],"latitude":26.849,"longitude":75.768,"timezone_as_float":5.5,"samvata_type":"shaka","mode":0,"mean_anomaly":0,"eccentricity":1,"tolerance":0.000001,"gulika_rises_at":"beginning","mandi_rises_at":"middle","kala_mrityu_rise_at":"middle","dhuma_vyatipata_relation":"360_minus_dhuma"}'The panchanga is the Hindu almanac for one moment at one place: five 'limbs' — tithi, vaara, nakshatra, yoga and karana — plus everything else a printed panchang carries. This is the largest endpoint in the API, with fifty-seven keys, and most callers use a handful. Start with tithi, vaara, nakshatra_segments, yogam and karana for the five limbs, and day_length, night_length, midday and midnight for the day's frame. The *_segments keys — tithi_segments, karana_segments, yoga_segments, nakshatra_segments — differ from their singular counterparts in a way that is easy to get wrong: the singular key answers 'what is in force at this instant', while the segments key lists every period touching the whole local calendar day with exact start and end times, which is what a calendar page needs. The rest falls into groups. Time divisions: choghadiya and gauri_choghadiya into eighths, hora into planetary hours, do_ghati into the thirty muhurtas, trikalam into thirds. Named windows: abhijit_muhurta, brahma_muhurta, vijaya_muhurta, nishita_muhurta, godhuli_muhurta, amrit_kalam and the two sandhyas against rahu_kaalam, yamaganda_kaalam, gulika_kaalam and durmuhurata. Calendar: lunar_month and lunar_month_poornima (the same month under the two reckonings), shaka_samvat, vikram_samvat, kali_samvat, samvatsara_name, ritu, sankranti_dates and tamil_solar_month_date. Positions rather than times: upagraha_longitudes, special_longitudes, lagnas, sree_lagna and the two bhaava_madhya variants. Day-quality verdicts: tarabala, chandrabalam, panchaka_rahita, disha_shool, agni_vasa_segments, shiva_vasa_segments, yogas and shunya_nakshatra. Every call needs date_time and timezone_as_float, and anything that depends on sunrise also needs latitude and longitude. Several optional fields change the answer rather than the formatting: samvata_type is required by samvatsara_name, mode selects how ritu is derived, and gulika_rises_at, mandi_rises_at, gulika_portion, mandi_portion, kala_mrityu_rise_at and dhuma_vyatipata_relation select between competing classical conventions for the upagraha positions. One call costs one credit however many keys you ask for, so request a whole page's worth at once.
| Field | Type | Required | Notes |
|---|---|---|---|
| date_time | string (date-time) | required | The moment to calculate for, ISO 8601. ALWAYS include an offset or a trailing Z - a value with no zone is read as Asia/Kolkata (UTC+05:30), not UTC, and can return the previous day's result with a 200. '2026-09-01T06:00:00Z' and '2026-09-01 06:00:00' are different instants and give different answers. |
| keys | array | required | 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. |
| timezone_as_float | number (double) | required | 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. min -12 · max 14 |
| dhuma_vyatipata_relation | string | optional | 360_minus_dhumadhuma_plus_53_20Default '360_minus_dhuma'. Forwarded at. |
| eccentric_anomaly | number (double) | optional | |
| eccentricity | number (double) | optional | |
| gulika_portion | string | optional | saturneighthDefault 'saturn'. Forwarded at. |
| gulika_rises_at | string | optional | beginningmiddleendDefault 'beginning'. Forwarded to the Panchanga engine object at. |
| kala_mrityu_rise_at | string | optional | beginningmiddleendDefault 'middle'. Forwarded at. |
| latitude | number (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. min -89.9 · max 89.9 |
| longitude | number (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. min -180 · max 180 |
| mandi_portion | string | optional | saturneighthDefault 'saturn'. Forwarded at. |
| mandi_rises_at | string | optional | beginningmiddleendDefault 'middle'. Forwarded at. |
| mean_anomaly | number (double) | optional | |
| mode | string | optional | vedicdrikUsed only by the 'ritu' key. 'vedic' derives the season from the lunar month, 'drik' from the Sun's tropical sign. Engine default is 'drik'. WARNING: the function does not raise on a bad value - any other string silently falls through both branches and the key returns null (the shipped catalogue sample even sends mode=0 and gets a 200 with a null result). |
| nakshatras | string | optional | specialIn the engine the only meaningful value is the literal string 'special', which swaps the 27-entry `nakshatras` table for the 28-entry `nakshatras_special` table that includes Abhijit and uses modern spellings. Because it is never forwarded, the 'yogas' key of this endpoint currently 500s with "'Panchanga' object has no attribute 'nakshatras'". |
| samvata_type | string | optional | shakavikramUsed only by the 'samvatsara_name' key. |
| tolerance | number (double) | optional |
Ask for exactly the calculations you want by listing them in keys. An unknown key rejects the whole request, and you are charged 1 credit however many you ask for — so batch them.
| Key | Extra fields needed | Description | |
|---|---|---|---|
| abhijit_muhurta | — | Abhijit: the eighth of the fifteen day muhurtas, straddling the midpoint of the daylight — the general-purpose auspicious window. Returns {start, end}. | |
| agni_vasa_segments | — | Where Agni, the fire deity, is said to reside — the check made before a homa, derived from tithi and weekday and therefore changing when the tithi does. Returns a list of {state, is_patala, start_time, end_time}, one per tithi segment of the day, where state is 'Prithvi (Earth)', 'Akasha (Heaven)' or 'Patala (Nadir)'. Homas with a desired outcome are meant to be performed while Agni is on Prithvi; is_patala flags the state some panchangs relabel Bhadravasa. | |
| amrit_kalam | — | The Gowri Panchangam periods of type Amrit touching the day — the most favourable rows of that table. Returns a list of {start, end}, normally two, one in the daylight and one in the night. Derived from the same weekday tables as gauri_choghadiya, and unrelated to the nakshatra-based Amrita Gadiya of some other panchangs. | |
| bhaava_madhya_sripati | — | The twelve cusps in the same {degree, sign, minutes, seconds, nakshatra, pada} shape as bhaava_madhya_swe. Although the Sripati system is classically a quadrant division, this implementation takes only the ascendant from it and then adds thirty degrees repeatedly, so for a given moment it returns the same twelve values as bhaava_madhya_swe. | |
| bhaava_madhya_swe | — | The twelve house cusps from Swiss Ephemeris on the equal-house system in the sidereal zodiac, first house first. Returns a list of twelve objects, each {degree, sign, minutes, seconds, nakshatra, pada}, sign being a two-letter abbreviation such as 'Ar' or 'Cp'. | |
| brahma_muhurta | — | Brahma Muhurta: the last two muhurtas of the night before sunrise, each a fifteenth of the night length — the traditional time for study, prayer and meditation. Returns {start, end}. | |
| calcualte_special_tithi | — | The tithi with its classical special names attached: the same object as the tithi key plus a special_name field, holding a comma-separated string of every label the day's tithi qualifies for, or null when none does. In practice the labels that fire are the ones keyed on the tithi being current at sunrise or at midday (Udayayvapini, Madhyanaha) and the Amavasya-specific ones (Sinivaali, Vriddhigami); many entries in the underlying table are keyed to Telugu tithi names that this endpoint's own tithi calculation does not produce, so they never match. Note the key name is spelt with the transposition shown. | |
| chandrabalam | — | Chandra Bala: which of the day's rising signs are well placed relative to the Moon's current sign, and so favourable for starting something. Returns a list of sign names in Aries-to-Pisces order, typically six of the twelve, taken from the udaya_lagna_muhurta windows that begin before the next sunrise. | |
| choghadiya | — | The Choghadiya periods: the daylight and the night each split into eight equal parts, named in a rotation that starts from the weekday's own Choghadiya. Returns {day_choghadiyas, night_choghadiyas, current_choghadiya, day_periods, night_periods}. The two name lists hold eight entries each — the seven-name cycle rotated to the day's starting name, with that name repeated at the end — day_periods and night_periods give the same eight as {name, start, end}, and current_choghadiya is the name covering the requested instant. | |
| day_length | — | Sunset minus sunrise for the day the requested moment falls in, as a duration in seconds. Returned as a JSON STRING, not a number - "48927.0" - so parse it before doing arithmetic. Most of the day-divided values on this endpoint — choghadiya, hora, rahu_kaalam, the day muhurtas — are eighths, twelfths or fifteenths of this figure. | |
| disha_shool | — | The direction to avoid travelling towards today, a function of the weekday alone. A single string: East, South, West, North, or one of the four intercardinal directions. | |
| do_ghati | — | The full table of thirty muhurtas — fifteen dividing sunrise to sunset and fifteen dividing sunset to the next sunrise. Returns {day_muhurtas, night_muhurtas, current}. Each muhurta is {index, number, muhurta, auspicious, name, division, special, start, end}: muhurta is the presiding deity, number its 1-30 position across the whole day and night, name the associated nakshatra, division the part of the day (Pratah, Sangava, Madhyahna and so on), auspicious a boolean, and special flags the named windows such as Abhijit. current is the entry containing the requested instant, or null. | |
| durmuhurata | — | Durmuhurta: the one or two short unfavourable windows of the day. Returns {first, second, interval}, where first and second are ISO timestamps and second is null on the weekdays that have only one. `interval` is the length of each in seconds and, like the other durations here, is a JSON STRING - "2880.0" for the usual 48 minutes. Note that the offsets from sunrise are fixed clock hours read from a weekday table, not proportional divisions of the day length. | |
| eccentric_anomaly | mean_anomaly, eccentricity, tolerance | A general orbital-mechanics helper rather than an astrological quantity: solves Kepler's equation by Newton iteration. Takes mean_anomaly in degrees, eccentricity, and an optional tolerance (default 1e-6), and returns a single number in degrees. | |
| gauri_choghadiya | — | Gowri Panchangam, the South Indian eight-fold division used in Tamil practice: eight day and eight night periods, each an eighth of the daylight or the night, each named and marked good or bad from a weekday-indexed table. Returns {day_gowri, night_gowri}, each a list of eight {name, status, start, end}, where status is 'Good' or 'Bad'. | |
| godhuli_muhurta | — | Godhuli, the cow-dust hour around sunset: from a quarter of a day muhurta before sunset to a quarter of a night muhurta after it. Returns {start, end}. | |
| gulika_kaalam | — | Gulika Kaalam, also called Kulika: the eighth of the daylight assigned to Saturn's shadow. Unlike the other two it is treated as favourable for things meant to last or to repeat. Returns {gulika_start, gulika_end}. Distinct from the 'gulika' entry in special_longitudes, which is a zodiac position rather than a time window. | |
| hora | — | The twenty-four planetary hours: twelve equal divisions of the daylight and twelve of the night, each ruled by a planet in the classical order beginning from the weekday's own lord. Returns {day_horas, night_horas}, each a list of twelve {planet, start, end}. Day and night horas are unequal in length except at the equinoxes. | |
| kali_samvat | — | The Kali Yuga year, derived as shaka_samvat plus 3179. A single integer. | |
| karana | — | The karana in force at the requested instant — half a tithi, six degrees of Moon-minus-Sun elongation. Returns one of eleven names: the seven movable ones Bava, Balava, Kaulava, Taitula, Garaja, Vanija and Vishti, and the four fixed ones Kimstughna, Shakuni, Chatushpada and Naga. Vishti is the one usually called Bhadra and avoided. | |
| karana_segments | — | Every karana period overlapping the local calendar day, as a list of {name, start_time, end_time} in order. A karana runs eleven to thirteen hours, so expect two or three entries per day. | |
| lagnas | — | Five special ascendants that advance faster than the rising sign, all measured from sunrise. Returns an object with 'Bhava Lagna' (one sign every two hours), 'Hora Lagna' (one sign an hour, read for earnings), 'Ghati Lagna' (one sign every twenty-four minutes, read for status and authority), 'Indu Lagna' (the wealth point built from the ninth lords counted from the ascendant and from the Moon) and 'Bhrigu Lagna' (the Moon-Rahu midpoint, usually called Bhrigu Bindu), each {degree, sign, minutes, seconds, nakshatra, pada}. | |
| lunar_month | — | The amanta lunar month containing the requested date — new moon to new moon — named from the Moon's sign at the new moon that opened it. A single string from the twelve, Vaisakha through Chaitra. Adhika (leap) months are not flagged separately. | |
| lunar_month_poornima | — | The same month under purnimanta reckoning, running from one full moon to the next and named from the Sun's sign at the opening full moon. A single string. Northern Indian calendars use this, and during the dark fortnight it names the month differently from lunar_month for the same day. | |
| lunar_phase | — | The Sun-to-Moon elongation and which fortnight it puts you in. Returns {paksha, moon_phase}, where moon_phase is the angle in degrees from 0 to 360 and paksha is 'Shukla' below 180 and 'Krishna' at or above it. | |
| midday | — | Local apparent noon — the moment the Sun crosses the upper meridian at the place given, which sits a few minutes either side of clock noon. A single timestamp at the offset passed in timezone_as_float. | |
| midnight | — | The Sun's lower meridian transit, or true local midnight. A single timestamp at the requested offset. This is not the same as the midpoint of the night between sunset and sunrise, which is what nishita_muhurta is built around. | |
| nakshatra_segments | — | Every Moon nakshatra overlapping the local calendar day, as a list of {name, start_time, end_time}. Boundaries are exact Moon-longitude crossings found by bisection. Names use the modern spellings — Shatabhisha, Purva Bhadrapada — rather than the older transliterations some other endpoints in this API use. | |
| night_length | — | Sunset to the next sunrise, as a duration in seconds, and like day_length returned as a JSON STRING rather than a number - "37464.0". The counterpart to day_length, and the basis for the night halves of choghadiya, hora and do_ghati, and for brahma_muhurta and nishita_muhurta. | |
| nishita_muhurta | — | Nishita, one ghati either side of the midpoint of the night between sunset and the next sunrise, a ghati here being a thirtieth of the night length. Returns {start, end}. The middle of the night is not the same instant as midnight. | |
| panchaka_rahita | — | The day divided into windows, each labelled with the panchaka it falls under, from the classical (tithi + nakshatra + weekday + rising sign) mod 9 rule. Returns a list of {panchaka, start, end} running sunrise to the next sunrise, where panchaka is null for a clean window and otherwise one of 'Mrityu Panchaka', 'Agni Panchaka', 'Raja Panchaka', 'Chora Panchaka' or 'Roga Panchaka'. Windows break at every rising-sign change and at every tithi or nakshatra change in between, so around fourteen entries is typical. | |
| pratah_sandhya | — | The morning twilight observance window: two ghatis before sunrise to one after, a ghati here being a thirtieth of the day length. Returns {start, end}. | |
| rahu_kaalam | — | Rahu Kaalam: the eighth of the daylight held unfit for beginning anything, its position within the day fixed by the weekday. Returns {rahu_start, rahu_end}, one eighth of day_length apart. | |
| ritu | mode | The season. mode selects the method: 'drik' derives it from the Sun's tropical sign, 'vedic' from the lunar month. Returns {ritu, season, lord}, for example {'Vasanta', 'Spring', 'Venus'}. The engine default is 'drik', and any value other than those two silently returns null rather than erroring. | |
| samvatsara_name | samvata_type | The year's name in the sixty-year Jovian cycle, Prabhava through Kshaya. Requires samvata_type, either 'shaka' or 'vikram'; the two eras are offset from each other, so they name the same Gregorian year differently. Returns a single string, and errors if samvata_type is omitted. | |
| sankranti_dates | — | The Sun's ingresses into the signs either side of the requested moment — the boundaries of the solar month you are in. Returns {'Previous Sankranti', 'Next Sankranti'} as timestamps at the requested offset. | |
| sayahna_sandhya | — | The evening twilight observance window: one ghati before sunset to two after, again on day-length ghatis. Returns {start, end}. | |
| shaka_samvat | — | The elapsed Shaka era year, computed as the Gregorian year minus 78. A single integer. It is a plain year difference and is not adjusted for whether the date falls before or after the Shaka new year. | |
| shiva_vasa_segments | — | Where Shiva resides, the equivalent check before a Rudrabhisheka, derived from the tithi alone. Returns a list of {state, start_time, end_time}, one per tithi segment of the day; state is one of seven — with Gowri, in Kailasha, on Vrishabha (Nandi), at Bhojanam, in Sabha, at Work/Play or in Shmashana — of which the first three are the favourable ones. | |
| shunya_nakshatra | — | Whether the Moon currently occupies one of the two or three nakshatras reckoned void for the running amanta lunar month, in which new undertakings are avoided. Returns the string 'shunya_nakshatra' when it does and null otherwise — a flag, with no name or window in the response. | |
| special_longitudes | — | The six time-derived upagrahas. The daylight or the night is divided into eight planetary parts and the rising sign is taken at a chosen point within a particular part. Returns an object keyed 'kaala', 'mrityu', 'artha_praharaka', 'yama_ghantaka', 'maandi' and 'gulika', each {degree, sign, minutes, seconds, nakshatra, pada}. Kaala uses the Sun's part, Mrityu the Mars part, Artha Praharaka and Yama Ghantaka the middles of the Mercury and Jupiter parts, and Gulika and Maandi the Saturn part — which is why the request fields kala_mrityu_rise_at, gulika_rises_at and mandi_rises_at matter: choosing the beginning, middle or end of the part is what separates Gulika from Maandi. | |
| sree_lagna | — | Sree Lagna, the prosperity point: the ascendant advanced by the fraction of its nakshatra the Moon has already covered, that fraction being applied to the whole zodiac. Returns one {degree, sign, minutes, seconds, nakshatra, pada}. | |
| tamil_solar_month_date | — | The Tamil solar calendar date. Returns {'Tamil Solar Month', 'Tamil Solar Date'} — the month name from Chithirai to Panguni and an integer day. This implementation counts days from a fixed 14 April new year in thirty-day blocks rather than from the actual sankranti instants, so it can differ by a day or two from a published Tamil panchangam. | |
| tarabala | — | Tara Bala: which of the twenty-seven birth nakshatras are favourably placed against the transiting Moon's nakshatra. Returns {good_nakshatras, valid_until, good_nakshatras_tier2, tier2_valid_until}. The first list holds fifteen names and holds good until the Moon leaves its current nakshatra at valid_until; the tier2 pair applies the same rule to the following nakshatra and holds until the next sunrise. Both tier2 fields are null when the Moon does not change nakshatra within the day. | |
| tithi | — | The lunar day at the requested instant: {paksha, name, number, start_time, end_time, remaining_time}. number is 1-15 for Shukla, 16-29 for Krishna and 30 for Amavasya, and remaining_time is {hours, minutes, seconds} until the tithi ends. On the full and new moon the paksha field reads 'Purnima' or 'Amavasya' rather than the fortnight name. For every tithi touching the day, use tithi_segments. | |
| tithi_segments | — | Every tithi overlapping the local calendar day, as a list of {paksha, name, number, start_time, end_time}. number is 1-15 in the bright fortnight, 16-29 in the dark, and 30 for Amavasya. Note that on the full and new moon the paksha field reads 'Purnima' or 'Amavasya' rather than 'Shukla' or 'Krishna'. A tithi averages 23.6 hours, so most days return one entry and some two. | |
| trikalam | — | The daylight split into three equal parts. Returns {morning, afternoon, evening}, each {start, end}. This is a plain thirds-of-the-day division, not the Rahu/Yamaganda/Gulika trio the word denotes in some Tamil panchangams. | |
| true_anomaly | eccentric_anomaly, eccentricity | The companion converter: takes eccentric_anomaly in degrees and eccentricity and returns the true anomaly in degrees, a single number. Note it reads the eccentric anomaly from the request field of that name — it does not chain from the eccentric_anomaly key in the same call. | |
| udaya_lagna_muhurta | — | The twelve consecutive rising-sign windows covering the day, anchored to the sign already rising just before sunrise. Returns a list of twelve {rashi, start, end} in order, spanning roughly one sidereal day — about four minutes short of sunrise to sunrise. chandrabalam and panchaka_rahita are both computed from this list. | |
| upagraha_longitudes | — | The five shadow points derived arithmetically from the Sun's sidereal longitude, each following from the last: Dhuma at the Sun plus 133°20', then Vyatipata, Parivesha, Indrachapa and Upaketu. Returns an object keyed 'Dhuma', 'Vyatipata', 'Parivesha', 'Indrachapa' and 'Upaketu', each {degree, sign, minutes, seconds, nakshatra, pada}. The dhuma_vyatipata_relation field picks which of the two classical formulas links Vyatipata to Dhuma, and so shifts all four points after it. | |
| vaara | — | The weekday, named from sunrise rather than midnight, so a moment between midnight and sunrise still belongs to the previous vaara. A single string: Ravivara, Somavara, Mangalavara, Budhavara, Guruvara, Shukravara or Shanivara. | |
| vijaya_muhurta | — | Vijaya Muhurta, one ghati either side of the midpoint of the daylight — the classical window for anything that has to succeed against opposition. Returns {start, end}. Only the daytime variant is exposed. | |
| vikram_samvat | — | The Vikram Samvat year, computed as the Gregorian year plus 57. A single integer, with the same caveat as shaka_samvat: no adjustment for where in the year the date falls. | |
| yamaganda_kaalam | — | Yamaganda Kaalam, a second weekday-determined inauspicious eighth of the daylight. Returns {yamaganda_start, yamaganda_end}. | |
| yoga_segments | — | Every Nityayoga period overlapping the local calendar day, as a list of {name, start_time, end_time} in order. A yoga averages about 22.6 hours, so a day usually spans two. Boundaries are exact crossing instants of the Sun-plus-Moon longitude sum, not rounded to the day. | |
| yogam | — | The Nityayoga: the Sun's and Moon's sidereal longitudes added together and the total divided into twenty-seven equal 13°20' arcs. Returns a single name, Vishkambha through Vaidhriti, for the instant requested. For the periods either side of that instant use yoga_segments. | |
| yogas | — | The named tithi, nakshatra and weekday combinations in force — the auspicious and inauspicious 'yogas' a panchang lists for the day, such as Sarvartha Siddhi, Amrit Siddhi, Dwipushkara, Tripushkara, Guru Pushya, Ravi Pushya, Panchaka, Dagdha, Yama Ghanta and dozens more from about twenty classical tables. Returns {yogas: [...]}, a list of names that is empty when none applies. Distinct from yogam, which is the single Nityayoga of the moment. |