Skip to content
POST/api/astro/house/1 credit

House cusps

The twelve house divisions for a moment and a place, in whichever house system you name. Vedic practice usually takes whole signs as houses, but this endpoint exposes the full Swiss Ephemeris range — Placidus, Koch, Campanus, Regiomontanus, Sripati, Porphyry, equal and whole-sign among two dozen — so you can cast the same chart in the system a given tradition expects. Positions are sidereal. The distinction to get right is cusp against range. A cusp is the single degree the system assigns to a house; a range is the span the house actually occupies, computed here as the midpoints between neighbouring cusps, so a house runs from halfway back to the previous cusp to halfway on to the next. `house_cusps` gives the twelve cusps, `house_starts` and `house_ends` the two edges, `house_ranges` both edges together, and `houses` all three at once. `notation` controls the units throughout: 'degree' for raw decimal degrees along the ecliptic, 'astrological' for sign plus degrees, minutes and seconds. `method_name` is case-sensitive and several values contain spaces or punctuation, so copy them exactly. The system is already applied from `method_name` when the request is built, so `set_house_method` and `change_house_system` are only useful for switching part-way through a multi-key call.

https://yogataraapi.prahlad.app/api/astro/house/
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
date_timestring (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).

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.

set_house_methodhouseshouse_rangeshouse_startshouse_cuspshouse_endschange_house_system

Array of strings. 'set_house_method' and 'change_house_system' consume `method_name`; the other five consume `notation`.

method_namestringrequired
equalalcabitiuscampanusequal (mc)carter poli-equ.gauquelin sectorshorizon/azimutsunshinesavard-akochpullen sdmorinus

Case-sensitive and lowercase. Several values contain spaces, slashes or punctuation - copy them exactly, e.g. 'equal (mc)', 'carter poli-equ.', 'horizon/azimut'.

notationstringrequired
astrologicaldegree

Case-sensitive lowercase. 'degree' returns raw decimal degrees; 'astrological' returns sign + d/m/s. Anything else returns 400.

timezone_as_floatnumber (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

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.

min -89.9 · max 89.9

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.

min -180 · max 180

Available keys (7)

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.

KeyExtra fields neededDescription
change_house_systemmethod_nameThe same operation as `set_house_method`: switches to the system named in `method_name` and returns null. Both keys call through to the same code and there is no difference between them.
house_cuspsnotationThe twelve house cusps as the chosen house system defines them, as a flat list in house order. These are the cusp degrees themselves, not the house boundaries — the boundaries are in `house_starts` and `house_ends`, and sit halfway between consecutive cusps.
house_endsnotationJust the closing edge of each house, as a flat list of twelve values in house order. Each is the midpoint between that house's cusp and the next, so the end of house n equals the start of house n+1.
house_rangesnotationThe span each house occupies, as an object keyed '1' to '12' with `start` and `end` for each. The edges are the midpoints between neighbouring cusps, so a house begins halfway back to the previous cusp and ends halfway on to the next. In 'degree' notation the values are decimal degrees; in 'astrological' they are objects of sign, degrees, minutes and seconds.
house_startsnotationJust the starting edge of each house, as a flat list of twelve values in house order — not an object keyed by house number as `house_ranges` returns. Decimal degrees under 'degree' notation, sign and d/m/s objects under 'astrological'.
housesnotationTwelve houses keyed `1` to `12`, each `{start, cusp, end}` - the two boundaries plus the cusp between them. Note the shape differs from the `houses` key on /api/astro/krishnamurti/, which returns `{start, mid, end}` and has no cusp. `notation` controls the units: `degree` gives floats, `astrological` gives strings like `"Aries 12 30 15"`.
set_house_methodmethod_nameRecomputes the cusps under the house system named in `method_name`. A switch rather than a value — it returns null, and only affects keys listed after it in the array. The system is already applied from `method_name` when the request is built, so this is redundant unless you are changing systems mid-call.

Example request

curl -X POST https://yogataraapi.prahlad.app/api/astro/house/ \
  -H "X-API-Key: $OCCULT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"keys":["set_house_method"],"latitude":26.9124,"longitude":26.1046,"timezone_as_float":5.5,"method_name":"equal","notation":"astrological","date_time":"2024-11-18"}'

Response

{
  "data": {
    "set_house_method": null
  },
  "status": 200,
  "is_error": false,
  "message": "successful"
}

Captured from a real call using the exact request above. Results sit under data, keyed by what you requested.

Errors

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