Usno Astronomy

v0.2.1
io.github.pipeworx-io/usno-astronomy Checked 1 day ago Published 27 days ago

Next solar eclipse, eclipse times by place, Moon phases and seasons from the US Naval Observatory.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

usno_solar_eclipses

When is the next solar eclipse — the list of solar eclipses in a year from the US Naval Observatory, each with its date and type (total, annular, partial, hybrid). With no arguments it returns the NEXT solar eclipse after today plus the rest of the current and following year, so "when is the next solar eclipse", "solar eclipses in 2027", "is there a total eclipse this year" are all one call. For where an eclipse is visible and what time it starts at a given place, follow with usno_eclipse_circumstances. Lunar eclipses are not published by this API.

ParameterTypeDescription
yearnumberFour-digit year, 1800-2050. Omit for the next eclipse after today (current year and the next).

usno_eclipse_circumstances

Local circumstances of a solar eclipse at a given latitude/longitude on a given date — whether the Sun is totally, annularly or partially eclipsed there, the magnitude and obscuration (percentage of the Sun covered), the duration, and the UT time, Sun altitude and azimuth of each contact (eclipse begins, totality begins/ends, maximum eclipse, eclipse ends, or sunrise/sunset if the eclipse is in progress then). Answers "what time does the August 12 2026 eclipse start in Madrid", "how much of the Sun will be covered in Denver", "will the eclipse be total where I am". Needs coordinates: resolve…

ParameterTypeDescription
date *stringDate of the eclipse as YYYY-MM-DD, e.g. "2026-08-12". Must be a solar eclipse date from usno_solar_eclipses.
lat *numberLatitude in decimal degrees, north positive, e.g. 40.42 for Madrid.
lon *numberLongitude in decimal degrees, east positive, e.g. -3.70 for Madrid.
heightnumberObserver height in metres above sea level. Default 0.

usno_moon_phases

Moon phases from the US Naval Observatory: the UT date and time of every New Moon, First Quarter, Full Moon and Last Quarter in a year, or the next few phases from a given date. Answers "when is the next full moon", "full moons in 2026", "what phase is the Moon in this week", "date of the new moon in October". Pass a year for the whole year, or a start date (default today) with a count for the next phases.

ParameterTypeDescription
countnumberHow many phases to return from the start date, 1-99. Default 8 (about two lunar months).
datestringStart date YYYY-MM-DD for the next phases from that day. Default today when year is omitted.
yearnumberFour-digit year, 1800-2050, for every phase in that year (about 50).

usno_seasons

The seasons for a year from the US Naval Observatory: the UT date and time of the March and September equinoxes, the June and December solstices, and Earth's perihelion and aphelion. Answers "when is the summer solstice", "what date is the autumn equinox in 2027", "first day of spring", "when is Earth closest to the Sun". Northern-hemisphere season names are attached; the southern hemisphere is the opposite.

ParameterTypeDescription
yearnumberFour-digit year, 1800-2050. Default: current year.