Calendar, double-wheel SVG, report, sensitivity, and fixed-star APIs
Six bounded beta endpoints for application backends. Each admitted call uses one standard quota unit; failed or timed-out admitted attempts are not refunded. Keep API keys server-side and do not automatically retry.
Public calculation dates are bounded from 1900-01-01 through 2050-12-31. The public gateway is https://api.astroapi.io/api/astro/.
Unified event calendar
POST /api/astro/event-calendar composes Moon phases, sign ingresses, stations, exact major aspects, and exact-hit-anchored aspect windows. Supply a whole-second UTC interval longer than zero and no more than 31 days, plus one or more event_types. Non-lunar selections require explicit bodies; aspects require at least two. Optional display_timezone adds local timestamps and include_ical returns bounded RFC 5545 text inside JSON. Stable event and series IDs support deduplication, but AstroAPI does not host a subscription feed or create external-calendar events.
{"start_utc":"2026-09-01T00:00:00Z","end_utc":"2026-09-08T00:00:00Z","event_types":["moon_phase","aspect"],"bodies":["sun","moon"],"display_timezone":"America/New_York","include_ical":true}
Synastry and transit double-wheel SVG
POST /api/astro/synastry-svg accepts personA and personB. POST /api/astro/transit-svg accepts a birth plus a required transitDate. Both return an original deterministic 1200×1120 SVG string in JSON, support tropical or sidereal positions, Equal, Whole Sign, or beta Placidus inner houses, light/dark themes, and optional major cross-chart aspect lines. They accept no uploaded SVG, markup, image, font, or URL; output is capped at 192 KiB.
Calculation-fact natal report
POST /api/astro/natal-report returns bounded standalone HTML plus a structured facts array. Every displayed fact has a stable ID and a source path back to the calculated chart field. An original natal SVG is included by default and can be disabled with include_svg: false. The HTML has a restrictive embedded Content Security Policy, no scripts, and no external resources. It is a calculation report—not generated interpretation, prediction, diagnosis, or advice.
Birth-time sensitivity
POST /api/astro/birth-time-sensitivity samples a positive civil-time interval of at most six hours at fixed five-minute steps, including both endpoints. It reports observed planet sign/house stability, Ascendant and Midheaven sign stability, transition brackets, and up to 73 samples. This is not an exhaustive boundary solver or birth-time rectification; unsampled changes are not excluded.
Fixed-star positions
POST /api/astro/fixed-stars calculates explicitly selected Aldebaran, Antares, Fomalhaut, Regulus, Sirius, and Spica for a civil instant in tropical or supported sidereal longitude. The six-star catalog uses CC0 source rows and its implementation was independently compared with Astropy/ERFA at five epochs; maximum measured differences were 0.001008 arcsecond longitude and 0.003579 arcsecond latitude. This endpoint contains no asteroids or minor-body kernels. Chiron, Pholus, Ceres, Pallas, Juno, Vesta, Hygiea, Psyche, Sappho, and Eros remain unavailable pending separate JPL permission and artifact admission.
{"at":{"date":"2026-09-23","time":"12:00","timezone":"UTC"},"stars":["aldebaran","regulus","sirius"],"zodiac":"tropical"}
Node.js 22+ example
Run this server-side with ASTROAPI_KEY in the process environment. Never expose the key in browser code.
const key = process.env.ASTROAPI_KEY;
if (!key) throw new Error("Set ASTROAPI_KEY");
const response = await fetch("https://api.astroapi.io/api/astro/fixed-stars", {
method: "POST",
headers: {
Authorization: `Bearer ${key}`,
"Content-Type": "application/json",
Accept: "application/json"
},
body: JSON.stringify({
at: {date: "2026-09-23", time: "12:00", timezone: "UTC"},
stars: ["aldebaran", "regulus", "sirius"]
}),
signal: AbortSignal.timeout(20000)
});
if (!response.ok) throw new Error(`AstroAPI returned ${response.status}`);
console.log(await response.json());
Clients and complete schemas
The Node client methods are eventCalendar, synastrySvg, transitSvg, natalReport, birthTimeSensitivity, and fixedStars. Python uses the matching snake-case names. Request and response schemas, errors, limits, and examples are in the OpenAPI JSON; runnable examples are in the Postman collection.
See also all endpoints, methodology, authentication, and the expanded divisional-chart reference.