Moon Phases API
Get real-time moon phase calculations with illumination percentage, phase angle, moon age, distance, and crescent visibility detection. Pure Go implementation using Meeus-style astronomical algorithms.
Get Moon Phase Data
Retrieve moon phase information for a specific location and date.
GET
/v1/moonQuery Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| lat | float | Required | Latitude (-90 to 90) |
| lng | float | Required | Longitude (-180 to 180) |
| date | string | Optional | Date in YYYY-MM-DD format (default: today) |
| tz | string | Optional | IANA zone or documented alias — see Timezones. Omit or empty → auto-detect from lat/lng; invalid values may fall back to auto-detect. |
Example Request
curl "https://api.falakapi.com/v1/moon?lat=21.4225&lng=39.8262" \
-H "X-API-Key: fak_your_api_key_here"Example Response
{
"date": {
"gregorian": "2025-01-15",
"timestamp": 1736899200
},
"moon": {
"phase_name": "Waxing Crescent",
"phase_angle": 45.5,
"illumination": 0.23,
"age_days": 3.8,
"distance_km": 384400,
"is_crescent_visible": true,
"emoji": "🌒"
}
}Notes
- •Phase angle ranges from 0° (New Moon) to 360°
- •Illumination is a decimal from 0.0 (New Moon) to 1.0 (Full Moon)
- •Crescent visibility considers atmospheric conditions and moon position
- •Distance is calculated in kilometers from Earth's center
- •Optional tz accepts IANA names or documented aliases (Supported timezones /timezones); omit to auto-detect from coordinates
Moon Phases
| Phase | Emoji | Description |
|---|---|---|
| New Moon | 🌑 | Moon is not visible |
| Waxing Crescent | 🌒 | Crescent visible, growing |
| First Quarter | 🌓 | Half moon, right side lit |
| Waxing Gibbous | 🌔 | More than half, growing |
| Full Moon | 🌕 | Fully illuminated |
| Waning Gibbous | 🌖 | More than half, shrinking |
| Last Quarter | 🌗 | Half moon, left side lit |
| Waning Crescent | 🌘 | Crescent visible, shrinking |