Free · No key · CORS enabled
Free astrology API
Two JSON endpoints and a set of open data files. Positions are apparent geocentric longitudes on the tropical zodiac, computed with Astronomy Engine and checked against NASA JPL Horizons. The full description is in OpenAPI 3.1.
GET /api/positions
Sign, degree, speed and retrograde flag for the Sun, Moon, Mercury through Pluto, the mean North Node and mean Black Moon Lilith at any instant from 1800 to 2200.
Parameter t: an ISO 8601 UTC time such as 2026-01-01T00:00Z. Leave it out for now.
curl "https://natalchartlab.com/api/positions?t=2026-01-01T00:00Z"
{
"time": "2026-01-01T00:00:00.000Z",
"zodiac": "tropical",
"frame": "apparent geocentric, true ecliptic of date",
"positions": [
{
"body": "sun",
"name": "Sun",
"longitude": 280.56858,
"sign": "Capricorn",
"degree": "10°34′",
"speed_deg_per_day": 1.01888,
"retrograde": false
},
{
"body": "moon",
"name": "Moon",
"longitude": 66.7167,
"sign": "Gemini",
"degree": "6°43′",
"speed_deg_per_day": 14.98629,
"retrograde": false
},
"…"
]
}
GET /api/sky
The sky right now in one call: all positions, the Moon’s sign, phase, illumination and next sign change, void-of-course windows for the next seven days, the next New and Full Moon, and each planet’s retrograde or shadow status with dates.
const sky = await fetch('https://natalchartlab.com/api/sky').then(r => r.json());
console.log(sky.moon.sign, sky.moon.phase, sky.retrogrades.filter(p => p.status === 'retrograde'));
Try it. Responses are cached for up to 15 minutes.
Data files
| File | Contents |
|---|---|
| /data/retrogrades.csv | Every retrograde of Mercury through Pluto, 1950–2050: station times, signs, degrees and shadow dates (also as /data/retrogrades.json) |
| /data/moon-phases.csv | Every New, first-quarter, Full and last-quarter Moon 1950–2050 with zodiac sign and distance |
| /data/eclipses.csv | Solar and lunar eclipses 1950–2050 with type, magnitude and zodiac position |
| /data/horizons-validation.json | Our positions compared with NASA JPL Horizons, body by body |
The retrograde, Moon phase and eclipse tables are also on Zenodo with DOIs, and on Kaggle and Hugging Face. They are CC BY 4.0.
No code?
Use the free widgets: copy one line of HTML to show the Moon phase, Mercury retrograde status or zodiac season on your site.
Frequently asked questions
Is the API free? Do I need a key?
Yes, it is free, and there is no key or sign-up. Please cache responses where you can and keep to a few requests per second.
Can I call it from the browser?
Yes. Every endpoint sends Access-Control-Allow-Origin: *, so fetch() works from any web page.
How accurate are the positions?
They come from Astronomy Engine and are checked against NASA JPL Horizons; the largest difference we measured is about 20 arcseconds. See the methodology and the published comparison.
Does it compute houses or full birth charts?
Not through the API. It returns planet positions for any instant and the current sky. House cusps need a birthplace, and the birth chart calculator on this site does those.
How should I credit it?
The data files are CC BY 4.0: a link to Natal Chart Lab next to where you use them is enough.