Moon Phases
POST https://starsapi.com/api/v3/transit/western/moon-phasesReturns tropical lunar phases (new moon, full moon, quarters, and intermediate phases) with status annotation and cycle grouping. Supply an optional natal block to get the house each phase falls in for a given birth chart, plus tight hits to natal planets.
Authentication
Required.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
query_type | string | No | live, current, date, range, month, year, cycles. Default current. |
timezone | string | No | IANA timezone. Default UTC. |
date | string | * | Required for date. |
from_date, to_date | string | * | Required for range. |
month, year | integer | * | Required for month/year. |
count | integer | No | Lunation cycles for cycles query. Default 1, max 24. |
phase_filter | string | No | Filter: new_moon, full_moon, first_quarter, last_quarter, etc. Cannot combine with cycles. |
group_by_cycle | boolean | No | Group phases into lunation cycles on any query type. Default false. |
natal | object | No | Birth data for chart personalisation (see below). When present, every phase gains a natal block. |
query_type: live
Returns the Moon's state at this exact instant (not the next phase event): current illumination, phase, sign, and the upcoming New and Full Moons. Shaped as { live, next_phase, next_new_moon, next_full_moon } rather than a phases array. Each of these carries a natal block when natal is supplied.
The natal object
| Field | Type | Required | Description |
|---|---|---|---|
year, month, day | integer | Yes | Birth date. |
hour, minute | integer | Yes | Birth time (24h, local). |
second | integer | No | Default 0. |
latitude, longitude | number | Yes | Signed decimals (N/E positive). |
timezone | string | Yes | IANA timezone of birth. |
house_system | string | No | Default placidus. |
Response shape
Phase fields
| Field | Type | Description |
|---|---|---|
phase | string | Display name (e.g. New Moon). |
phase_key | string | Machine key (e.g. new_moon). |
phase_emoji | string | Unicode moon-phase emoji. |
datetime_utc | string | Exact phase time in UTC. |
datetime_local | string | Converted to requested timezone (already localised — do not append a tz label). |
illumination_pct | number | Percent of the disc lit (0–100). |
moon, sun | object | { sign, degree_in_sign, longitude }. |
status | string | past, current, or upcoming. |
days_from_now | number | Signed days from now. |
natal | object | Present only when natal supplied: { house, house_theme, hits[] }. Each hit is { natal_planet, aspect, orb } (conjunction/opposition within 3° to natal planets, Ascendant or Midheaven). |
Cycle fields (when grouped)
When group_by_cycle: true or query_type: cycles, phases are wrapped in lunation cycle objects. The new_moon/full_moon/lunation_* anchors are UTC; for display use the datetime_local of the phases themselves, or the ready-made status_label.
| Field | Type | Description |
|---|---|---|
cycle_number | integer | 1-based index within this response. |
partial | boolean | true when the first cycle does not begin on a new moon (possible when grouping a month/range/year query). |
new_moon, full_moon | string | UTC instants of this lunation's principal events. |
phase_count | integer | Phase events in this cycle (normally 8). |
duration_days | number | Span from the first to the last marked phase (≈26d). Not the lunation length — see below. |
lunation_start, lunation_end | string | UTC bounds of the true lunation: this new moon → the next new moon. |
lunation_days | number | True lunation length (≈29.5d). |
status | string | past, current, or upcoming. |
lunation_day | integer | Which day of the lunation today is. Set only when status: current; otherwise null. |
next_new_moon | string | UTC instant that closes this lunation. |
days_to_next_new | number | Days until that next new moon. |
status_label | string | Ready-to-render string — e.g. Day 27 of 29 · next new moon in 2d, Begins in 2d, Complete. Display this rather than composing your own. |
phases | array | The phase objects for this cycle. |
duration_days vs lunation_days — these differ, and both are correct. duration_days (≈26d) measures only the marked phases, new moon through waning crescent. lunation_days (≈29.5d) measures the real lunar month, new moon to next new moon. After the last marked phase the Moon stays in the same lunation for roughly three more days — so a cycle whose phases are all past can still be status: current. That is not a bug: you are in the dark days before the next new moon.The final cycle in a cycles response has no following new moon inside the slice, so its lunation_end, lunation_days, next_new_moon and days_to_next_new are null. Request a higher count if you need them.
See also
- Vedic Moon Phases — sidereal with nakshatra data
- Eclipses
- Western Transit overview