curl -X POST https://yogataraapi.prahlad.app/api/astro/dosha/ \
-H "X-API-Key: $OCCULT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"keys":["get_dosha_resources"],"date_time":"2025-07-11T04:37:08.718Z","latitude":26.9124,"longitude":75.7873,"timezone":0,"manglik_reference_planet":0,"include_lagna_house":true,"include_2nd_house":true,"apply_exceptions":true,"moon_star":"leo"}'A dosha is a specific affliction in a birth chart — a named planetary configuration that classical texts treat as a liability, most often for marriage, health or the ancestral line. This endpoint tests for eight of them from the birth moment and place, and can return either the bare results or ready-to-display written explanations. There are two ways to use it. The individual keys (`kala_sarpa`, `manglik`, `pitru_dosha` and the rest) return structured results you can act on in code. `get_dosha_details` returns the whole set as formatted HTML paragraphs keyed by the English dosha name, which is what you want if you are rendering a report; it covers Kala Sarpa, Manglik, Pitru, Guru Chandala, Kalathra, Ghata and Shrapit, but not Ganda Moola. `get_dosha_resources` gives you the underlying text corpus if you would rather assemble your own copy. All the boolean and structured request fields are required by the serializer even for keys that ignore them. `manglik_reference_planet` is a planet index (0 Sun, 1 Moon, 2 Mars, 3 Mercury, 4 Jupiter, 5 Venus, 6 Saturn, 7 Rahu, 8 Ketu); the engine's own default of measuring from the ascendant cannot be selected through the API, because the field is typed as an integer. This endpoint calls the UTC offset field `timezone`, not `timezone_as_float`.
| Field | Type | Required | Notes |
|---|---|---|---|
| apply_exceptions | boolean | required | |
| 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. FORMAT constraint. DRF DateTimeField: ISO-8601 only (DRF default input formats), e.g. "2026-09-01T06:00:00+05:30", "2026-09-01T06:00:00Z" or "2026-09-01 06:00:00" (no timezone = UTC assumed). |
| include_2nd_house | boolean | required | |
| include_lagna_house | boolean | required | |
| 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. get_dosha_resourceskala_sarpamanglikpitru_doshaguru_chandala_doshakalathraganda_moolaghatashrapitget_dosha_detailsArray of strings. 'manglik' requires manglik_reference_planet, include_lagna_house, include_2nd_house and apply_exceptions; 'ganda_moola' requires moon_star; 'get_dosha_details' requires date_time and geopos. |
| latitude | number (double) | required | 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 -90 · max 90 |
| longitude | number (double) | required | 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 |
| manglik_reference_planet | integer | required | |
| moon_star | string | required | Semantically a nakshatra NUMBER 1-27 (the Ganda Moola nakshatras being 1 Ashwini, 9 Ashlesha, 10 Magha, 18 Jyeshtha, 19 Moola, 27 Revati). No working accepted-value list can be published until that type mismatch is fixed. |
| timezone | number (double) | required | UTC offset of the place, in hours, as a decimal. Example: 5.5 for India (UTC+05:30). Identical in meaning to timezone_as_float, which other endpoints call the same thing by a different name. |
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 | |
|---|---|---|---|
| ganda_moola | moon_star | Ganda Moola: whether the birth star is one of the six junction nakshatras (Ashwini, Ashlesha, Magha, Jyeshtha, Moola, Revati). It is meant to take the nakshatra number 1–27 in `moon_star` and return a boolean, but the field is typed as a string while the comparison list holds integers, so as it stands the key returns false for every input. | |
| get_dosha_details | date_time, geopos | All seven of the narrative doshas evaluated and written up at once: an object keyed by the English dosha name — Kala Sarpa Dosha, Manglik Dosha, Pitru Dosha, Guru Chandala Dosha, Kalathra Dosha, Ghata Dosha and Shrapit Dosha — whose values are HTML fragments saying whether the dosha is present and what it means. Ganda Moola is not included. Requires `date_time` and the place. | |
| get_dosha_resources | — | The full corpus of dosha explanation text, as an object keyed by dosha name ('kala_sarpa', 'manglik', 'pitru', 'ghata' and so on) with a list of English paragraphs under each. The first entry of a list is the 'no such dosha' wording and the later entries correspond to the house or variety involved. Use it to render your own copy rather than the pre-assembled HTML. | |
| ghata | — | Ghata Dosha: Mars and Saturn together in the same sign. Returns a single boolean. | |
| guru_chandala_dosha | — | Guru Chandala: Jupiter conjunct Rahu or Ketu in the same sign. Returns a two-element list of [whether the combination is present, whether Jupiter is the stronger of the two]. Both are false when there is no conjunction. | |
| kala_sarpa | — | Kala Sarpa Dosha: true when all seven classical planets are hemmed between Rahu and Ketu on one side of the nodal axis. Returns a single boolean; the variety (Ananta, Kulika, Vasuki and so on) follows from the house Rahu occupies. | |
| kalathra | — | Kalathra Dosha, the affliction of the marriage house. True when every natural malefic — Sun, Mars, Saturn, Rahu and Ketu — falls in the 1st, 2nd, 4th, 7th, 8th or 12th counted from the seventh house. Returns a single boolean, and because it requires all five malefics to qualify it is rarely true. | |
| manglik | manglik_reference_planet, include_lagna_house, include_2nd_house, apply_exceptions | Manglik, or Mangal Dosha: whether Mars falls in one of the houses that afflict marriage, counted from `manglik_reference_planet`. Returns a three-element list of [is manglik, whether a cancellation applies, the numbers of the cancellation rules that matched]. The houses tested are the 4th, 7th, 8th and 12th, plus the 2nd when `include_2nd_house` is true and the 1st when `include_lagna_house` is true; cancellations are only evaluated when `apply_exceptions` is true. | |
| pitru_dosha | — | Pitru Dosha, the affliction of the ancestral line. Returns a two-element list of [true or false, the numbers of the rules that triggered]. Five rules are tested in order: a luminary or Rahu in the 9th, Ketu in the 4th, Sun/Moon/Rahu/Ketu afflicted by Mars or Saturn, a crowding of Mercury, Venus and Rahu in the 2nd, 5th, 9th or 12th, and Sun or Moon conjunct a node. | |
| shrapit | — | Shrapit Dosha: Saturn and Rahu together in the same sign. Returns a single boolean. |