Playground

Run the compute API's examples.

Pick one of the 14 documented requests, or write your own, then send it to the compute API and run it in this browser. The browser run uses the API's own code, @zodiacs/engine 1.0.0 with astronomy-engine 2.1.19, so the two answers can be compared field by field, and each with the answer the documentation gives.

Nothing leaves this page unless you send it. A request sent to the API follows its privacy rules: birth data goes only in the body, and the function writes nothing from a request to a log, a file or a database.

Send posts this body to /api/v1/chart on zodiacs.org. Run in this browser loads the API's calculations into this page, about 155 KB compressed, and sends nothing.

The API

This browser

This request in code

curl --silent --show-error https://zodiacs.org/api/v1/chart \
  --header 'Content-Type: application/json' \
  --data-raw ''

Each uses its language's standard library and prints the answer's body.

What it compares

The two answers are compared as JSON, path by path. Where they differ, each difference is named for its cause:

  • runtime: a receipt names the runtime that read local times: Node and the tzdb release its Intl reads, or a browser, which does not report that release. A receipt computed here names the browser and records null where the server's names Node and its release.
  • citation: the digest of a receipt that differs, which differs with it.
  • rounding: two numbers within 1e-8 of each other. Speeds are central differences, and a runtime's own sine and cosine can move their last digits.
  • value: anything else. The playground calls such answers different.

While the request is still a documented one, both answers are also compared with the documented answer, which the API's handler produced (the OpenAPI document carries the same examples).

Citations

Every answer carries a receipt and a cite. Its cite.receipt is sha256: and the hex SHA-256 of the receipt's RFC 8785 canonical JSON. The playground computes that digest again with this browser's own SHA-256 and says whether it matches.

The browser run

The bundle holds the API's request parsing and calculations, the engine, astronomy-engine and the engine's zone histories before 1970, about 155 KB compressed. It loads the first time you run a request here, reads the body as the API does once a request has arrived (its size, then its JSON), and answers with the same statuses and refusals. Refusals that come from how a request is framed or from the server's state, such as the rate limit, are not part of it; the errors section documents them.

A link to the playground names the endpoint, and the documented example while the request is still that example. It carries the request itself only when you tick the box, and then after the #, which a browser never sends to a server. Anyone with such a link can read what it carries.

For agents

The Markdown version of this page lists every request with a cURL command and its documented citation digest, and examples.json holds each request with its documented answer. An agent reproduces an example by sending its body to https://zodiacs.org/api/v1/ and comparing the answer with the documented one.