Compute your first chart over REST in minutes. 52 calculation techniques and 79 documented operations behind one key.
Getting Started
The API base is api.astromansion.com, active version v1. Every endpoint speaks JSON. Your first call needs no signup. The command below runs without a key under IP-based Free limits. For regular use, create a free account, grab your API key and send it in the X-API-Key header.
cURL
curl-XPOSThttps://api.astromansion.com/v1/natal \
-H"Content-Type: application/json" \
-d '{"birth": {"date": "1990-07-15", "time": "14:30",
"lat": 51.5074, "lon": -0.1278,
"timezone": "Europe/London", "houses": "placidus"},
"options": {}}'
# The response is data only (summary, planets, aspects). For the wheel, add "wheel": true to options. The SVG arrives in the response's "wheel" field.
# To narrow the set of planets:
# "options": {"include": ["Sun","Moon","Mars"], "exclude": ["Pluto"]}
# For an image, also: POSThttps://api.astromansion.com/v1/render/svg
Integration kit
Download the versioned contract or a starter client for your environment. The clients are thin REST layers. Keep the API key in trusted server code only.
Send your key in the X-API-Key header on every request (or as Authorization: Bearer <key>). Keys start with the am_ prefix. Only their SHA-256 digest is stored server-side. Your key shows your plan (Free, Basic, Pro, Enterprise), which sets the endpoints you can use and your monthly requests. An unknown key returns 401.
cURL
# Recommended: the X-API-Key header
curl"https://api.astromansion.com/v1/geo/search?q=Kad%C4%B1k%C3%B6y&limit=5"-H"X-API-Key: am_..."
# The same thing, the other way
curl"https://api.astromansion.com/v1/geo/search?q=Kad%C4%B1k%C3%B6y&limit=5"-H"Authorization: Bearer am_..."
Case
HTTP
What it means
No key sent
200 / 403 / 429
Without either header the request uses anonymous Free access. Free endpoints are limited by IP address. The endpoints of higher plans return 403, and requests over the per-minute or monthly limit return 429.
Key not recognised
401
Deleted, rotated or mistyped. Generate a new one from your account page.
Your plan does not cover it
403
The key is valid but this endpoint is closed on your plan. The response names the plan it needs.
Generate your key on the account page and rotate it whenever you like. The old key stops working the moment you do.
Rate Limits & Quotas
Three windows apply together: per-minute rate, daily ceiling and monthly quota. Exceeding any returns 429. Minute and day overruns carry the rate_limited code, and monthly quota exhaustion carries quota_exceeded. Counters bind to the key (or the IP when anonymous). The minute and day windows count every request. The monthly quota counts only answered calculations. A refused or failed request and a place search do not use it.
Plans
requests / mo
requests / min
requests / day
Free
100
3
30
Basic
2,000
30
2,000
Pro
20,000
120
20,000
Enterprise
200,000
600
200,000
Endpoint Reference
The 79 endpoints on this page, distinguished by HTTP method and path, are generated from one product manifest and the technique registry. Single-chart calculations take a birth body, and two-chart calculations take birth + partner. Technique settings travel in the options object. Full schemas live in Swagger. The GET /v1/health service check is excluded from this product-operation count; the HTTP benchmark on the accuracy page includes it.
Common request body
All technique endpoints share the same birth body: date (YYYY-MM-DD), time (HH:MM, optional), lat, lon, timezone (hour offset or IANA name), houses (optional house system). A sample transit scan:
Computes a natal chart from birth data. The default response contains the big-three summary, positions of the 10 classical planets, and every major aspect between the planets, the Ascendant and the MC that holds within its pair's orb limit, tightest first. The SVG wheel appears in the wheel field only when the request includes wheel=true. When time is omitted, the chart is cast at 12:00 local time, time_known is false, and the answer leaves out the Ascendant, the MC, the houses and every aspect to an angle, since only the time decides them. When timezone is omitted no offset is applied. For exact results send timezone or use the IANA zone returned by geo/search.
Request Fields
Field
Type
Required
Description
birth.date
string
Yes
Birth date in YYYY-MM-DD (same as the HTML date input).
birth.time
string
No
Birth time, HH:MM. Leave it out when unknown. The chart is then cast at 12:00 local time and the answer leaves out the angles and the houses.
birth.lat
number
Yes
Latitude in decimal degrees. Range -90 to 90.
birth.lon
number
Yes
Longitude in decimal degrees. Range -180 to 180.
birth.timezone
number | string
No
An IANA zone name such as Europe/London is read with the rules in force on the birth's date. A UTC offset in hours such as 3 must lie from -14 to 14 and is taken as given. Without a zone the time is read as UTC.
birth.houses
string
No
House-system name (for example placidus, whole, equal, or regiomontanus). Invalid names return 422.
options.lang
string
No
Response language hint (tr/en).
Response Fields
time_known
Whether the request gave the birth time. False when it did not. The chart is then cast at local noon, and the summary, the houses and the aspects leave out what only the time decides.
summary
Big-three + MC summary: Sun, Moon, ASC, MC keys, each carrying sign and degree (dms). Without a birth time, Sun and Moon only.
planets
List of the 10 classical planets: name, sign, degree (dms), house number and retrograde flag. Without a birth time, house is left out.
aspects
Major aspects below 1° orb: the two bodies, aspect name and orb (deviation in degrees). Without a birth time, between the planets only.
wheel
SVG wheel document present only when wheel=true is sent. Embeddable directly in a page.
POST/v1/sign
Returns one body's sign, degree and house at a birth. The Sun, the Moon and the planets are open on every plan. Other named bodies, such as Juno, Chiron, Ceres and Eris, need Basic or above. Without a birth time there is no degree or house, and the answer gives the signs the body held that day.
Request Fields
Field
Type
Required
Description
body
string
Yes
The body's published name, for example Venus or Juno. An unknown name is refused as a validation error.
birth
object
Yes
The birth, with the same fields as the natal request's birth.
options.lang
string
No
Response language hint (tr/en).
Response Fields
sign, dms, house
The sign at the birth's moment, the degree within it, and the house. Without a time the sign is read at the start of the day, and the degree and house are null.
retrograde
Whether the body moved backwards as seen from Earth. Null for the Sun and the Moon.
day_signs, change
The signs the body held on the birth's day, and the local time it changed sign, HH:MM, when it did.
GET/v1/geo/search
Returns place candidates for a birth-place picker. Searches a measured table of 286,480 places. The search is case- and diacritic-insensitive, handles the Turkish dotless-i correctly, and tolerates small typos. The returned timezone is an IANA zone. Using that zone's real offset at the birth date prevents historical daylight-saving mistakes.
Field
Type
Required
Description
q
string
Yes
Free-text place query, at least 2 characters. Text after a comma is a region hint: Springfield, US.
limit
integer
No
Maximum results, 1-20, default 6.
results[]: Place candidate: name, label (with region), lat, lon and IANA timezone fields.
Keep the default false value on Basic. true opens traversal of the full named catalog in pages of at most 160 bodies and requires Pro or above. Continue with catalog_offset until catalog_page.next_offset is null.
catalog_limit
integer
1..160
Basic
A catalog page accepts 1 to 160 bodies. The 160-body ceiling is fixed. Larger values return 422 and are never silently clamped.
The response when your plan does not cover it
HTTP
HTTP/1.1 403 Forbidden
{"error": {"code": "forbidden", "message": "This feature is not included in your plan.", "detail": "The full catalog, selections above 100 bodies, and all_bodies require the Pro plan or above"}}
POST/v1/planetary-system
A planet's satellites from 1900 to 2100 in three frames: seen from Earth, around the planet, and projected onto the natal circle
Computes the exact moments of Saturn returns from birth data. Each event carries the return number, date (DD-MM-YYYY), time (HH:MM, UT), sign and degree. The request body is identical to natal.
GET/v1/moon-phases
This is the Free annual calendar endpoint. It returns the year's four principal Moon phases in order and localizes sign names with lang. Each event carries the phase name, date, time (UT), sign and degree.
Field
Type
Required
Description
year
integer
Yes
Calendar year, 1800-2400.
lang
string
Optional
Response language hint (tr/en).
The annual calendar and filtered query are different endpoints
GET is a compact, localized annual view for consumer calendars. POST is a developer query with month or phase filters and astronomical machine fields. Neither computes a birth chart.
Contract
GET /v1/moon-phases
POST /v1/moon-phases/query
Minimum plan
Free
Basic
Input
Query string: year is required and lang is optional. There is no birth body.
JSON: year is required, and month and only are optional. There is no birth body.
Output
year plus localized events with display fields: phase, date, time, sign and dms.
year, month and only plus machine events with jd and lon. The phase and sign values remain stable English identifiers.
When to choose it
A complete annual calendar or end-user interface.
An integration that needs one month, selected phase types or astronomical coordinates.
The old /v1/moon-phase path remains available for backward compatibility, but new integrations should use /v1/moon-phases/query.
GET/v1/retrogrades
Returns the planetary retrograde cycles of the given year, a list of cycles for each planet. Every cycle carries the retrograde station (date, sign, degree) and the direct station (date, sign, degree).
Field
Type
Required
Description
year
integer
Yes
Calendar year, 1800-2400.
lang
string
Optional
Response language hint (tr/en).
GET/v1/eclipses
Returns the solar and lunar eclipses of the given year in order. Each event carries the kind (solar/lunar), subtype, date, time (UT), sign and degree.
Field
Type
Required
Description
year
integer
Yes
Calendar year, 1800-2400.
lang
string
Optional
Response language hint (tr/en).
GET/v1/void-moon
Returns the void-of-course Moon intervals of the given month. Each interval carries its start and end date/time, the ingress sign and duration in hours.
At the default false value, a report keeps AstroMansion branding. true removes that branding and is available on Pro and above.
logo_b64
string
non-empty
Pro
An empty value is valid on every plan. Supplying a base64 or data-URI logo requires Pro. An unauthorized value is rejected with 403 instead of being silently ignored.
The response when your plan does not cover it
HTTP
HTTP/1.1 403 Forbidden
{"error": {"code": "forbidden", "message": "This feature is not included in your plan.", "detail": "white_label and logo_b64 require the Pro plan or above"}}
POST/v1/render/astrocartography
Planetary lines over a world map, as SVG or PNG
Plan
Basic
Body
birth
options
place, lang, format
POST/v1/render/biwheel
BiWheel: natal inside, second chart outside
Plan
Basic
Body
birth + partner
options
watermark
POST/v1/render/chart
Any chart as a styled wheel: natal, rising sign, transits, synastry, composite, returns, progressions and solar arc. Without a birth time the wheel draws no houses or angles, and the rising sign is refused
The two batch endpoints deliver the same work differently
Both endpoints accept up to 20 independent techniques in one HTTP body and isolate item failures. Choose based on whether results should return on the same connection or through the queue.
Contract
POST /v1/batch
POST /v1/jobs/batch
Minimum plan and quota
Enterprise. Monthly plan quota 200,000
Pro or Enterprise. Monthly quotas 20,000 / 200,000
Execution
Computes items sequentially while the request connection remains open.
Queues the items. At most 3 jobs run at the same time.
Initial response
200. Each item's result or safe error envelope is returned inline.
202. Each item returns a job id, queued state and a one-time webhook secret when requested.
Limits and backpressure
The body holds up to 20 items and leaves no persistent active job.
The body holds up to 20 items. Queued + running is capped at 20 jobs per identity.
Result delivery
Inline before the connection closes. No polling or webhook.
Poll with GET /v1/jobs/{job_id} or use a signed webhook. Records remain for 24 hours.
Billing behavior
There is no extra batch surcharge. Each answered item consumes one monthly request. A refused item, or one whose calculation fails, consumes none. The outer batch envelope does not consume another unit.
POST/v1/batch
Enterprise synchronous batch: runs items in order and returns results in the same 200 response
Plan
Enterprise
Body
birth
options
items[]
GET/v1/jobs
List recent async jobs owned by the API key
Plan
Pro
Body
birth
POST/v1/jobs
Queue a long-running technique with polling and signed callback support
Plan
Pro
Body
birth
options
technique, body, callback_url
POST/v1/jobs/batch
Pro asynchronous batch: splits items into independent jobs and returns job ids with 202
Plan
Pro
Body
birth
options
items[]
GET/v1/jobs/{job_id}
Return an async job's state and its result when complete
Plan
Pro
Body
birth
options
job_id (path)
Webhook Delivery
For Pro and higher asynchronous jobs, supplying callback_url sends the terminal result as a signed JSON POST. Polling always remains available. A failed webhook delivery does not change the calculation result.
X-AstroMansion-Signature carries the HMAC-SHA256 signature of the exact raw body under the per-job secret, formatted as sha256=<hex>. Each attempt times out after 10 seconds. After the first attempt, delivery retries after 2, 8, 30 seconds for at most 4 total attempts. The job and delivery state remain for 24 hours. The webhook field in GET /v1/jobs/{job_id} exposes attempts, last_status and last_error.
Verify against the received raw bytes, not parsed JSON, and use a constant-time comparison. Production callbacks must use HTTPS. Redirects are not followed and private-network targets are rejected. Retries carry the same job id. Use id as the idempotency key and return 2xx again for an event already processed successfully.
Error Codes
Every error uses the same envelope: error.code is machine-readable, error.message is human-readable, and error.detail, when present, says what in the request to correct. The HTTP status gives the error class.
JSON
{"error":{"code":"rate_limited","message":"..."}}
Code
HTTP
Meaning
unauthorized
401
The key is invalid or unknown.
forbidden
403
The endpoint or an option you set is outside your plan, and error.detail names the plan that includes it.
rate_limited
429
Per-minute or daily rate limit exceeded.
quota_exceeded
429
Monthly request quota exhausted.
busy
503
The compute queue is full. Retry shortly.
compute_failed
400
The input could not be computed (an invalid date or location, for example).
validation
422
The body does not match the schema, and error.detail names the field that failed.
query_too_wide
400
The MansionSQL query asks for more bodies than one chart can hold. Narrow it with WHERE.
Product Terms
These six names mean the same thing across the site, API and pricing page. They are not interchangeable.
Calculation technique
A specific astrological calculation such as a natal chart, transit or synastry. It is not an HTTP address.
Endpoint
The combination of an HTTP method and a versioned path. One technique may be exposed through more than one endpoint.
Web tool
A site interface with an input form and result view. It may call one or more calculation techniques.
PDF report
A downloadable document generated from a calculation result. It is not itself a calculation technique or a subscription.
Celestial body
A physical astronomical object such as a planet, asteroid or star. Calculated points such as the Ascendant and Arabic lots are not celestial bodies.
Catalog entry
A record that can be found by name. Because entries include physical bodies and calculated points, this is not a celestial-body count.
Concepts
House Systems
The default is Placidus, and 20 systems are supported: placidus, koch, campanus, regiomontanus, porphyry, whole_sign, equal, equal_aries, equal_mc, vehlow, alcabitius, morinus, meridian, horizon, apc, topocentric, pullen_sd, pullen_sr, sunshine, sripati. Beyond the polar circle Placidus and Koch are undefined. Use whole or equal at those latitudes.
Aspects
Major aspects: conjunction (0°), opposition (180°), trine (120°), square (90°), sextile (60°). The Free response is limited to majors. Orb is the deviation from the exact angle, sorted tightest first.
Body Catalog
The catalog holds 1,308 named entries across 15 categories. This count combines physical bodies with calculated points such as Arabic lots and hypothetical points. It is not a unique physical-body count. Free responses are limited to the 10 classical planets. Basic opens up to 100 named-entry selections per request. Pro opens full named-catalog exports and the all_bodies operation.
Body selection (include / exclude / categories / exclusive)
Technique endpoints that support body selection take the keys inside options. On /v1/chart, include: ["Ceres","Chiron"] adds names to the default or category set. Likewise exclude: ["Pluto"] removes listed names and categories: ["asteroids","centaurs"] opens extended categories. Finally exclusive: true removes the default set. Use include with exclusive: true to calculate only the include list. Under the separate free /v1/natal contract, include is the final planet filter.
Timezone Resolution
An IANA zone is read with the rule in force on the birth's date. A London birth on 15-01-1990 computes at +0 and one on 15-07-1990 at +1, because that year's summer time applies. The rules come from the IANA time zone database, release 2026f. A time the clocks showed twice as they went back is read on its first pass. A time they skipped as they went forward is read with the offset in force before the change. To read either another way, send the offset in hours as timezone. One hour of offset error swings the Ascendant by about fifteen degrees, so pair the coordinates with the IANA zone that geo/search returns.