Machine-readable API
Astrology Positions API
This page documents a simple JSON endpoint for calculating astrological planetary positions for one UTC moment. It is intended also for AI tools that cannot reliably calculate ephemerides on their own, but can use a precise calculator.
The endpoint returns clean JSON for one UTC moment: tropical ecliptic longitude, latitude, daily longitude speed, retrograde flag, zodiac sign, and optional houses.
Endpoint
GET /api/positions.php?dt=2026-05-17T12:00:00Z&bodies=So,Mo,Me,Ve,Ma,Ju,Sa,Ur,Ne,Pl,Nn,Ll,Wa,Se&lon=14.417&lat=50.083&house=P
Output and static archive
Body codes, coordinate model, and field meanings are aligned with the static archive for AI. The live endpoint response also contains a record field with the same shape as one JSONL archive record. The positions array remains as a convenient overview for single API calls.
MCP for AI clients
A separate public MCP server lets compatible AI clients read positions without loading the main application's live calculation endpoint. It is read-only and uses the precomputed 10-minute archive covering 1900–2050 UTC.
https://mcp.on-lineastrology.com/mcp
Available tools:
get_planet_positions: positions of selected or all supported bodies for one exact timeget_transit_window: a bounded time series around an event start
MCP returns geocentric tropical ecliptic positions. It does not contain houses, Ascendant, or MC because those require geographic coordinates and a separate live calculation.
Parameters
| dt | ISO 8601 date and time. UTC is recommended, for example 2026-05-17T12:00:00Z. |
|---|---|
| bodies | Comma-separated body IDs, for example So,Mo,Me,Ve,Ma,Ju,Sa,Ur,Ne,Pl,Nn,Ll,Lt,Wa,Se. The value all returns all supported bodies. |
| lon, lat | Optional geographic coordinates for house calculation. lon is longitude, lat is latitude. |
| house | Optional house system, for example P for Placidus. It is calculated only when both lon and lat are provided. |
Supported body codes
So Sun, Mo Moon, Me Mercury, Ve Venus, Ma Mars, Ju Jupiter, Sa Saturn, Ur Uranus, Ne Neptune, Pl Pluto, Nn mean North Node, Nt true Node, Ll mean Lilith, Lt true Lilith, Ch Chiron, Ph Pholus, Ce Ceres, Pa Pallas, Jo Juno, Va Vesta, Wa Waldemath, Se Selena/White Moon.
AI use
The endpoint is public and free for single-position calculations, for example when an AI needs to verify astrological positions for one moment. It is not intended for bulk ephemerides, loops, scraping, or long time ranges. For larger automated calculations, use your own local copy of the calculation code or exported data instead of repeatedly calling this server.
For larger use, calculate locally
If an AI tool, script, or another website needs frequent calculations, the most server-friendly path is to download the PHP package and run the calculations locally. The public endpoint can then remain available for manual checks and individual requests, while heavier load is distributed away from this server.
A separate static archive of precomputed ephemerides for 1900–2050 UTC is also available for AI and bulk reading without calling the live endpoint.
The package works with Swiss Ephemeris .se1 files. Because of licensing rules, the ZIP does not include the complete ephemeris data; users of their own installation must provide the appropriate .se1 files and comply with the Swiss Ephemeris license.
Machine-readable descriptions
OpenAPI schema llms.txt sitemap.xml
Individual result URLs return the header X-Robots-Tag: noindex so that data and body combinations are not indexed. Under higher load, the calculation endpoint may be temporarily limited to protect the server. The documentation should be indexed, not result URLs.