API Examples #
Complete request/response examples for every Astrologer API v5 endpoint. Each example includes a full JSON request body and the corresponding response payload.
Note: Chart SVG examples include a visual preview rendered from the test baselines.
Chart Endpoints (SVG) #
Endpoints that return rendered SVG chart images along with calculated data.
| Chart Type | Example | Preview |
|---|---|---|
| Natal Chart | View Example | |
| Now Chart | View Example | |
| Synastry Chart | View Example | |
| Composite Chart | View Example | |
| Transit Chart | View Example | |
| Solar Return Chart | View Example | |
| Lunar Return Chart | View Example |
Data Endpoints (JSON) #
Endpoints that return raw calculated data without visual charts. Ideal for custom rendering or analysis.
Subject Data #
| Endpoint | Example | Description |
|---|---|---|
POST /api/v5/subject |
View Example | Calculate a subject’s astrological data from birth info. |
POST /api/v5/now/subject |
View Example | Get the current moment’s astrological data (UTC/Greenwich). |
Chart Data #
| Endpoint | Example | Description |
|---|---|---|
POST /api/v5/chart-data/birth-chart |
View Example | Full natal chart calculations (planets, houses, aspects, distributions). |
POST /api/v5/chart-data/synastry |
View Example | Synastry data comparing two subjects. |
POST /api/v5/chart-data/composite |
View Example | Composite midpoint chart data for two subjects. |
POST /api/v5/chart-data/transit |
View Example | Transit data comparing natal vs. transit moment. |
POST /api/v5/chart-data/solar-return |
View Example | Solar return chart data for a given year. |
POST /api/v5/chart-data/lunar-return |
View Example | Lunar return chart data for a given period. |
Compatibility #
| Endpoint | Example | Description |
|---|---|---|
POST /api/v5/compatibility-score |
View Example | Ciro Discepolo compatibility score between two subjects. |
Moon Phase Endpoints #
Dedicated endpoints for detailed lunar phase analysis, using a simplified request model (no subject wrapper).
| Endpoint | Example | Description |
|---|---|---|
POST /api/v5/moon-phase |
View Example | Detailed moon phase for a specific date/time and location. |
POST /api/v5/moon-phase/now-utc |
View Example | Current moon phase at Greenwich (no request body needed). |
POST /api/v5/moon-phase/context |
View Example | Moon phase with AI-optimized XML context. |
POST /api/v5/moon-phase/now-utc/context |
View Example | Current moon phase with AI-optimized XML context. |
Context Endpoints (AI) #
Endpoints that return AI-optimized XML interpretations along with the calculated data. Designed for injection into LLM prompts.
Subject Context #
| Endpoint | Example | Description |
|---|---|---|
POST /api/v5/context/subject |
View Example | Subject planetary positions with AI-structured XML context. |
POST /api/v5/now/context |
View Example | Current moment with AI-structured XML context. |
Chart Context #
| Endpoint | Example | Description |
|---|---|---|
POST /api/v5/context/birth-chart |
View Example | Natal chart with full AI interpretation (aspects, distributions, houses). |
POST /api/v5/context/synastry |
View Example | Synastry comparison with AI relationship analysis. |
POST /api/v5/context/composite |
View Example | Composite chart with AI relationship-entity analysis. |
POST /api/v5/context/transit |
View Example | Transit chart with AI predictive analysis. |
POST /api/v5/context/solar-return |
View Example | Solar return with AI yearly forecast context. |
POST /api/v5/context/lunar-return |
View Example | Lunar return with AI monthly forecast context. |