Astronomy API

Astronomy API (astronomy.json): sunrise, sunset, moonrise, moonset, moon phase and illumination for any location and date.

Astronomy API method allows a user to get up to date information for sunrise, sunset, moonrise, moonset, moon phase and illumination in json and xml.

Field Data Type Description
sunrise string Sunrise local time
sunset string Sunset local time
moonrise string Moonrise local time
moonset string Moonset local time
moon_phase string Moon phases. Value returned:
  • New Moon
  • Waxing Crescent
  • First Quarter
  • Waxing Gibbous
  • Full Moon
  • Waning Gibbous
  • Last Quarter
  • Waning Crescent
moon_illumination int Moon illumination
is_moon_up int 1 = Yes or 0 =No
Determine if the moon is currently up, based on moon set and moon rise time at the provided location and date.
is_sun_up int 1 = Yes or 0 =No
Determine if the sun is currently up, based on sunset and sunrise time at the provided location and date.

Quick and Easy Signup for Weather API

WeatherAPI.com makes it super easy to integrate our realtime, daily, hourly and 15 min interval weather forecast data, historical weather, marine weather, bulk request, air quality data, pollen, evapotranspiration, autocomplete, time zone, astronomy and sports data into your new or existing project.