Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
description: '**Open Ephemeris Engine** - Professional Astrological Calculations
A high-performance REST API for precise astrological chart calculations using the SuperNOVAS / Calceph engine. ## Features
- 🎯 **Precise Calculations**: SuperNOVAS / Calceph backend (NASA DE440) for astronomical accuracy
- 🏗️ **Flexible Input Formats**: Support for multiple coordinate, datetime, and timezone formats
- 🏠 **Seven House Systems**: Placidus (default), Koch, Porphyry, Regiomontanus, Campanus, Equal, and Whole Sign — the complete set, enumerated by `GET /ephemeris/house-systems`
- ⚡ **High Performance**: Parallel processing and intelligent caching
- 📊 **Comprehensive Data**: Complete natal charts with planets, houses, angles, and aspects
- 🔒 **Input Validation**: Robust validation with clear error messages
- 📖 **OpenAPI Documentation**: Interactive API documentation and schema validation
- 🪐 **Transit Calculations**: Precise planetary transit timing with retrograde support
- 📅 **Predictive Features**: Solar/lunar returns, sign ingresses, and future transits
- 🤖 **Agent-First Design**: Optimized for LLM consumption and autonomous tool use
## Agent-First Design
Open Ephemeris is built from the ground up to be "Agent-First". This means:
1. **High Information Density**: We provide comprehensive metadata to minimize the need for external lookup. 2. **Optimized Projections**: The `format=llm` parameter converts raw astronomical data into a structure that LLMs can reason about more effectively, reducing token usage while preserving interpretive nuance. 3. **Deterministic Contract**: API responses are versioned and strictly typed to ensure reliable tool-calling for AI agents. ### Output Modes (`format` parameter)
Endpoints supporting enhanced formatting accept a `format` query parameter:
- `format=json` (default): The full, raw response schema — every field the endpoint produces, in its complete nested form. Choose it when you need the whole object graph. It does not carry more numeric resolution than `format=llm`: most angular values are serialized as 32-bit floats in both, which quantizes them to at worst about 0.055 arcsec (the step grows with the angle — finest near 0°, coarsest approaching 360°). `format=json` returns more fields, not more decimal places. - `format=llm`: A token-optimized projection. It replaces complex nested objects with flattened, "punchy" descriptions that provide immediate context for an LLM (e.g., automatically including the sign name alongside the degree). ## Authentication
Open Ephemeris supports several authentication modes:
1. **JWT tokens (end users)** via Supabase:
```http
Authorization: Bearer
```
2. **User API keys (integrations)** via `X-OpenEphemeris-API-Key`, `X-API-Key`, or `Authorization: Bearer`:
```http
X-OpenEphemeris-API-Key: opene-... ```
or
```http
Authorization: Bearer opene-... ```
*Note: Use `X-OpenEphemeris-API-Key` if your infrastructure (e.g. AWS/Azure) intercepts the standard `X-API-Key` header.*
3. **Service API keys (internal services)** via `X-Service-Key` header:
```http
X-Service-Key:
```
Valid service keys are intended for trusted internal services and
bypass rate limits. User requests remain subject to tier-based
rate limiting and usage metering. ## Supported Formats
### Coordinates
- **Decimal degrees**: `40.7128, -74.0060`
- **DMS strings**: `"40°42''46"N", "74°00''22"W"`
- **Component objects**: `{"degrees": 40, "minutes": 42, "seconds": 46, "direction": "N"}`
### DateTime
**A datetime that states a clock time must also state its zone.** A
zone-less clock time is rejected with `400 ambiguous_datetime`; it is not
assumed to be UTC. An unstated zone moves the Ascendant by roughly 15° per
hour while every planet keeps its sign, so a guess would be a confident
wrong answer.'
title: Open Ephemeris Catalogs API
version: 1.0.0
servers:
- description: Production
url: https://api.openephemeris.com
tags:
- description: Explore our extensive reference catalogs. See all supported planets, asteroids, fixed stars, and star groups available for calculation. **Free — not metered.**
name: Catalogs
paths:
/catalogs/bodies:
get:
description: Catalog-driven identifiers for selectable natal bodies (planets, nodes, Lilith points, major asteroids). This surface is intended for commercial clients and UIs.
operationId: get_bodies_catalog_catalogs_bodies_get
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CatalogBodiesResponse'
description: Successful Response
security:
- bearerAuth: []
- meridianApiKeyAuth: []
- apiKeyAuth: []
- serviceKeyAuth: []
summary: Catalog of supported natal bodies
tags:
- Catalogs
x-meridian-status: live
x-meridian-tier: Explorer
x-meridian-units: 0
/catalogs/fixed-stars:
get:
description: Returns fixed stars discoverable via the built-in star catalog when available, falling back to the built-in registry for core stars.
operationId: get_fixed_stars_catalogs_fixed_stars_get
parameters:
- description: Page size
in: query
name: limit
required: false
schema:
default: 100
description: Page size
maximum: 500
minimum: 1
title: Limit
type: integer
- description: Offset into the full list
in: query
name: offset
required: false
schema:
default: 0
description: Offset into the full list
minimum: 0
title: Offset
type: integer
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CatalogFixedStarsResponse'
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
security:
- bearerAuth: []
- meridianApiKeyAuth: []
- apiKeyAuth: []
- serviceKeyAuth: []
summary: Catalog of fixed stars (paginated)
tags:
- Catalogs
x-meridian-status: live
x-meridian-tier: Explorer
x-meridian-units: 0
/catalogs/fixed-stars/groups:
get:
description: Named fixed-star groups (royal stars, Behenian, Ptolemaic, galactic) for filtering /catalogs/fixed-stars queries.
operationId: get_fixed_star_groups_catalogs_fixed_stars_groups_get
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CatalogFixedStarGroupsResponse'
description: Successful Response
security:
- bearerAuth: []
- meridianApiKeyAuth: []
- apiKeyAuth: []
- serviceKeyAuth: []
summary: Catalog of fixed star group identifiers
tags:
- Catalogs
x-meridian-status: live
x-meridian-tier: Explorer
x-meridian-units: 0
components:
schemas:
CatalogFixedStarGroupItem:
additionalProperties: false
description: Single fixed star group descriptor.
properties:
description:
anyOf:
- type: string
description: Short description
title: Description
id:
description: Stable group identifier (e.g., 'royal_stars')
title: Id
type: string
name:
description: Human-friendly name
title: Name
type: string
star_count:
description: Number of stars in the group
title: Star Count
type: integer
required:
- id
- name
- star_count
title: CatalogFixedStarGroupItem
type: object
CatalogBodyItem:
additionalProperties: false
description: Individual celestial body catalog entry.
properties:
aliases:
description: Alternative names
items:
type: string
title: Aliases
type: array
average_distance_au:
anyOf:
- type: number
description: Average distance from Sun
title: Average Distance Au
calculation_accuracy:
anyOf:
- type: string
description: Calculation accuracy level
title: Calculation Accuracy
category:
description: Body category (planet, asteroid, etc.)
title: Category
type: string
diameter_km:
anyOf:
- type: number
description: Diameter in kilometers
title: Diameter Km
discoverer:
anyOf:
- type: string
description: Discoverer name
title: Discoverer
discovery_date:
anyOf:
- format: date-time
type: string
description: Discovery date
title: Discovery Date
ephemeris_available:
description: Can be calculated
title: Ephemeris Available
type: boolean
id:
description: Canonical identifier for the body (stable). Typically lowercase/underscore, aligned with interpretation/feature-id conventions (e.g., 'sun', 'north_node_mean').
title: Id
type: string
keywords:
description: Astrological keywords
items:
type: string
title: Keywords
type: array
magnitude:
anyOf:
- type: number
description: Apparent magnitude
title: Magnitude
mass_kg:
anyOf:
- type: number
description: Mass in kilograms
title: Mass Kg
mythology:
anyOf:
- type: string
description: Mythological associations
title: Mythology
name:
description: Body name
title: Name
type: string
orbital_period_days:
anyOf:
- type: number
description: Orbital period
title: Orbital Period Days
subcategory:
anyOf:
- type: string
description: Subcategory
title: Subcategory
swiss_ephemeris_id:
anyOf:
- type: integer
description: Optional SE-compatible numeric id when applicable (e.g., 0=Sun). Use this for endpoints that accept numeric planet ids.
title: SE-compatible Body Id
symbol:
anyOf:
- type: string
description: Astrological symbol
title: Symbol
traditional_rulership:
anyOf:
- type: string
description: Traditional sign rulership
title: Traditional Rulership
valid_from:
description: First date this body is computed at full precision (YYYY-MM-DD). The planets, nodes and sb441 main-belt asteroids share DE440's 1550-01-01; bodies with their own JPL kernel (centaurs, trans-Neptunian objects, extended asteroids) start later (1600-01-01). Outside valid_from..valid_to the body is refused, not approximated.
title: Valid From
type:
- string
- 'null'
valid_to:
description: Last date this body is computed at full precision (YYYY-MM-DD). DE440 bodies end 2650-01-22; per-body-kernel bodies end 2200-01-01.
title: Valid To
type:
- string
- 'null'
required:
- id
- name
- category
- ephemeris_available
title: CatalogBodyItem
type: object
PrecisionSummary:
additionalProperties: true
description: Structured precision report for calculation metadata.
properties:
max_position_error_arcseconds:
anyOf:
- type: number
description: Maximum validated positional error in arcseconds
title: Max Position Error Arcseconds
max_timing_error_seconds:
anyOf:
- type: number
description: Maximum validated timing error in seconds
title: Max Timing Error Seconds
notes:
anyOf:
- type: string
description: Additional human-readable context for the precision summary
title: Notes
reference_profile:
anyOf:
- type: string
description: Reference dataset or validation profile used for the comparison
title: Reference Profile
title: PrecisionSummary
type: object
DeltaTSourceEnum:
description: Source of ΔT values used in calculations.
enum:
- nasa_jpl
- iers
- approximation_model
title: DeltaTSourceEnum
type: string
CatalogFixedStarItem:
additionalProperties: false
description: Single fixed star catalog entry.
properties:
constellation:
anyOf:
- type: string
description: Constellation
title: Constellation
feature_id:
description: Interpretation feature_id (e.g., 'fixedstar_regulus')
title: Feature Id
type: string
id:
description: Canonical fixed star id (e.g., 'regulus', 'deneb_algedi')
title: Id
type: string
magnitude:
anyOf:
- type: number
description: Visual magnitude
title: Magnitude
name:
description: Display name (catalog/fallback name)
title: Name
type: string
traditional_name:
anyOf:
- type: string
description: Traditional/alternative name
title: Traditional Name
required:
- id
- name
- feature_id
title: CatalogFixedStarItem
type: object
FixedStarCatalogEnum:
description: Fixed star catalog snapshots.
enum:
- bright_mag3
- bright_mag5
- royal_stars
- parans_key
title: FixedStarCatalogEnum
type: string
CatalogFixedStarGroupsResponse:
additionalProperties: false
description: Response with available fixed star group identifiers.
properties:
calculation_metadata:
$ref: '#/components/schemas/CalculationMetadata'
description: Canonical calculation metadata describing the catalog source
catalog_version:
description: Catalog version
title: Catalog Version
type: string
groups:
description: Available groups
items:
$ref: '#/components/schemas/CatalogFixedStarGroupItem'
title: Groups
type: array
last_updated:
description: Last update timestamp
format: date-time
title: Last Updated
type: string
total_count:
description: Total group count
title: Total Count
type: integer
required:
- groups
- total_count
- catalog_version
- last_updated
title: CatalogFixedStarGroupsResponse
type: object
TimeScaleEnum:
description: Time scale used for reporting results.
enum:
- UTC
- TT
- TDB
title: TimeScaleEnum
type: string
NodeSourceEnum:
description: Node/apsides calculation modes (SE §2.2).
enum:
- true_osculating
- mean
- mean_apsides
title: NodeSourceEnum
type: string
CatalogFixedStarsResponse:
additionalProperties: false
description: Paginated response for fixed stars catalog.
properties:
calculation_metadata:
$ref: '#/components/schemas/CalculationMetadata'
description: Canonical calculation metadata describing the catalog source
catalog_version:
description: Catalog version
title: Catalog Version
type: string
last_updated:
description: Last update timestamp
format: date-time
title: Last Updated
type: string
limit:
description: Page size
title: Limit
type: integer
offset:
description: Offset into the full list
title: Offset
type: integer
stars:
description: Fixed star catalog entries
items:
$ref: '#/components/schemas/CatalogFixedStarItem'
title: Stars
type: array
total_count:
description: Total number of stars available
title: Total Count
type: integer
required:
- stars
- total_count
- limit
- offset
- catalog_version
- last_updated
title: CatalogFixedStarsResponse
type: object
HouseSystemEnum:
description: Supported house systems.
enum:
- P
- K
- O
- R
- C
- E
- W
title: HouseSystemEnum
type: string
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
title: Detail
type: array
title: HTTPValidationError
type: object
AyanamsaEnum:
description: Supported sidereal ayanamsa options (krishnamurti is KP old, krishnamurti_vp291 KP new). All six are computed from the same IAU 2006 general-precession model, so each is epoch-dependent rather than a frozen constant; they differ by up to ~2.3 degrees, which is enough to move a body across a sign boundary. Defaults to lahiri when zodiac_type is sidereal and no system is named.
enum:
- lahiri
- fagan_bradley
- krishnamurti
- krishnamurti_vp291
- raman
- yukteshwar
title: AyanamsaEnum
type: string
CalculationMetadata:
additionalProperties: true
description: 'Metadata about chart calculations.
Relaxed to allow minimal fields used by tests while remaining forward-compatible.'
properties:
ascendant_on_left:
default: true
description: When true (default), the Ascendant is placed at the 9 o'clock (West/left) position � matching the convention used by Astro.com, Solar Fire, and all major astrology software. Set to false to use the ecliptic-fixed (Aries-pinned) orientation instead.
title: Ascendant on Left
type:
- boolean
- 'null'
ayanamsa:
anyOf:
- $ref: '#/components/schemas/AyanamsaEnum'
- type: string
description: Sidereal ayanamsa selection
title: Ayanamsa
calculation_time:
anyOf:
- type: number
description: Legacy calculation time in seconds
title: Calculation Time
calculation_time_ms:
anyOf:
- type: number
description: Processing time at the orchestrator layer in milliseconds
title: Calculation Time Ms
calculation_time_utc:
anyOf:
- format: date-time
type: string
description: UTC timestamp when the calculation executed
title: Calculation Time Utc
coordinate_reference_frame:
anyOf:
- type: string
description: 'Coordinate frame the positions are expressed in, always the TRUE ecliptic of date: geocentric_true_ecliptic_of_date (apparent place from the Earth''s centre), topocentric_true_ecliptic_of_date (apparent place from the observer, with diurnal parallax and aberration; geometric, no refraction, observer height 0), heliocentric_true_ecliptic_of_date and barycentric_true_ecliptic_of_date (light-time-corrected astrometric place from the Sun''s centre / the solar-system barycentre: no aberration, no gravitational deflection; target sampled at t minus light time, origin at t). The label names the frame that was computed; a response never claims one it did not use.'
title: Coordinate Reference Frame
coordinate_system:
anyOf:
- $ref: '#/components/schemas/CoordinateSystemEnum'
- type: string
description: 'Coordinate system the positions were computed in: geocentric, topocentric, heliocentric or barycentric.'
title: Coordinate System
delta_t_seconds:
anyOf:
- type: number
description: Delta T (TT - UT1) applied during calculation, in seconds
title: Delta T Seconds
delta_t_source:
anyOf:
- $ref: '#/components/schemas/DeltaTSourceEnum'
- type: string
description: Source of Delta T values (computation engine, IERS, approximation)
title: Delta T Source
ephemeris_source:
anyOf:
- type: string
description: Primary ephemeris source (e.g., SuperNOVAS / Calceph)
title: Ephemeris Source
ephemeris_version:
anyOf:
- type: string
description: Version of the ephemeris data files
title: Ephemeris Version
fixed_star_catalog:
anyOf:
- $ref: '#/components/schemas/FixedStarCatalogEnum'
- type: string
description: Fixed star catalog or subset identifier
title: Fixed Star Catalog
house_system:
anyOf:
- $ref: '#/components/schemas/HouseSystemEnum'
- type: string
description: House system actually used during calculation
title: House System
include_fixed_stars:
anyOf:
- type: boolean
description: Whether fixed stars were included
title: Include Fixed Stars
julian_day:
anyOf:
- format: double
type: number
description: Julian Day Number representing the calculation instant
title: Julian Day
lunar_nodes:
additionalProperties:
type: object
description: 'How each lunar node and apogee body in this response was computed, keyed by the body''s name in the planets block (e.g. "North Node (True)"). Each entry carries `method` (`mean` or `true_osculating`) and `algorithm`; the true node also carries `frame` and `matches` (the Swiss Ephemeris equivalent), and a South Node carries `derived_from` and `offset`. Only bodies actually present in the response appear. Authoritative per body: when both nodes are returned, `node_source` alone cannot say which is which.'
title: Lunar Nodes
type: object
missing_objects:
anyOf:
- additionalProperties:
items:
type: object
type: array
type: object
description: Objects that could not be calculated along with reasons
title: Missing Objects
node_source:
anyOf:
- $ref: '#/components/schemas/NodeSourceEnum'
- type: string
description: 'Lunar node/apsides mode in effect. Echoes `configuration.node_source` when the request sent one (it also selects the Lilith variant). Otherwise names the nodes the response carries: `mean`, `true_osculating`, or `mean_and_true_osculating` for the default roster, which returns both North Nodes. Omitted when the response carries no lunar node. See `lunar_nodes` for the per-body method.'
title: Node Source
object_set:
anyOf:
- $ref: '#/components/schemas/ObjectSetEnum'
- type: string
description: Named object set or preset powering the calculation
title: Object Set
orb_system_used:
anyOf:
- type: string
description: Aspect orb system applied
title: Orb System Used
precision_level:
anyOf:
- type: string
description: Legacy precision descriptor
title: Precision Level
precision_summary:
$ref: '#/components/schemas/PrecisionSummary'
description: Structured precision summary aligned with validation results
processing_time_ms:
anyOf:
- type: number
description: End-to-end processing time in milliseconds
title: Processing Time Ms
server_version:
description: Build identifier of the engine that produced this response. Moves on every deploy, so it is the signal for resolution-LOGIC changes — the class of change that can move a historical offset without touching overlay data (and therefore without moving tz_overlay_version). Poll both.
title: Server Version
type: string
sidereal_time:
anyOf:
- type: number
description: Local sidereal time in hours
title: Sidereal Time
technique_id:
anyOf:
- type: string
description: High-level technique identifier (e.g., natal, synastry, composite, overlay)
example: natal
title: Technique Id
technique_label:
anyOf:
- type: string
description: Human-readable technique label
example: Composite (Davison)
title: Technique Label
technique_method:
anyOf:
- type: string
description: Method name within a technique (e.g., davidson, midpoint)
example: davidson
title: Technique Method
technique_version:
anyOf:
- type: string
description: Technique implementation version (for future-proofing)
example: v1
title: Technique Version
time_scale:
anyOf:
- $ref: '#/components/schemas/TimeScaleEnum'
- type: string
description: Time scale used for internal calculations (UTC, TT, TDB)
title: Time Scale
tz_overlay_hash:
description: Content hash of the historical-correction overlay dataset that produced this answer. Stamped only when an overlay row applied (tz_rule_source starts with 'overlay:').
title: Tz Overlay Hash
type: string
tz_overlay_version:
description: Monotonic version of the historical-correction overlay dataset that produced this answer. Stamped only when an overlay row applied. Tracks overlay DATA only — pair with server_version to also catch resolution-logic changes.
title: Tz Overlay Version
type: integer
tz_precision:
description: 'Sourcing grade of the overlay row that produced the offset: ''statutory'' (operative text of a session law or statute verified), ''documented'' (contemporary reporting), or ''inferred'' (deduced from legal context; verify before relying on it near the row''s edges). Stamped only when an overlay row applied.'
enum:
- statutory
- documented
- inferred
title: Tz Precision
type: string
tz_rule_citation:
description: Primary-source citation for the overlay row that produced the offset — statute reference, ICC/agency order number, or documented press/almanac source. Stamped only when an overlay row applied.
title: Tz Rule Citation
type: string
zodiac_type:
anyOf:
- $ref: '#/components/schemas/ZodiacTypeEnum'
- type: string
description: Zodiac framework applied (tropical/sidereal)
title: Zodiac Type
title: CalculationMetadata
type: object
ZodiacTypeEnum:
description: Supported zodiac frameworks.
enum:
- tropical
- sidereal
title: ZodiacTypeEnum
type: string
ObjectSetEnum:
description: Standardized celestial object bundles.
enum:
- traditional_7
- modern_10
- modern_plus_chiron
- asteroids_major
- full
- custom
title: ObjectSetEnum
type: string
CoordinateSystemEnum:
description: Coordinate system used for calculations.
enum:
- geocentric
- topocentric
- heliocentric
- barycentric
title: CoordinateSystemEnum
type: string
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
title: Location
type: array
msg:
title: Message
type: string
type:
title: Error Type
type: string
required:
- loc
- msg
- type
title: ValidationError
type: object
CatalogBodiesResponse:
additionalProperties: false
description: Response with celestial bodies catalog.
properties:
bodies:
description: Catalog entries
items:
$ref: '#/components/schemas/CatalogBodyItem'
title: Bodies
type: array
calculation_metadata:
$ref: '#/components/schemas/CalculationMetadata'
description: Canonical calculation metadata describing the catalog source
calculation_support:
additionalProperties:
type: integer
description: Calculation availability
title: Calculation Support
type: object
catalog_version:
description: Catalog version
title: Catalog Version
type: string
categories:
additionalProperties:
type: integer
description: Count by category
title: Categories
type: object
filters_applied:
description: Applied filters
title: Filters Applied
type: object
last_updated:
description: Last update timestamp
format: date-time
title: Last Updated
type: string
total_count:
description: Total number of bodies
title: Total Count
type: integer
required:
- bodies
- total_count
- filters_applied
- categories
- calculation_support
- catalog_version
- last_updated
title: CatalogBodiesResponse
type: object
securitySchemes:
apiKeyAuth:
in: header
name: X-API-Key
type: apiKey
bearerAuth:
bearerFormat: JWT/API-Key
scheme: bearer
type: http
meridianApiKeyAuth:
in: header
name: X-OpenEphemeris-API-Key
type: apiKey
serviceKeyAuth:
in: header
name: X-Service-Key
type: apiKey