Developer documentation
Build with Xodiac astrology calculations and readings.
Get started
Create an API key in Settings, under Connections. Copy it when it appears. Store it securely on your server and send it in the Authorization header. Rotating or revoking a key immediately invalidates the previous key.
curl https://api.xodiac.io/v1/natal-chart \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"person":{"birth_dt":"1990-05-10 09:30:00","lat":51.5072,"lon":-0.1276}}'Requests
All endpoints use POST with a JSON body. Birth dates and times use the local time at the birthplace in the format YYYY-MM-DD HH:MM:SS. Latitude and longitude are decimal degrees. Xodiac resolves the birthplace timezone automatically. Ambiguous or nonexistent local times are rejected.
Each request includes person with birth_dt, lat and lon. Synastry requests instead include both person_a and person_b. Birth data is supplied with every call. The API does not load saved profiles.
Optional astrology_system is western or jyotish and defaults to western. Natal endpoints accept house_system: P, K, W, E or B. The default is P.
Endpoints
All paths are relative to https://api.xodiac.io/v1.
POST /natal-chart
Returns placements, houses and aspects. Requires person.
POST /natal-reading
Returns a topic reading. Requires person and topic.
POST /synastry
Returns compatibility scores and inter-chart aspects. Requires person_a and person_b.
POST /synastry-reading
Returns a relationship topic reading. Requires both people and topic.
POST /transits
Returns transit data. Requires person, start_date and end_date, in YYYY-MM-DD format, spanning at most 31 inclusive local dates.
POST /transit-influences
Returns a transit reading. Requires the transit fields and topic.
POST /timing
Compares one to three distinct candidate_dates. Requires person and theme. Themes: love, work, invest, heal, travel, create, peace, power, endings, study, partnership or health.
Reading topics: relationships, communication, work or self. Transit and timing requests may specify current_timezone as an IANA timezone for local dates. Otherwise they use the birth timezone. This does not relocate the natal chart.
Credits and limits
Each successful request costs one credit from the same account balance as MCP. Failed executions are refunded. Attempts share the account's MCP daily allowance, which defaults to 100 per UTC day and can vary by account. The calculation service also limits each account to 30 requests per minute per endpoint per service instance. Protocol or network failures may take up to five minutes to release a reservation.
Errors
Errors contain an error field. Common statuses are 401 for an invalid key, 402 for insufficient credits, 413 for a request larger than 16 KB, 415 for the wrong content type, 422 for invalid inputs, 429 for a rate or daily limit, and 502 or 503 for a service failure.
MCP and API
The API uses birth details supplied with each request. MCP tools use your saved Xodiac profile and selected contacts instead. MCP and the API use separate credentials and the same account credits. MCP forecast dates use UTC unless a current location or timezone is requested. MCP results can still reveal sensitive astrological inferences to the connected provider.
Readings are symbolic and do not predict outcomes. Raw data and readings are separate outputs. Reading text does not identify its source factors.