curl -X POST https://yogataraapi.prahlad.app/api/astro/chart/ \
-H "X-API-Key: $OCCULT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"chart_name":"NavamsaChart","datetime":"2026-04-09T15:35:00+05:30","longitude":75.76861133842026,"latitude":26.849874414615,"notation":"degree","ayanamsa":"lahiri","ascendant_pos":"cusp","rahu":"true","true_mean":"Mean","refraction":false,"apply_correction":false,"correction_direction":"add","correction_deg":0,"correction_min":0,"correction_sec":0}'The core chart endpoint: planetary positions, house divisions and the ascendant for a moment and a place. Ask for the Rashi chart (D-1) for an ordinary birth chart, or any of thirty-odd divisional charts — Navamsa, Dasamsa, Dwadasamsa, Shashtyamsa and the rest — by name, and pass an array of names to get several back in one call, keyed by chart name. Each chart returns three blocks. `celestial` is keyed by body name (sun, moon, … northtruenode) and gives longitude, latitude, nakshatra and pada, kakshya, sign name and house number for each. `houses` is keyed 1 to 12 with the `start`, `cusp` and `end` of every house. `ascendant` gives the rising degree and its sign. `notation` controls units throughout: 'degree' for decimal degrees, 'astrological' for sign plus degrees, minutes and seconds. The optional fields are where the precision lives. `ayanamsa` picks the sidereal definition, and `apply_correction` with `correction_deg`, `correction_min`, `correction_sec` and `correction_direction` shifts it by hand. `rahu` chooses true nodes, mean nodes or both. `extended_bodies` adds asteroids, Uranian fictitious bodies or planetary moons, silently dropping any whose ephemeris files are absent. `ascendant_pos` decides whether the ascendant is read at the house cusp, start or end — note that any value other than 'start' or 'end', including a typo, falls back to the cusp without complaint. The date field is spelt `datetime` on this endpoint, not `date_time`.
| Field | Type | Required | Notes |
|---|---|---|---|
| ascendant_pos | string | required | cuspstartend'start' uses the house start and 'end' the house end; ANY other value - including 'cusp' itself and any typo - falls through the else branch and uses the house cusp. So 'cusp' is the effective default and misspellings fail silently instead of erroring. Case-sensitive. |
| ayanamsa | string | required | FAGAN_BRADLEYLAHIRIDELUCERAMANUSHASHASHIKRISHNAMURTIDJWHAL_KHULYUKTESHWARJN_BHASINBABYL_KUGLER1BABYL_KUGLER2BABYL_KUGLER3Case-INSENSITIVE - name.upper is used for the lookup. Unlike /api/astro/ayanamsa_value/, 'USER' is NOT rejected here. An unknown value returns 400 "Undefined ayanamsa: <name>". Note that apply_correction=true overrides the choice and switches the internal mode to USER. |
| chart_name | string | required | BhavaChartRashiChartHoraChartJagannathHoraChartParivrittidwayaHoraChartParivrittitrayaDrekkanaChartDrekkanaChartSomnathDrekkanaChartJagannathDrekkanaChartChaturthamsaChartPanchamsaChartShashthamsaChartCase-sensitive, and spelt exactly as listed. Pass a single name, or an array to get several charts in one call - the response is then keyed by chart name. An unknown name returns 400. |
| datetime | 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. Same meaning as date_time, which other endpoints call the same thing by a different name. FORMAT constraint, not an enum. 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). Note this endpoint names the field `datetime`, not `date_time`. |
| 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 -180 · max 180 |
| 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 |
| notation | string | required | astrologicaldegreeCase-sensitive lowercase. 'astrological' returns sign/degree/minute/second components; 'degree' returns raw decimal degrees. Anything else returns 400 "Invalid notation: <x>". |
| aberration | boolean | optional | |
| apply_correction | boolean | optional | |
| correction_deg | integer | optional | min 0 |
| correction_direction | string | optional | addsubtractDefault 'add'. Only meaningful when apply_correction=true and at least one of correction_deg/min/sec is non-zero. |
| correction_min | integer | optional | min 0 · max 59 |
| correction_sec | integer | optional | min 0 · max 59 |
| extended_bodies | array | optional | Body groups to include: 'asteroids', 'planetary_moons', 'fictitious_bodies'. asteroidsplanetary_moonsfictitious_bodiesArray of strings, default []. 'asteroids' adds chiron, pholus, ceres, pallas, juno, vesta; 'fictitious_bodies' adds cupido, hades, zeus, kronos, apollon, admetos, vulkanus, poseidon, selena; 'planetary_moons' adds phobos, deimos, io, europa, ganymede, callisto, titan, triton, charon. Bodies whose ephemeris files are missing are silently dropped from the response. |
| nutation | boolean | optional | |
| rahu | string | optional | Node type to include. 'true' returns true nodes only, 'mean' returns mean nodes only, 'both' returns both. truemeanbothDefault 'true'. 'true' returns only the true nodes, 'mean' only the mean nodes, 'both' returns all four. |
| refraction | boolean | optional | |
| true_mean | string | optional | TrueMeanCase-SENSITIVE capitalised. Default 'Mean'. Selects true vs mean planetary positions (swisseph TRUEPOS). |
| use_28_nakshatras | boolean | optional |