Astrology icon

Astrology

Perform astrological calculations via Astrology API

Actions231

Lunar → Phases

AI-generated

Summary

Calculate lunar phases for a specified date and location ahead by a given number of days.

Inputs

  • year (required) — Year for calculation (e.g., 2024)
  • month (required) — Month as number 1-12 (January=1, December=12)
  • day (required) — Day of month (1-31)
  • hour (required) — Hour in 24-hour format (0-23)
  • minute (required) — Minute (0-59)
  • locationType (required) — Choose how to specify location: city name or exact coordinates
  • city (required) — City name (e.g., 'London', 'New York')
  • countryCode (required) — 2-letter ISO country code (e.g., US, GB, UA)
  • latitude (required) — Geographic latitude (-90 to 90, positive=North)
  • longitude (required) — Geographic longitude (-180 to 180, positive=East)
  • timezone — IANA timezone identifier (e.g., America/New_York, Europe/London). Optional - auto-detected from coordinates if omitted
  • daysAhead — Number of days to calculate ahead (1-365)
  • simplify — Whether to return simplified response with key data only. Disable for full API response with all metadata

Output shape

Lunar phase data for the specified date and days ahead. When simplify is true, returns key phase data only; otherwise returns full API response with all metadata.

Operation uses POST with datetime_location payload. daysAhead parameter is specific to phases, voidOfCourse, and events operations. Location auto-detection applies when timezone is omitted and coordinates are provided.

Examples

Example 1: Calculate moon phases for June 15, 2024 at 14:30 in London, UK, 30 days ahead with simplified output

year=2024, month=6, day=15, hour=14, minute=30, locationType=city, city=London, countryCode=GB, daysAhead=30, simplify=true

Links

Discussion