Astrology API

Compute charts, positions, houses, events, local times and sky facts over HTTP: seven POST endpoints, no key, and a receipt with every answer.

Engine 1.0.0: On npm. Archive identity and release status.

Read this page as Markdown

Call the Compute API

The Compute API has seven POST endpoints under https://zodiacs.org/api/v1/: chart, positions, houses, events, time, sky-fact and elections. It needs no key and no account. You send JSON; each answer gives the result, a receipt that says how it was computed, and the name and version of the engine that computed it.

This example lists a month of sign changes, stations and new and full moons for three bodies. It is the API's own documented request, and the guide checks run this code against the API's committed answer to it.

const response = await fetch('https://zodiacs.org/api/v1/events', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    from: '2026-10-01T00:00:00Z',
    to: '2026-11-01T00:00:00Z',
    bodies: ['Sun', 'Mercury', 'Venus'],
    kinds: ['ingress', 'station', 'lunation'],
  }),
});
const answer = await response.json();
if (!response.ok) throw new Error(`The service refused this request: ${response.status} ${answer.error?.code}`);
for (const event of answer.result.events) console.log(event.at, event.kind, event.type ?? '', event.body ?? '', event.sign);
console.log(answer.backend.name, answer.backend.version, answer.cite.receipt);

What comes back

The receipt names the conventions behind the numbers, among them the tropical zodiac, apparent geocentric positions and the time scale, the engine and its ephemeris, and the coverage the answer can claim. Its SHA-256 is cite.receipt, to store beside a result and show later what produced it. For a chart or houses the receipt holds the birth instant and place, so its digest can identify them: keep it as you keep birth details.

A refusal is a fixed sentence with a code, such as invalid-request or budget-exhausted, and a 429 or 503 answer carries Retry-After. The limits, such as 92 days for an events window, are on the API reference.

This API or another

The API runs @zodiacs/engine 1.0.0, which is on npm under MIT AND CC-BY-4.0. The same calculation can run in your own process instead, with no request leaving it, and its receipt names the same engine.

Swiss Ephemeris is licensed under the AGPL or Astrodienst's paid Swiss Ephemeris Professional License. This API does not use it: the engine's tests compare its positions with NASA JPL Horizons, and published records compare them with Swiss Ephemeris.

The function writes nothing from a request or its result to a log, a file or a database, but the host's short-lived logs keep the full web address and the IP address of every request: put birth details in the body, never in the address.

References