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/moon

Query Parameters

NameTypeRequiredDescription
latfloatRequiredLatitude (-90 to 90)
lngfloatRequiredLongitude (-180 to 180)
datestringOptionalDate in YYYY-MM-DD format (default: today)

Example Request

curl "https://api.falakapi.com/v1/moon?lat=28.66&lng=77.07" \
  -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

Moon Phases

PhaseEmojiDescription
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