How the explorer reads a response
- It detects the shape. A success envelope has
request_id,data,interpretationandmeta; an error haserror.code,error.messageand optionalerror.details; the chat API returns its fields at the top level with no envelope. - It flattens the JSON into dotted paths, with arrays written as
planets[].sign, the same spelling the field tables on every endpoint page use. Arrays show their first three items. - It matches the endpoint by scoring how many of your paths each endpoint's schema declares, minus a penalty for declared fields you lack. Override the guess from the menu if you know the endpoint.
- It annotates each field as documented, envelope, not in schema, or type differs - a number where the schema says string, for example.
Where the field descriptions come from
The schemas are generated from AstroNode's OpenAPI specs and checked for drift in CI. For endpoints whose response the spec leaves open, the field list was inferred from a real recorded response; the explorer says so, because an optional field can be absent from yours without anything being wrong. The one-click samples are those recorded responses, abridged.
Conventions worth knowing
- Angles are decimal degrees.
degree_in_signis 0-30 within the sign; full longitudes are 0-360. - `meta.ayanamsa` and `meta.house_system` inside
datasay which conventions produced a chart - record them with the result. - Top-level `meta.engine_version` identifies the engine build. Store it next to cached results so you can invalidate them after an engine change.
- `interpretation` is a separate prose layer and may be
null; never parse prose for values that exist as fields. - Times are ISO-8601. A few responses also carry a UT Julian Day; convert it with the Julian Day converter.
Common mistakes
- Reading `data` from the chat API. Chat responses have no envelope - read the fields directly.
- Branching on `error.message`. Messages can be reworded. Branch on
error.code. - Strict-typing every optional field as required. Schemas inferred from a recording show fields that were present in that response; treat absent optional fields as normal.
- Comparing `computed_at`. It is the only field that changes between identical requests; exclude it when diffing responses or keying a cache.
FAQ
- Is my pasted response uploaded anywhere?
- No. Parsing, matching and annotation all run in your browser; the schemas are part of the page.
- Why is a field marked "not in schema"?
- Either the explorer matched the wrong endpoint (pick the right one from the menu), or the field is deeper than the generated tables go - they flatten three levels - or it is new. The endpoint page has the full reference.
- Can I generate TypeScript types from this?
- Use the OpenAPI spec for that; the explorer is for reading a response you already have.