POST · VEDIC

Planets in Houses

Endpoint POST https://starsapi.com/api/v3/vedic/natal/planets-in-houses

Returns a house-by-house overview of the birth chart. For each of the 12 houses: the sign on the cusp, its lord, which planets occupy it, and which planets aspect it via Parashari graha drishti. This is the “at a glance” view of a Vedic chart — one loop gives you the complete picture without any client-side assembly.

Houses are computed using whole-sign (Rashi) house logic: house 1 is the ascendant sign, house 2 is the next sign, and so on. Aspects follow traditional Parashari rules — every planet casts a 7th-house aspect; Mars additionally aspects the 4th and 8th; Jupiter the 5th and 9th; Saturn the 3rd and 10th; Rahu/Ketu the 5th, 7th, and 9th.

Authentication

Required. Three methods accepted:

MethodExample
Header (recommended)X-Api-Key: am_live_xxxxxxxxxxxx
BearerAuthorization: Bearer am_live_xxxxxxxxxxxx
Query?api_key=am_live_xxxxxxxxxxxx

See authentication for security considerations.

Request body

Send a JSON object with Content-Type: application/json. All core fields are required — the ascendant (and therefore every house cusp) depends on the precise time and place of birth.

FieldTypeRequiredDescription
yearintegerYesBirth year, 4-digit (e.g. 1990).
monthintegerYesBirth month, 112.
dayintegerYesDay of month, 131.
hourintegerYesHour in 24-hour local clock time, 023.
minuteintegerYesMinute, 059.
secondintegerNoSecond, 059. Default 0.
latitudenumberYesSigned decimal degrees, −90…90. Positive = North (e.g. 28.6139).
longitudenumberYesSigned decimal degrees, −180…180. Positive = East (e.g. 77.2090).
timezonestringYesIANA timezone identifier (e.g. Asia/Kolkata). DST is resolved automatically.
namestringNoNative’s name. Not returned by this endpoint; use /vedic/birth-details to retrieve it.
placestringNoBirth place label. Not returned by this endpoint; use /vedic/birth-details to retrieve it.
ayanamsastringNoSidereal mode. Default lahiri. Full list of 45+ ayanamsas →
node_typestringNomean (default) or true. Controls Rahu/Ketu position calculation.
Use the local clock time of birth. Pass the wall-clock time as recorded on the birth certificate together with the IANA timezone of the birth place — the backend converts to UTC internally. Do not pre-convert to UTC yourself.

Response shape

The data.houses array always contains exactly 12 objects, one per house in order. Each house is flat — no nested objects. Birth input (name, date, time, gender, location) is not echoed back — call /vedic/birth-details separately to retrieve resolved birth details.

FieldTypeDescription
houses[]
houseintegerHouse number, 112.
sign_numberintegerSign on the cusp, 1 = Aries … 12 = Pisces.
signstringSign name in English.
sign_hindistringSign name in Hindi.
house_lordstringRuling planet of the house sign.
occupying_planetsstring[]Planets sitting in this house. Empty array if none.
aspected_bystring[]Planets aspecting this house via graha drishti. Empty array if none.
meta
meta.endpointstringEcho of the called endpoint path.
meta.versionstringAPI version (currently 3.0).
meta.response_time_msintegerServer-side response time in milliseconds.
meta.timestampstring (ISO 8601)Time the response was served.
meta.credits_remainingintegerAPI credits remaining on your plan.
meta.request_idstringUnique request identifier — include in support tickets.
meta.ayanamsa.namestringSidereal mode applied.
meta.ayanamsa.valuenumberAyanamsa offset in decimal degrees.
meta.ayanamsa.value_dmsstringSame in D°M′S″ format.
meta.node_typestringRahu/Ketu calculation mode: mean or true.

Use cases

  • House grid UI — loop 1–12 and render each house with its sign, occupants, and aspects in a single pass.
  • Report cards — “Your 7th house (Pisces, lord Jupiter) has Moon and Venus, aspected by Saturn and Ketu.”
  • Quick strength check — count how many planets occupy or aspect a house to gauge its activation level.
  • House lord analysis — pair house_lord with the planets endpoint to find where each lord sits.
  • Localized UI — the dual English / Hindi sign names let you render in either language without a second call.

Errors

HTTPCodeCause
400MISSING_FIELDA required birth field is absent.
400INVALID_DATEInvalid calendar date.
400INVALID_TIMEHour/minute/second out of range.
400INVALID_TIMEZONENumeric or non-IANA timezone.
400INVALID_COORDINATElatitude / longitude out of range.
401AUTH_MISSING_KEYNo API key in request.
401AUTH_INVALID_KEYKey format invalid or not found.
401AUTH_REVOKED_KEYKey has been revoked.
403AUTH_ORIGIN_DENIEDRequest from non-whitelisted origin.
405METHOD_NOT_ALLOWEDNon-POST request.
429RATE_LIMIT_EXCEEDEDPlan quota exceeded.
500CALCULATION_ERROREphemeris calculation failed.

Error response format

{
  "success": false,
  "error": {
    "code": "INVALID_TIMEZONE",
    "message": "Unrecognised timezone: 'Asia/Calcutta_'. Use a valid IANA identifier such as 'Asia/Kolkata'."
  }
}

See also