Astrology Houses API
AstroAPI uses Western (tropical), geocentric astrology by default. Sidereal or Vedic-style calculations are not applied unless explicitly enabled and documented.
The Houses API calculates astrological house systems and chart angles using precise astronomical calculations. In addition to house cusps, this endpoint returns full chart context required for accurate rendering and analysis. All access uses API key authentication.
Endpoint
POST https://api.astroapi.io/api/astro/houses
Include Authorization: Bearer <API_KEY>.
Supported House Systems
equal(default)whole_sign
The response includes only the selected system entry under houses.systems.
The legacy alias whole is accepted and normalized to whole_sign.
Example Request
{
"birth": {
"date": "1990-01-01",
"time": "12:00",
"timezone": "UTC",
"lat": 40.7128,
"lon": -74.0060
},
"system": "equal"
}
Example Response
This verified response is abbreviated and numerically rounded. The gateway spreads the calculated chart fields at the top level and adds type and house_system.
{
"type": "houses",
"house_system": "equal",
"status": "ok",
"zodiac": "tropical",
"ayanamsa": null,
"planets": {
"Sun": { "lon": 280.8143, "sign": "Capricorn" },
"Moon": { "lon": 333.2677, "sign": "Pisces" }
},
"houses": {
"ascendant": 274.64,
"mc": 208.91,
"systems": {
"equal": {
"name": "Equal",
"houses": { "1": 274.6427, "2": 304.6427 }
}
}
},
"aspects": [
{
"p1": "Sun",
"p2": "Mars",
"type": "semisextile",
"exact_angle": 30,
"distance": 30.8142,
"orb": 0.8142
}
],
"nodes": {
"mean": {
"longitude": 318.4317,
"sign": "Aquarius",
"deg_in_sign": 18.4317
}
},
"metadata": {
"note": "Geocentric positions using JPL DE421 ephemeris."
}
}
Quick Test / curl
Use this curl command to quickly test the Houses API endpoint with your API key:
curl -i https://api.astroapi.io/api/astro/houses \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${ASTROAPI_KEY}" \
-d '{
"birth": {
"date": "2000-01-01",
"time": "12:00",
"timezone": "America/New_York",
"lat": 33.7488,
"lon": -84.3877
},
"system": "equal"
}'
Common Uses
- Chart wheel rendering
- Natal interpretations
- Synastry overlays
- Life-area analytics
- Astrology dashboards
This API provides raw calculation data only; interpretation, scoring, and compatibility logic are handled client-side.
Accuracy boundary
Ascendant and Midheaven use the engine's documented fixed-obliquity approximation;
this is not a Placidus or Swiss Ephemeris house implementation. Public dates are
limited to 1900-01-01 through 2050-12-31, and omitted
birth timezones default to UTC.
// Node.js 22+ — server-side only
fetch("https://api.astroapi.io/api/astro/houses", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${process.env.ASTROAPI_KEY}`
},
body: JSON.stringify({
birth: {
date: "1990-01-01",
time: "12:00",
timezone: "America/New_York",
lat: 40.7128,
lon: -74.0060
},
system: "equal"
})
})
.then(res => res.json())
.then(data => console.log(data));
# Python — Houses API
import os
import requests
url = "https://api.astroapi.io/api/astro/houses"
payload = {
"birth": {
"date": "1990-01-01",
"time": "12:00",
"timezone": "America/New_York",
"lat": 40.7128,
"lon": -74.0060
},
"system": "equal"
}
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {os.environ['ASTROAPI_KEY']}"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())