Skip to main content

Western Moon Phase

Calculate the lunar phase for any date using the tropical zodiac. Returns phase name (New Moon, Waxing Crescent, First Quarter, Waxing Gibbous, Full Moon, Waning Gibbous, Last Quarter, Waning Crescent), phase angle, illumination percentage, moon age in days, and next major phase estimate. Defaults to today if no date given.

Endpoint

GET /v1/western/moon/phase

Request parameters

FieldTypeRequiredDescription
datestring | nullNoDate in YYYY-MM-DD format. Defaults to today.

Example request

curl -X GET "https://api.asterwise.com/v1/western/moon/phase?date=2026-01-01" \
-H "Authorization: Bearer YOUR_API_KEY"

Example response

{
"success": true,
"message": "success",
"data": {
"date": "2026-01-01",
"phase_name": "Waxing Gibbous",
"phase_angle": 156.6555,
"illumination_pct": 95.91,
"moon_age_days": 12.85,
"moon_longitude": 77.98827,
"sun_longitude": 281.332736,
"is_waxing": true,
"next_phase_name": "Full Moon",
"next_phase_date": "2026-01-03"
}
}

Response fields

FieldTypeDescription
successbooleanTrue if the request succeeded
messagestringHuman-readable status message
dataobject
data.datestringDate in YYYY-MM-DD format
data.phase_namestringCurrent phase name
data.phase_anglenumberPhase angle in degrees (0-360). 0=New Moon, 180=Full Moon
data.illumination_pctnumberPercentage of Moon disk illuminated (0-100)
data.moon_age_daysnumberDays elapsed since last New Moon (0 to 29.53)
data.moon_longitudenumberTropical ecliptic longitude of Moon (0-360)
data.sun_longitudenumberTropical ecliptic longitude of Sun (0-360)
data.is_waxingbooleanTrue if Moon is waxing (phase_angle < 180)
data.next_phase_namestringName of the next major phase
data.next_phase_datestring | nullEstimated date of next major phase (YYYY-MM-DD)

Errors

CodeDescriptionReference
authentication_failedMissing or invalid API key.authentication_failed
ephemeris_unavailableUpstream ephemeris service error.ephemeris_unavailable
insufficient_tierAPI key tier does not include this endpoint.insufficient_tier
internal_errorUnexpected server error.internal_error
ip_rate_limit_exceededToo many requests in a short window.ip_rate_limit_exceeded
payload_too_largeRequest body exceeds the size limit.payload_too_large
resource_not_foundReferenced resource was not found.resource_not_found
validation_errorRequest body failed schema validation.validation_error