Birth Chart API

AstroAPI uses Western (tropical), geocentric astrology by default. Sidereal or Vedic-style calculations are not applied unless explicitly enabled and documented.

Generate natal astrology charts using API key authentication. Designed for passive, server-to-server usage.

Endpoint

POST https://api.astroapi.io/api/astro/birth-chart

Include Authorization: Bearer <API_KEY>.

Required Request Fields

  • date — ISO date (YYYY-MM-DD)
  • time — 24-hour time (HH:MM)
  • lat — latitude (decimal)
  • lon — longitude (decimal)

Add an IANA timezone such as America/Los_Angeles when the submitted time is local. If omitted, the engine interprets the time as UTC. Public calculations support 1900-01-01 through 2050-12-31.

Returns

  • Planetary positions (Sun through Pluto)
  • Ascendant and Midheaven (mc)
  • Whole Sign (whole_sign) and Equal (equal) house systems
  • Aspects, lunar nodes, and metadata

All calculation results are returned inside the chart object.

Example Response

This verified engine response is abbreviated; planets include additional motion fields, and the full response also includes aspects, nodes, and metadata.

{
  "type": "birth-chart",
  "input": {
    "date": "1995-11-08",
    "time": "14:22",
    "lat": 34.05,
    "lon": -118.24,
    "timezone": "UTC"
  },
  "chart": {
    "status": "ok",
    "planets": {
      "Sun": { "lon": 225.7013, "sign": "Scorpio" },
      "Moon": { "lon": 60.2319, "sign": "Gemini" }
    },
    "houses": {
      "ascendant": 225.4945,
      "mc": 142.1996,
      "systems": {
        "whole_sign": {
          "houses": {
            "1": 210.0,
            "2": 240.0,
            "3": 270.0,
            "4": 300.0,
            "5": 330.0,
            "6": 0.0,
            "7": 30.0,
            "8": 60.0,
            "9": 90.0,
            "10": 120.0,
            "11": 150.0,
            "12": 180.0
          }
        },
        "equal": {
          "houses": {
            "1": 225.4945,
            "2": 255.4945,
            "3": 285.4945,
            "4": 315.4945,
            "5": 345.4945,
            "6": 15.4945,
            "7": 45.4945,
            "8": 75.4945,
            "9": 105.4945,
            "10": 135.4945,
            "11": 165.4945,
            "12": 195.4945
          }
        }
      }
    }
  }
}

Quick Test / curl

Use this curl command from a trusted server to test the Birth Chart endpoint:

curl -i https://api.astroapi.io/api/astro/birth-chart \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ${ASTROAPI_KEY}" \
  -d '{
    "date": "2000-01-01",
    "time": "12:00",
    "lat": 33.7488,
    "lon": -84.3877,
    "timezone": "America/New_York"
  }'

Common Uses

  • Chart visualization
  • User profiles
  • Compatibility systems
  • Astrology dashboards

All calculation results are returned as raw data. Interpretation, weighting, and scoring are the responsibility of the client application or downstream services.

// Node.js 22+ — server-side only
fetch("https://api.astroapi.io/api/astro/birth-chart", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": `Bearer ${process.env.ASTROAPI_KEY}`
  },
  body: JSON.stringify({
    date: "1995-11-08",
    time: "14:22",
    lat: 34.05,
    lon: -118.24,
    timezone: "America/Los_Angeles"
  })
})
  .then(res => res.json())
  .then(data => console.log(data));
# Python — Birth Chart API
import os
import requests

url = "https://api.astroapi.io/api/astro/birth-chart"

payload = {
  "date": "1995-11-08",
  "time": "14:22",
  "lat": 34.05,
  "lon": -118.24,
  "timezone": "America/Los_Angeles"
}

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

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