Sidereal Astrology Houses API

AstroAPI uses Western (tropical), geocentric astrology by default. Sidereal calculations are applied only when explicitly enabled using "zodiac": "sidereal" and an ayanamsa selection. This endpoint provides sidereal coordinate transforms only and does not implement full Vedic astrology systems.

The Sidereal Houses API calculates astrological house systems and chart angles using sidereal zodiac coordinates derived from the selected ayanamsa. 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 contains only the selected system. whole is accepted as a legacy alias for whole_sign.

Example Request (Sidereal)

{
  "birth": {
    "date": "1990-01-01",
    "time": "12:00",
    "timezone": "UTC",
    "lat": 40.7128,
    "lon": -74.0060
  },
  "system": "equal",
  "zodiac": "sidereal",
  "ayanamsa": "lahiri"
}

Example Response

This verified response is abbreviated and numerically rounded. Gateway-added and chart fields are returned at the top level.

{
  "type": "houses",
  "house_system": "equal",
  "status": "ok",
  "zodiac": "sidereal",
  "ayanamsa": "lahiri",
  "planets": {
    "Sun": { "lon": 257.0968, "tropical_lon": 280.8143, "sign": "Sagittarius" },
    "Moon": { "lon": 309.5503, "tropical_lon": 333.2677, "sign": "Aquarius" }
  },
  "houses": {
    "ascendant": 250.9253,
    "mc": 185.1933,
    "systems": {
      "equal": {
        "name": "Equal",
        "houses": { "1": 250.9253, "2": 280.9253 }
      }
    }
  },
  "aspects": [
    {
      "p1": "Sun",
      "p2": "Mars",
      "type": "semisextile",
      "exact_angle": 30,
      "distance": 30.8141,
      "orb": 0.8141
    }
  ],
  "nodes": {
    "mean": {
      "longitude": 294.7143,
      "sign": "Capricorn",
      "deg_in_sign": 24.7143
    }
  },
  "metadata": {
    "note": "Geocentric positions using JPL DE421 ephemeris."
  }
}

Quick Test / curl

Use this curl command to quickly test the Sidereal 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",
    "zodiac": "sidereal",
    "ayanamsa": "lahiri"
  }'

Common Uses

  • Sidereal chart wheel rendering
  • House-based analytics
  • Synastry overlays
  • Coordinate-system comparison
  • Advanced astrology dashboards

This API provides raw calculation data only; interpretation, scoring, and compatibility logic are handled client-side.

Lahiri is the default sidereal ayanamsa; Raman and Krishnamurti are also supported. House angles use the documented fixed-obliquity approximation, and public dates are limited to 1900-01-01 through 2050-12-31.

// 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",
    zodiac: "sidereal",
    ayanamsa: "lahiri"
  })
})
  .then(res => res.json())
  .then(data => console.log(data));
# Python — Sidereal 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",
  "zodiac": "sidereal",
  "ayanamsa": "lahiri"
}

headers = {
  "Content-Type": "application/json",
  "Authorization": f"Bearer {os.environ['ASTROAPI_KEY']}"
}

response = requests.post(url, json=payload, headers=headers)
print(response.json())