For developers

The Sun & Moon API

Everything sunandmoon.com computes, as JSON: sunrise, sunset and twilight, moonrise and phases, where the Sun and Moon are, eclipses from any place, tonight's sky, how dark the sky is, space weather and the aurora. Times agree with independent software to about a second, from NASA JPL's DE440 ephemeris.

It works without signing up. A free key raises the limits. Machine-readable: OpenAPI 3.1 and llms.txt.

Use Sun & Moon in Claude, ChatGPT or Gemini Our MCP server lets your AI assistant answer from this site. Free, no key, a few clicks to set up. Step-by-step setup

Checked Dec 1 against MET Norway, NOAA, NASA JPL, CDFW: 747 of 749 agree. How accurate we are

Quick start

Ask for a day at a place. Coordinates are decimal degrees; the time zone is an IANA name.

curl "https://sunandmoon.com/api/v1/almanac?lat=47.61&lon=-122.33&tz=America/Los_Angeles&date=2026-06-21"

The answer starts like this (shortened):

{
  "location": { "latitude": 47.61, "longitude": -122.33, "timeZone": "America/Los_Angeles", ... },
  "date": "2026-06-21",
  "sun": {
    "sunrise": { "time": "2026-06-21T05:11:34-07:00", "azimuth": 52.7, "altitude": -0.83 },
    "sunset":  { "time": "2026-06-21T21:10:51-07:00", "azimuth": 307.29, "altitude": -0.83 },
    "dayLengthSeconds": 57557,
    ...
  },
  "moon": { "phase": "FirstQuarter", "illumination": 0.4367, ... }
}

Leave out the coordinates and the API answers for the caller's own location, found from the IP address, as the site does. From a browser on another site, calls work too: every response allows any origin (CORS).

Use it in Claude, ChatGPT or Gemini (MCP)

Connect Sun & Moon to your AI assistant once, then ask in plain words: “When is sunset in Lisbon on Friday?” or “Will I see the aurora from Edinburgh tonight?” The assistant gets the answer from this site, from the same calculations as its pages, and links the page it came from. It is free, and you need no account, no key and nothing to install.

What is MCP? The Model Context Protocol is the open standard AI apps use to reach outside services. Each app has its own name for it: Claude says connector, ChatGPT says plugin or app, Gemini says connected app. You add it once with the address below, and it is there in every chat after that.

The address to add
https://sunandmoon.com/mcp

Claude

Every plan, Free included (Free allows one custom connector). Add it on claude.ai or in the desktop app; it then works in the mobile apps too.

  1. Open claude.ai in your browser, or the Claude desktop app, and sign in.
  2. Go to Customize, then Connectors. (On some accounts it is Settings, then Connectors.)
  3. Click Add custom connector. On a Team or Enterprise plan only an Owner can add one, under Organization settings › Connectors: ask yours to add this address, then click Connect on it.
  4. For the name, type Sun & Moon. For the remote MCP server URL, paste the address above. Click Continue if you see it.
  5. If Claude asks how to sign in, choose No sign-in (Claude usually detects this by itself). Leave everything else as it is and click Add.
  6. Start a chat. Click +, then Connectors, and check that Sun & Moon is switched on.
  7. Ask your question. The first time Claude wants to use one of the tools, it asks you first; every tool here only reads, so Always allow is safe.

In the desktop app, add it under Connectors as above, not in claude_desktop_config.json: that file is for programs running on your own computer and does not connect to web addresses.

ChatGPT

A paid plan (Plus, Pro, Business, Enterprise or Edu) and ChatGPT in a web browser at chatgpt.com. It cannot be added from the phone app, and Free and Go do not offer custom servers yet. On Business and Enterprise, your workspace admin may need to allow it or add it for everyone.

  1. Open chatgpt.com in your browser and sign in.
  2. Go to Plugins.
  3. Click the + button, then Add custom MCP server.
  4. For the name, type Sun & Moon. The description is optional, for example Sunrise, sunset, the Moon, eclipses, tides and aurora for any place.
  5. Under Connection, paste the address above into Server URL.
  6. For authentication, choose No authentication.
  7. Read the warning, tick I understand and want to continue, then click Create as a plugin. ChatGPT lists the tools it found.
  8. Find Sun & Moon among your plugins and install it.
  9. Start a new chat, type @, pick Sun & Moon and ask. The pick lasts for one message, so type @ again for a follow-up that needs fresh numbers.

No Plugins page yet? Older versions of ChatGPT do it under Settings › Apps (or Connectors) › Advanced settings: turn on Developer mode, click Create, and fill in the same name, address and No authentication. In a chat, open the + menu, choose Developer mode and select Sun & Moon.

Gemini

Gemini calls these custom apps. For now Google offers them to people 18 or older in the US, signed in with a personal Google account (not a work or school one), using Gemini in English with History turned on. Add it on the web; it then works in the Gemini mobile app too.

  1. Open gemini.google.com on a computer and sign in.
  2. Click Settings at the bottom of the menu, then Connected Apps. If you do not see Connected Apps, click Personal Intelligence first.
  3. Under Custom apps, click Add a custom app.
  4. Paste the address above as the MCP server URL. Leave Advanced features alone: no credentials are needed.
  5. Click Next and follow the prompts. There is no account to sign in to.
  6. In a chat, type @, pick Sun & Moon and ask.

Outside the US or on a work account? Use Gemini CLI, or ask your admin to add the address as a custom MCP server in Gemini Enterprise.

Claude Code, Gemini CLI and code editors

From a terminal, one command adds it. Claude Code:

claude mcp add --transport http sunandmoon https://sunandmoon.com/mcp

Gemini CLI, then type /mcp inside Gemini to see the tools:

gemini mcp add --transport http sunandmoon https://sunandmoon.com/mcp

VS Code with GitHub Copilot, in .vscode/mcp.json:

{ "servers": { "sunandmoon": { "type": "http", "url": "https://sunandmoon.com/mcp" } } }

Cursor and most other apps that take a configuration file:

{ "mcpServers": { "sunandmoon": { "type": "http", "url": "https://sunandmoon.com/mcp" } } }

Gemini CLI's own settings.json names the field httpUrl instead of url. If an app rejects a field, its documentation names the one it wants; the address stays the same.

Things to ask

  • When are sunrise and sunset in Kyoto on New Year's Day?
  • What phase is the Moon tonight, and when does it rise in Denver?
  • Is any eclipse visible from Madrid in the next five years?
  • When is high tide in Seattle this weekend?
  • What are the prayer times in Istanbul tomorrow?
  • Will I see the aurora from Fairbanks tonight?
  • When is golden hour in Paris on Saturday?

If the assistant answers from memory instead, name the service (“Use Sun & Moon to…”) or pick it with @, and check that it is switched on for this chat.

Using your key

A key is optional. Without one, 120 tool calls a minute and 10,000 a day are shared by everyone calling from the same network address. AI companies call us from their own servers, so many of their users share an address; on a busy day the shared allowance can run out. With your own free key, your calls count only against your account (60 a minute, 10,000 a day).

  • Claude: if the Add custom connector dialog shows Request headers, pick x-api-key and paste your key as the value. Request headers are still reaching accounts; without them, use it without a key. The key cannot be added later: remove the connector and add it again.
  • ChatGPT and Gemini: there is no place for a key yet. They work without one.
  • Terminal and editors: add a header.
claude mcp add --transport http sunandmoon https://sunandmoon.com/mcp --header "X-API-Key: smk_..."
gemini mcp add --transport http sunandmoon https://sunandmoon.com/mcp --header "X-API-Key: smk_..."

{ "mcpServers": { "sunandmoon": { "type": "http", "url": "https://sunandmoon.com/mcp", "headers": { "X-API-Key": "smk_..." } } } }

Authorization: Bearer smk_... works too. Over a limit, a tool answers with an error that says when to try again.

If it does not work

  • Check the address. It must be exactly https://sunandmoon.com/mcp. Opening it in a browser brings you back to this page; that is expected, since it is meant for apps.
  • No option to add one? Your plan, country or account type may not offer custom servers yet (see each app above). Claude's Free plan allows one custom connector, so remove another first.
  • It says “try again in …”. The shared allowance ran out; wait the time it gives, or use your key.
  • To remove it, go back to the same settings page and remove or disconnect Sun & Moon.

Technical details

It speaks MCP 2026-07-28, 2025-11-25, 2025-06-18, 2025-03-26 over Streamable HTTP, answers in JSON and keeps no session. Every tool is read-only. Tools that answer for a place take a name ("Lisbon", "Portland, OR") or lat and lon, and return the matching page on this site for the assistant to link.

ToolAnswersEndpoint
search_placesSearch places/api/v1/places
search_siteSearch sunandmoon.com/api/v1/search
get_sun_and_moonSun and Moon for a day/api/v1/almanac
get_sun_and_moon_monthSun and Moon for every day of a month/api/v1/almanac/month
get_custom_almanacCustom Sun and Moon almanac for any date range/api/v1/almanac/custom
get_daylight_yearA year of daylight/api/v1/almanac/year
get_sun_moon_positionWhere the Sun and Moon are now/api/v1/position
get_daily_ephemerisDaily observatory ephemeris sheet/api/v1/ephemeris
get_moon_phasesThe Moon's phase each day of a month/api/v1/moon-calendar
get_full_moonsA year's full moons/api/v1/full-moons
get_tonightTonight's sky in words/api/v1/tonight/brief
get_sky_transparencySmoke, haze and fires overhead/api/v1/sky-transparency
get_golden_hourGolden and blue hours/api/v1/golden-hour
get_deep_skyGalaxies, nebulae and clusters up tonight/api/v1/deep-sky
get_exoplanets_tonightStars with known planets and exoplanet transits tonight/api/v1/exoplanets
get_comets_tonightBright comets tonight/api/v1/comets
get_asteroid_close_approachesAsteroids passing the Earth/api/v1/asteroids/close-approaches
get_fireballsRecent fireballs/api/v1/fireballs
get_solar_potentialSolar panel potential and peak sun hours/api/v1/solar-potential
get_sky_eventsA year's events in the sky/api/v1/events
get_eclipsesUpcoming eclipses worldwide/api/v1/eclipses
get_eclipses_from_placeUpcoming eclipses seen from a place/api/v1/eclipses/local
get_eclipseOne eclipse from a place/api/v1/eclipses/{slug}
get_prayer_timesIslamic prayer times/api/v1/prayer-times
get_qiblaThe direction of the Kaaba/api/v1/qibla
get_calendar_datesA day in four calendars/api/v1/calendars
get_holidaysRamadan, the Eids and other holidays/api/v1/holidays
get_crescentFirst crescent visibility/api/v1/crescent
get_tidesTides/api/v1/tides
get_ocean_tideThe ocean tide anywhere at sea/api/v1/tides/world
get_fishingShould I fish, and when?/api/v1/fishing
get_huntingWhen can I hunt?/api/v1/hunting
get_campingShould I camp tonight?/api/v1/camping
get_kayakingShould I paddle, and when?/api/v1/kayaking
get_outdoors_reportPrintable outdoor trip sheet data/api/v1/outdoors/report
find_us_parksFind US National and State Parks/api/v1/parks
get_nature_calendarNature's moon-timed spectacles/api/v1/nature
get_auroraWill the aurora be visible?/api/v1/aurora/forecast
get_geomagnetic_stormIs a geomagnetic storm under way?/api/v1/aurora/now
get_dark_nightsWhen it is darkest/api/v1/dark-sky/nights
get_retrogradeWhen planets are retrograde/api/v1/retrograde
get_satellite_transitsISS, Tiangong and Hubble across the Sun or Moon/api/v1/transits
get_daily_geekDaily geek astronomy and physics facts for a place/api/v1/geek
list_api_endpointsEvery public endpoint and its parametersAll
call_apiAny public endpoint, by pathAll

For models reading the web: /llms.txt maps the site, /llms-full.txt adds this whole reference in Markdown, and /.well-known/api-catalog (RFC 9727) points to the OpenAPI document.

Authentication

A key is optional. Without one, limits apply per IP address. With one, they apply to your account, wherever your code runs. Sign in with your email (no password) to create up to five keys; each is shown once. Send it in either header:

curl -H "Authorization: Bearer smk_..." "https://sunandmoon.com/api/v1/tonight?lat=64.84&lon=-147.72&tz=America/Anchorage"
curl -H "X-API-Key: smk_..." "https://sunandmoon.com/api/v1/eclipses/local?lat=40.42&lon=-3.70&tz=Europe/Madrid"

Keys start with smk_. A key that is sent must be valid: an unknown or revoked key gets 401, not the keyless limits. Keys in web pages are visible to everyone who opens them; keep them on a server when you can, and revoke one on your account page the moment it leaks.

Limits

CallerPer minutePer day (UTC)Counted by
No key301,000IP address
Free key6010,000Account, all its keys together

Every response says where you stand:

RateLimit-Limit, RateLimit-Remaining, RateLimit-ResetThe minute's allowance, what is left and the seconds until it resets.
X-Quota-Limit, X-Quota-Remaining, X-Quota-ResetThe same for the day; it resets at midnight UTC.
X-Api-Plankeyless or your plan, e.g. free.
Retry-AfterOn a 429: seconds to wait.

The minute is counted by each server and the day across all of them, so the daily count may lag a few seconds. Responses carry Cache-Control; caching them on your side saves your allowance, and most answers for fixed coordinates and dates never change.

Conventions

  • Places. lat and lon in decimal degrees (north and east positive), tz an IANA zone, name echoed back. Without coordinates, the caller's own location. Without tz, the nearest listed place's zone within 500 km, else the nautical zone, flagged timeZoneIsApproximate.
  • Dates and times. Dates are local to the place, YYYY-MM-DD. Times are ISO 8601 with the place's UTC offset, to the second; a few live feeds use UTC, and /tonight Unix seconds, as noted. Events that do not happen are null.
  • Range. 1550 to 2650. Dates from 1849 to 2150 are fastest; others load a larger ephemeris the first time (a 503 for a moment means try again).
  • Angles and distances. Degrees; azimuth from true north through east (magneticAzimuth is the compass bearing); distances in kilometers. Rise and set follow the U.S. Naval Observatory: the Sun's center 50′ below the horizon, the Moon's upper limb with 34′ of refraction.
  • Fields. camelCase JSON. New fields may appear at any time; ignore ones you do not know.

Errors

Errors are problem details (application/problem+json) with a title and detail; a 400 also names each bad parameter:

{ "title": "One or more validation errors occurred.", "status": 400,
  "errors": { "date": [ "Use the format YYYY-MM-DD." ] } }
400A parameter is missing or out of range.
401The key is unknown or revoked, or an aurora alert call came without one.
404No such eclipse, place, mission, sheet or alert; for dark skies, no land at that point.
409An account at its limit of aurora alerts, or whose email is on hold after bounces or a spam report.
429Over the minute's or the day's limit. Wait Retry-After seconds.
503Live data has not arrived yet, or a larger ephemeris is loading. Try again shortly.

Reference

Almost every endpoint is a GET that works without a key; their links run the example in your browser. The aurora alerts act for your account, so they need a key and come with a curl example instead. Requests with a body send JSON (Content-Type: application/json).

Sun and Moon

Rise, set, twilight, phases, positions and the day's sky for any place and date from 1550 to 2650, computed from NASA JPL's DE440 ephemeris.

GET /api/v1/almanac

The Sun and Moon for a day

Sunrise, sunset, solar noon, day length and its change, civil, nautical and astronomical twilight; moonrise, moonset and transit, how long the Moon is up, its phase, illumination, age and the next principal phases; and both bodies' surface-to-surface distance and how fast it changes. Times are local, with the place's UTC offset; events that do not happen that day are null, and horizonState says why (alwaysUp, alwaysDown). Before the time zone's first standard offset (1883 in the United States) times are the place's own local mean time, 4 minutes per degree of longitude, and localMeanTime is true.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
date string Local date, YYYY-MM-DD, in the proleptic Gregorian calendar as ISO 8601 defines it (before 15 October 1582 this is not the Julian date people then wrote). Default: today at the place.
terrain string 1 adds terrain: when the Sun and Moon clear the real skyline around the point and go behind it, from 30 m elevation data (needs lat and lon).

Try it: /api/v1/almanac?lat=47.61&lon=-122.33&tz=America/Los_Angeles&date=2026-06-21

Caching: Explicit coordinates: shared caches may keep it 10 minutes. The caller's own location: private. · Schema: GetAlmanac in OpenAPI

GET /api/v1/ephemeris

Daily observatory ephemeris sheet

Complete observatory data sheet for one place, date and epoch: WGS84 geodetic/geocentric observer frame, WMM-2025 geomagnetic vector (D, I, H, X, Y, Z, F), Julian Date, MJD, ERA, GMST/GAST/LMST/LAST, Equation of Time, Delta T, IAU nutation and precession, Sun and Moon CIRS/JNow RA/Dec, ecliptic coordinates, airmass, solar Carrington P/B0/L0, lunar libration and colongitude, and cached space weather. Pass mode=extended to include the 24-hour ephemeris table, Mercury through Neptune planetary ephemeris, upcoming eclipses, multi-calendar epochs and nearest coastal tides.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
date string Local date, YYYY-MM-DD, in the proleptic Gregorian calendar as ISO 8601 defines it (before 15 October 1582 this is not the Julian date people then wrote). Default: today at the place.
time string Local clock time, HH:mm or HH:mm:ss. Default: now.
mode string brief (default) or extended (adds hourly table, planets, eclipses, calendars and tides).

Try it: /api/v1/ephemeris?lat=47.61&lon=-122.33&tz=America/Los_Angeles&date=2026-06-21&mode=extended

Caching: Explicit coordinates: shared caches may keep it 10 minutes. The caller's own location: private. · Schema: GetDailyEphemeris in OpenAPI

GET /api/v1/almanac/custom

Configurable Sun and Moon almanac for any date range

Custom Sun and Moon almanac for any coordinate and date span up to 366 days (1550 to 2650): sunrise and sunset with azimuths, daylight duration and daily change, solar noon and peak altitude, civil/nautical/astronomical twilight, optional golden hours, moonrise/moonset/transit, Moon phase and illumination, Equation of Time, 0h LAST, magnetic declination and range extrema.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
start string First local date, YYYY-MM-DD. Default: first day of the current month.
end string Last local date, YYYY-MM-DD (at most 366 days from start). Default: end of start's month.
golden string 1 includes morning and evening golden hour bounds.

Try it: /api/v1/almanac/custom?lat=47.61&lon=-122.33&tz=America/Los_Angeles&start=2026-06-01&end=2026-06-30

Caching: Explicit coordinates: shared caches may keep it 10 minutes. The caller's own location: private. · Schema: GetCustomAlmanac in OpenAPI

GET /api/v1/geek

Sixteen live astronomy and Earth-physics facts for a place and date

Sixteen live-computed astronomy and physics facts for a place and civil date (ADR 0095): solar photon flight time, vis-viva Earth orbital speed, WGS84 latitude spin and centrifugal gravity reduction, solar noon shadow ratio, Kasten-Young airmass and top-of-atmosphere solar irradiance, daylight velocity, Equation of Time, lunar tidal pull multiplier, optical libration, lunar radial speed vs secular recession, WMM-2025 magnetic dip and intensity, local apparent sidereal time, closest and brightest planets, Julian and Mars Sol dates, solar Carrington rotation, and ozone/space weather. Each fact has metric and imperial headlines; summary and derivation are metric. Facts use the current clock time on the chosen date; space weather appears only for today.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
date string Local date, YYYY-MM-DD, in the proleptic Gregorian calendar as ISO 8601 defines it (before 15 October 1582 this is not the Julian date people then wrote). Default: today at the place.
category string Optional filter: ALL (default), MOTION, LIGHT, MOON, EARTH or COSMOS.

Try it: /api/v1/geek?lat=47.61&lon=-122.33&tz=America/Los_Angeles&date=2026-06-21

Caching: Explicit coordinates: shared caches may keep it 10 minutes. The caller's own location: private. · Schema: GetDailyGeek in OpenAPI

GET /api/v1/almanac/month

Every day of a month: Sun, twilight and Moon

For each local day of the month, as the place pages' month tables show it (/united-states/washington/seattle/2026/12): sunrise and sunset with their azimuths, solar noon with the Sun's altitude, daylight and its change from the day before, civil, nautical and astronomical twilight, moonrise and moonset, the Moon's lit fraction at local noon, and any principal phase. Events that do not happen that day are null; horizonState says why for the Sun.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
month
required
string YYYY-MM, 1900 to 2100.

Try it: /api/v1/almanac/month?lat=47.61&lon=-122.33&tz=America/Los_Angeles&month=2026-12

Caching: Explicit coordinates: shared caches may keep it 10 minutes. The caller's own location: private. · Schema: GetAlmanacMonth in OpenAPI

GET /api/v1/almanac/year

A year of daylight

Every local day of a year, as the place pages' year chart draws it (/united-states/washington/seattle/2026): sunrise, sunset, daylight, and the spans with the Sun above the horizon, −6°, −12° and −18° as [from, to] in hours after local midnight; the solstices and equinoxes with that day's daylight; the clock changes; and the longest and shortest days.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
year integer 1900 to 2100. Default: this year at the place.

Try it: /api/v1/almanac/year?lat=47.61&lon=-122.33&tz=America/Los_Angeles&year=2026

Caching: Explicit coordinates: shared caches may keep it 10 minutes. The caller's own location: private. · Schema: GetAlmanacYear in OpenAPI

GET /api/v1/skyline

The real skyline around a point

The apparent altitude of the terrain every quarter degree of azimuth from true north, out to 300 km, with the Earth's curvature and refraction over the land, and how far away each direction's high point is (0 for a sea horizon, whose dip makes the altitude negative). From Copernicus DEM GLO-30, a surface model: anything within 200 m is left out, and so are features rising less than 35 m within about 3 km (taken for trees and buildings); larger forests and buildings still count as terrain. The point is rounded to one arc-second. 404 beyond 84° north or south.

ParameterTypeDescription
lat
required
number Latitude in degrees, north positive (−90 to 90).
lon
required
number Longitude in degrees, east positive (−180 to 180).

Try it: /api/v1/skyline?lat=46.0517&lon=8.1932

Caching: A day. · Schema: GetSkyline in OpenAPI

GET /api/v1/position

Where the Sun and Moon are at an instant

Altitude without and with standard refraction, azimuth from true north and by compass (with the World Magnetic Model's declination), and distance, for the Sun and the Moon.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
time string An ISO 8601 instant, e.g. 2026-12-21T20:00:00Z. Default: now (never cached).

Try it: /api/v1/position?lat=47.61&lon=-122.33&tz=America/Los_Angeles&time=2026-12-21T20:00:00Z

Caching: With time and coordinates: 10 minutes. Now: never. · Schema: GetPosition in OpenAPI

GET /api/v1/sky-track

The Sun's and Moon's paths through a day

Apparent altitude, azimuth and surface-to-surface distance of both bodies through one local day, as the sky panorama draws them; times[i] is the instant of every series' i-th value.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
date string Local date, YYYY-MM-DD, in the proleptic Gregorian calendar as ISO 8601 defines it (before 15 October 1582 this is not the Julian date people then wrote). Default: today at the place.
step integer Minutes between samples: 10 (default), 20, 30 or 60.

Try it: /api/v1/sky-track?lat=47.61&lon=-122.33&tz=America/Los_Angeles&date=2026-06-21&step=30

Caching: Explicit coordinates: shared caches may keep it 10 minutes. The caller's own location: private. · Schema: GetSkyTrack in OpenAPI

GET /api/v1/moon-calendar

The Moon's phase for each day of a month

Each local day's phase name, lit fraction and waxing at local noon, and the month's principal phases with local times.

ParameterTypeDescription
month
required
string YYYY-MM.
tz string IANA time zone for the days, or a fixed offset such as -08:09 (a local mean time). Default: the caller's own location's.

Try it: /api/v1/moon-calendar?month=2026-12&tz=America/Los_Angeles

Caching: With tz: a day. · Schema: GetMoonCalendar in OpenAPI

GET /api/v1/birthday-moon

The Moon and sky at a birth

The Moon at a local date and clock time at a place, as /birthday-moon shows it: phase, lit fraction, age, apparent altitude and azimuth, distance and size, constellation, rise and set that day, and how far to turn a picture with the Moon's north up so it stands as in the sky (skyRotation, counterclockwise); the lunation with its full moon's almanac name; the Sun and the five bright planets; eclipses within 15 days; the Moon on each birthday to 100 at the same clock time, marked when within a day of the birth Moon; and the Moonlit history nights whose Moon was nearest the same age. Without time, 21:00.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
date
required
string Date of birth, YYYY-MM-DD, 1900-01-01 to 2100-12-31.
time string Local clock time HH:mm. Default: 21:00 (timeGiven false).

Try it: /api/v1/birthday-moon?lat=47.61&lon=-122.33&tz=America/Los_Angeles&date=1990-05-17&time=04:30

Caching: Explicit coordinates: shared caches may keep it 10 minutes. The caller's own location: private. · Schema: GetBirthdayMoon in OpenAPI

GET /api/v1/sun-orientation

The Sun's P, B0 and L0 angles and Carrington rotation

The Sun's physical ephemeris from the Earth's centre, as The Astronomical Almanac tabulates it: P (position angle of the north end of its axis, east of the disk's north point), B0 (heliographic latitude of the disk centre), L0 (Carrington longitude of the disk centre), the Carrington rotation number with its fraction and the rotation's start and end, the semidiameter and the distance. IAU rotation elements with the light-time correction, from DE440; within 0.002° of sunpy. With days, the same at 0h UT for each day; with lat and lon, the Sun's altitude there and which way its north pole points in an altazimuth view (the parallactic angle).

ParameterTypeDescription
time string Instant, ISO 8601 (UTC unless it has an offset). Default: now.
days integer 0 to 366: also a table at 0h UT for this many days from the time's date.
lat number With lon: also the Sun from this place.
lon number Longitude, east positive.

Try it: /api/v1/sun-orientation?time=2026-11-24T03:00:00Z&days=7&lat=47.61&lon=-122.33

Caching: With time: a day. Without: 30 seconds. · Schema: GetSunOrientation in OpenAPI

GET /api/v1/uv

The day's estimated UV index

The Solar risk card's estimate: clear-sky UV from the Sun's height and distance and climatological ozone, reduced by forecast cloud (withClouds), credited in weatherAttribution: ECMWF's IFS, DWD's ICON or NOAA's GFS for API clients. The peak with its WHO category, the stretches needing protection (UV 3 or more) and every 10-minute sample.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
date string Local date, YYYY-MM-DD, in the proleptic Gregorian calendar as ISO 8601 defines it (before 15 October 1582 this is not the Julian date people then wrote). Default: today at the place.

Try it: /api/v1/uv?lat=47.61&lon=-122.33&tz=America/Los_Angeles

Caching: Explicit coordinates: shared caches may keep it 10 minutes. The caller's own location: private. · Schema: GetUv in OpenAPI

GET /api/v1/sundial

A sundial for a place

The numbers behind the sundial maker (ADR 0044): each clock hour's hour angle, for clock time in the zone's standard (or summer) time with the place's longitude turned in, or for Sun time; for a horizontal dial each line's angle from the gnomon's line toward the afternoon side; for a playground (analemmatic) dial each hour point's x (east) and y (north) and the date line's position on the first of each month. The gnomon's angle (the latitude) and the pole it points to, the compass declination (World Magnetic Model), and for the 1st, 8th, 15th and 22nd of each month the minutes to add to the dial's reading for clock time, with the equation of time from the JPL ephemeris. unsupported says when the dial does not work at that latitude. pdf is the printable dial.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
dial string horizontal (default), clock (figure-8 curves read with the tip of the shadow), equatorial or playground.
hours string standard (default), summer or solar.
width number The playground dial's width (6 AM to 6 PM points), 2 to 30 m or up to 90 ft. Default 5 m or 16 ft.
units string m or ft for the playground dial. Default: ft in the United States, else m.

Try it: /api/v1/sundial?lat=47.61&lon=-122.33&tz=America/Los_Angeles&dial=horizontal

Caching: Explicit coordinates: shared caches may keep it 10 minutes. The caller's own location: private. · Schema: GetSundial in OpenAPI

GET /api/v1/solar-potential

Solar panel potential and peak sun hours

The numbers behind /solar-potential (ADR 0091): NASA POWER's monthly climate at the place (global horizontal, clear-sky, direct normal and diffuse irradiance, albedo and air temperature, daily means since 2001 on 1° cells), the peak sun hours a day on a panel of any tilt and direction, the best fixed tilt for the year and the best summer and winter tilts, and the AC kWh a system makes each month and year with PVWatts' default losses. terrain=1 at exact coordinates takes off the sunlight the real skyline hides (Copernicus DEM). No weather is used. Estimates for planning, not an engineering design.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
kw number System size in kW, 0 to 10000. Default 1.
tilt number Panel tilt from flat, 0 to 90 degrees, or best (default).
azimuth string The direction the panel faces: degrees clockwise from north (180 = south) or a compass point such as S or SW. Default: toward the equator.
losses number System losses in percent, 0 to 99. Default 14 (PVWatts).
terrain string 1 counts the real skyline around the point. Needs lat and lon.

Try it: /api/v1/solar-potential?lat=47.61&lon=-122.33&tz=America/Los_Angeles&kw=5

Caching: Explicit coordinates: shared caches may keep it 10 minutes. The caller's own location: private. · Schema: GetSolarPotential in OpenAPI

Night sky

What to see tonight, how dark the sky is, and when it is darkest.

GET /api/v1/tonight

One night's sky at a place

What the /tonight page draws: the Sun, Moon and naked-eye planets every five minutes through the night (airless altitude, azimuth, right ascension and declination), twilight, rises and sets, phases and apsides, planet magnitudes, the brightest satellites' orbital elements, the modeled sky brightness and the hourly cloud forecast (weather, credited in weather.attribution: ECMWF's IFS, DWD's ICON or NOAA's GFS for API clients). Times are Unix seconds; series are sampled every step seconds from start.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
date string The evening the night starts, YYYY-MM-DD. Default: the night under way, or the coming one.
terrain string 1 adds, to each rise and set, when the body clears the real skyline around the point or goes behind it (over, Unix seconds; hidden: true when it never shows). Needs lat and lon.

Try it: /api/v1/tonight?lat=64.84&lon=-147.72&tz=America/Anchorage

Caching: With date and coordinates: 10 minutes. Tonight: private. · Schema: GetTonight in OpenAPI

GET /api/v1/tonight/brief

Tonight's sky in words, as the daily email says it

The 4 PM sky brief for a place: a headline and the key facts (sunset, full darkness, the Moon, the best gap in the clouds, the sky's Bortle class), each naked-eye planet's window and highest point, meteor showers, the Moon's phases and close pairings, and the hourly cloud forecast (from ECMWF's IFS, DWD's ICON or NOAA's GFS for API clients, credited in clouds.text). Text is English with 12-hour local times; times are also given as Unix seconds. Sign up for the email at /tonight/email.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
date string The evening, YYYY-MM-DD. Default: the night under way, or the coming one.

Try it: /api/v1/tonight/brief?lat=64.84&lon=-147.72&tz=America/Anchorage&name=Fairbanks

Caching: With date and coordinates: 10 minutes. Tonight: private. · Schema: GetTonightBrief in OpenAPI

GET /api/v1/dark-sky

How dark the sky is at a point

The dark-sky model (NASA Black Marble 2025): zenith brightness with no Moon or clouds (mag/arcsec², an SQM reading), Bortle class, ratio to a natural sky, naked-eye limiting magnitude, how well the Milky Way shows, the 2014 to 2025 trend and elevation. 404 at sea and beyond 80°N or 60°S.

ParameterTypeDescription
lat
required
number Latitude in degrees, north positive (−90 to 90).
lon
required
number Longitude in degrees, east positive (−180 to 180).

Try it: /api/v1/dark-sky?lat=44.6&lon=-110.5

Caching: A day. · Schema: GetDarkSky in OpenAPI

GET /api/v1/dark-sky/nights

When it is darkest, night by night

For each night from local noon to local noon: astronomical darkness (Sun 18° down), its longest stretch with the Moon down, the best hour and the Moon then.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
date string The evening of the first night, YYYY-MM-DD. Default: tonight.
days integer How many nights, 1 (default) to 60.

Try it: /api/v1/dark-sky/nights?lat=47.61&lon=-122.33&tz=America/Los_Angeles&days=7

Caching: Explicit coordinates: shared caches may keep it 10 minutes. The caller's own location: private. · Schema: GetDarkNights in OpenAPI

GET /api/v1/satellite-layers

Satellite pictures for the maps

The maps' satellite layers (ADR 0090), observed rather than forecast: smoke (NASA VIIRS Deep Blue aerosol optical depth, NOAA-20 and NOAA-21, daily), satellite (NASA VIIRS true color, NOAA-20, the last full day) and clouds (NOAA GOES-East and GOES-West infrared, every 10 minutes, the Americas and the oceans either side). Each gives its credit, coverage, legend, when the picture is from (observedAt; noon UTC of the day for daily layers) and image: a whole-world plate carrée picture (90°N to 90°S, 180°W to 180°E) served by this site. The list does not fetch: add fetch with a layer's id to get its newest picture first. All from NASA EOSDIS GIBS; public domain, without implied endorsement.

ParameterTypeDescription
fetch string A layer id (smoke, satellite or clouds) to fetch its newest picture before answering.

Try it: /api/v1/satellite-layers?fetch=smoke

Caching: A minute; with fetch, not cached. · Schema: GetSatelliteLayers in OpenAPI

GET /api/v1/sky-transparency

Smoke, haze and fires overhead

How clear the air is above a point, from satellites (ADR 0090), observed rather than forecast: the newest aerosol optical depth at 550 nm from NASA's VIIRS Deep Blue retrievals on NOAA-20 and NOAA-21 (a daily early-afternoon pass, within 3 days; the median of nearby cells where clouds left a gap; null where there is none), its tier (clear under 0.2, light-haze, moderate-smoke from 0.5, heavy-smoke from 1), the extra dimming of starlight overhead in magnitudes (1.086 × the optical depth; about twice that at 30° altitude), and NASA FIRMS VIIRS active fires of the last 24 hours within radiusKm: how many 0.05° cells burned, the nearest in km, their total fire radiative power in MW and the latest detection. Gas flares, industry and volcanoes that show up nearly every day are left out. The site's pages show a notice only when the air is hazy or a fire is within 80 km. Not air-quality or fire safety information: follow local alerts.

ParameterTypeDescription
lat
required
number Latitude in degrees, north positive (−90 to 90).
lon
required
number Longitude in degrees, east positive (−180 to 180).

Try it: /api/v1/sky-transparency?lat=47.61&lon=-122.33

Caching: Ten minutes: the data refreshes every three hours. · Schema: GetSkyTransparency in OpenAPI

GET /api/v1/retrograde

When the planets go retrograde

Apparent retrograde motion (ADR 0062): the stretches when a planet slides west against the stars because Earth is overtaking it (Mars outward) or it is overtaking Earth (Mercury, Venus). Each period gives the station where it turns back and the one where it turns east again (time to the minute, apparent ecliptic longitude of date, IAU constellation), its length in days, how far it slides back in degrees, and the middle: opposition or inferior conjunction, with the distance then. now is true while a period is under way. Without year: each planet's current or next period. Times are UTC and the same from anywhere on Earth; computed from the JPL DE440 ephemeris. /learn/retrograde explains it.

ParameterTypeDescription
year integer Every period that begins in this UTC year, 1901 to 2099. Default: each planet's current or next.
planet string mercury, venus, mars, jupiter, saturn, uranus or neptune. Default: all seven.

Try it: /api/v1/retrograde?year=2027&planet=mercury

Caching: An hour. · Schema: GetRetrograde in OpenAPI

GET /api/v1/comets

Bright comets on a night at a place

Comets predicted at maxMag or brighter (default 10), and main-belt asteroids such as Vesta and Ceres within reach, at least 15° from the Sun at the middle of the night (ADR 0092). Each gives JPL's predicted magnitude (magnitudeSource "predicted (JPL)": comets can differ by one or two), astrometric J2000 coordinates and constellation for the middle of the night, distance from the Earth (au, km, mi) and Sun, evening or morning sky, the tail's position angle (degrees east of north, away from the Sun), perihelion, rise, set and transit in local time, the best moment with the Sun 12° down (altitude, azimuth, compass point) and a plain verdict. Positions are computed from JPL Small-Body Database orbits refreshed twice a day, two-body from the osculating epoch, with the Earth from DE440: within about 5″ of JPL Horizons over 30 days in tests. Empty when no comet is that bright.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
date string The evening the night starts, YYYY-MM-DD. Default: the night under way, or the coming one.
maxMag number Faintest predicted magnitude, −10 to 16 (default 10).

Try it: /api/v1/comets?lat=47.61&lon=-122.33&tz=America/Los_Angeles&maxMag=12

Caching: With date and coordinates: 10 minutes. Tonight: private. · Schema: GetComets in OpenAPI

GET /api/v1/asteroids/close-approaches

Asteroids passing the Earth

Earth close approaches from NASA JPL CNEOS's Close-Approach Data, from yesterday through the coming days, nearest first in time: designation, time (UTC) and its uncertainty as CNEOS writes it, distance from the Earth's centre in lunar distances (384,400 km), km, miles and au with the uncertainty range, relative speed, absolute magnitude H and size (measured, or estimated from H for albedos 0.25 to 0.05, in m and ft), peakMagnitude (the brightest it could look, ignoring phase), the Sentry impact-monitoring entry when CNEOS lists one, and a calm one-line context. Refreshed twice a day.

ParameterTypeDescription
days integer How many days ahead, 1 to 60 (default 60).
maxLd number Only approaches within this many lunar distances, up to 20 (default 20).

Try it: /api/v1/asteroids/close-approaches?days=30&maxLd=5

Caching: An hour. · Schema: GetCloseApproaches in OpenAPI

GET /api/v1/fireballs

Fireballs seen by U.S. Government sensors

Bright fireballs (bolides) from NASA JPL CNEOS's Fireball Data: peak brightness time (UTC), latitude and longitude, altitude, speed (km/s and mph), radiated optical energy (joules) and estimated impact energy (kilotons of TNT). Only the largest events, worldwide; a few dozen a year. Newest first, or nearest first with lat and lon (distanceKm, distanceMi). Some fields are null when not reported.

ParameterTypeDescription
days integer How many days back, 1 to 365 (default 365).
lat number Latitude to sort by distance from, with lon.
lon number Longitude, with lat.

Try it: /api/v1/fireballs?days=90

Caching: An hour. · Schema: GetFireballs in OpenAPI

Photography

Golden and blue hours, the Moon for observers, the Sun and Moon behind a landmark, the days the Sun lines up with a city's streets, and space stations crossing the Sun and Moon.

GET /api/v1/golden-hour

Golden and blue hours, day by day

The golden hour (the Sun's center from 6° above to 4° below the horizon) and blue hour (4° to 6° below) of each local day, morning and evening, with the Sun's azimuth at each end (where the light comes from), sunrise and sunset. Near the poles a window can last all day (part allDay) or all night (allNight); one cut by midnight says so. Airless altitudes, as for twilight.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
date string Local date, YYYY-MM-DD, in the proleptic Gregorian calendar as ISO 8601 defines it (before 15 October 1582 this is not the Julian date people then wrote). Default: today at the place.
days integer How many days from date, 1 (default) to 14.
terrain string 1 adds when the Sun's top clears the real skyline and goes behind it (needs lat and lon).

Try it: /api/v1/golden-hour?lat=47.61&lon=-122.33&tz=America/Los_Angeles&date=2026-06-21&days=3

Caching: Explicit coordinates: shared caches may keep it 10 minutes. The caller's own location: private. · Schema: GetGoldenHour in OpenAPI

GET /api/v1/moon-observing

The Moon for observers, and the Moon 100

One night's Moon at a place: the moment it stands highest in the darkest sky it gets, its phase, libration, the Sun's colongitude and the subsolar latitude then, and how it stands on the sky (axisAngle: its north pole's position angle; parallacticAngle: the zenith's; both from celestial north toward east, so a picture turned by axisAngle minus parallacticAngle from lunar north up stands as in the sky); and for each of a hundred features (names, positions and sizes from the IAU gazetteer) the Sun's altitude over it, its light (hidden beyond the limb, dark, on the terminator, lit or under a high Sun), whether it is at its best, and the next evening it will be, within searchDays.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
date string The evening the night starts, YYYY-MM-DD. Default: the night under way, or the coming one.

Try it: /api/v1/moon-observing?lat=47.61&lon=-122.33&tz=America/Los_Angeles&date=2026-11-28

Caching: Explicit coordinates: shared caches may keep it 10 minutes. The caller's own location: private. · Schema: GetMoonObserving in OpenAPI

GET /api/v1/alignment

When the Sun or Moon passes behind a landmark

From the place (lat, lon) to a landmark (tlat, tlon) with its own height: the distance and bearing on the ellipsoid, the top's apparent elevation with the Earth's curvature and refraction, ground heights from a 30 m elevation model, and every moment in the span the Sun's or Moon's center passes within tolerance of the top, with how far right or left and above or below. When none does, the closest pass within 3°.

ParameterTypeDescription
lat
required
number Latitude in degrees, north positive (−90 to 90).
lon
required
number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
tlat
required
number The landmark's latitude.
tlon
required
number The landmark's longitude.
height number The landmark's height above its ground, in meters (0, a summit, by default).
date string The first local day to search, YYYY-MM-DD. Default: now.
days integer How many days to search, 1 to 366 (default 365).
tolerance number How close a pass counts, in degrees from the top: 0.05 to 3 (default 0.5).
body string sun, moon or both (default).

Try it: /api/v1/alignment?lat=47.6295&lon=-122.3599&tz=America/Los_Angeles&tlat=47.6205&tlon=-122.3493&height=184&days=90

Caching: Explicit coordinates: shared caches may keep it 10 minutes. The caller's own location: private. · Schema: GetAlignment in OpenAPI

GET /api/v1/alignment/stand

Where to stand to see the Sun or Moon on a landmark

Through one local day, every step minutes while the body is 0.3° to 20° up: the spot on the line from the landmark away from the body, as far out as makes the landmark's top stand at the body's altitude (curvature, refraction and the ground there from the elevation model), from 50 m to 60 km away.

ParameterTypeDescription
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
tlat
required
number The landmark's latitude.
tlon
required
number The landmark's longitude.
height number The landmark's height above its ground, in meters.
date string Local date, YYYY-MM-DD, in the proleptic Gregorian calendar as ISO 8601 defines it (before 15 October 1582 this is not the Julian date people then wrote). Default: today at the place.
body string sun or moon (default).
step integer Minutes between spots, 1 to 60 (default 5).

Try it: /api/v1/alignment/stand?tlat=47.6205&tlon=-122.3493&height=184&tz=America/Los_Angeles&date=2027-03-27&body=moon

Caching: Explicit coordinates: shared caches may keep it 10 minutes. The caller's own location: private. · Schema: GetAlignmentStand in OpenAPI

GET /api/v1/city-henge

The days the Sun lines up with a city's streets

For 366 days from date: where the Sun stands when its whole disk sits on the horizon (full) and when it is half set (half), rising and setting, with refraction, over a horizon of the given height. And the street grid within radius of the place, read from OpenStreetMap: its directions (peaks of street length by direction), some of their streets, and the days the rising or setting Sun lines up with each, full and half disk (Manhattanhenge for any city).

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
date string Local date, YYYY-MM-DD, in the proleptic Gregorian calendar as ISO 8601 defines it (before 15 October 1582 this is not the Julian date people then wrote). Default: today at the place.
horizon number The horizon's height at the streets' ends, in degrees (−2 to 10, default 0).
radius number How far around the place to read streets, 200 to 3,000 m (default 1,500).

Try it: /api/v1/city-henge?lat=40.758&lon=-73.9855&tz=America/New_York&horizon=0.6

Caching: Explicit coordinates: shared caches may keep it 10 minutes. The caller's own location: private. · Schema: GetCityHenge in OpenAPI

GET /api/v1/city-henge/streets

The straight streets around a point

Straight stretches of street (60 m and longer) within radius of a point, from the street map's OpenStreetMap tiles: each as [lat1, lon1, lat2, lon2, bearing, meters, name index], with the names listed once. 404 where the street map is unavailable.

ParameterTypeDescription
lat
required
number Latitude in degrees, north positive (−90 to 90).
lon
required
number Longitude in degrees, east positive (−180 to 180).
radius number 200 to 3,000 m (default 1,500).

Try it: /api/v1/city-henge/streets?lat=40.758&lon=-73.9855&radius=800

Caching: A day: the data changes only with a deployment. · Schema: GetCityHengeStreets in OpenAPI

GET /api/v1/deep-sky

Galaxies, nebulae and clusters up tonight

The deep-sky catalog for one night at a place, with the page's filters: objects above alt for at least min minutes in the chosen directions inside the window (astronomical darkness by default), most photogenic first. Each with its J2000 and apparent (of date) right ascension and declination, apparent altitude and azimuth at the night's moment (time, else now or the middle of darkness), rise, transit, set and its best moment, size, magnitude, surface brightness, the Moon's interference, clear minutes from the forecast the server already holds, a focal length that frames it and a difficulty from the place's sky brightness. The catalog fields are adapted from OpenNGC (Mattia Verga) and shared under CC BY-SA 4.0: keep credit and license when you reuse them.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
date string The evening the night starts, YYYY-MM-DD. Default: the night under way, or the coming one.
time string A local clock time in the night, HH:mm, for altitude and azimuth. Default: now during the night, else the middle of darkness.
alt number Minimum altitude in degrees, −5 to 89 (default 30).
terrain string 1: the object must also clear the real skyline around the point (30 m elevation data); needs lat and lon. night.terrain says whether it was used.
min integer Minimum minutes meeting the rule, 0 to 1440 (default 30).
dir string Directions, comma-separated (N, NE, E, SE, S, SW, W, NW), each 45° wide; the object must be in one of them. A 16-point name such as NNE takes in both neighbors. Default: all.
window string dark (astronomical darkness, default), night (sunset to sunrise) or custom with from and to (HH:mm).
cat string Catalogs, comma-separated: messier, caldwell, ngc, ic, sharpless, barnard, ldn, lbn, vdb, abell, collinder, melotte, arp, other.
type string Types, comma-separated: galaxies, nebulae, planetary-nebulae, supernova-remnants, star-clusters, star-patterns.
mag number Brighter than this magnitude.
minsize number Larger than this many arcminutes.
maxsize number Smaller than this many arcminutes.
sb number Surface brightness under this, mag/arcsec².
con string Constellation, IAU abbreviation (Ori, Cyg).
moonsep number At least this many degrees from the Moon when it is up.
sensor string With focal: ff, apsc, canon-apsc, m43, imx571, imx585 or imx533; keeps objects that fit the frame.
focal number Focal length in millimeters, with sensor.
all string 1 for every object, not only the photogenic set (about 2,000).
hidden string 1 to include objects that miss the rule tonight.
sort string score (default), time, altitude, hours, magnitude, size or name.
q string Find by designation (M31, NGC 7000) or name; ignores the other filters.
offset integer Skip this many (default 0).
limit integer How many, 1 to 500 (default 100).

Try it: /api/v1/deep-sky?lat=47.61&lon=-122.33&tz=America/Los_Angeles&date=2026-11-28&alt=40&dir=E,SE,S&limit=10

Caching: Explicit coordinates: shared caches may keep it 10 minutes. The caller's own location: private. · Schema: GetDeepSky in OpenAPI

GET /api/v1/deep-sky/{id}

One deep-sky object tonight, and how to find it

One object of the deep-sky catalog on one night at a place: all the fields of /api/v1/deep-sky, and a star hop phrased from the horizon at the moment it is drawn for (when the object is up, else its best): hand-written routes for the Messier and Caldwell objects, routes generated from bright stars for the rest. CC BY-SA 4.0, adapted from OpenNGC.

ParameterTypeDescription
id
required
string
in path
m31, c14, ngc7000, ic434, or a designation such as M 31.
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
date string The evening the night starts, YYYY-MM-DD.
time string A local clock time in the night, HH:mm.
alt number Minimum altitude for visibleMinutes, −5 to 89 (default 30).
terrain string 1: visibleMinutes also need the object over the real skyline around the point; needs lat and lon.

Try it: /api/v1/deep-sky/m31?lat=47.61&lon=-122.33&tz=America/Los_Angeles&date=2026-11-28

Caching: Explicit coordinates: shared caches may keep it 10 minutes. The caller's own location: private. · Schema: GetDeepSkyObject in OpenAPI

GET /api/v1/exoplanets

Naked-eye stars with known planets and exoplanet transits tonight

Confirmed exoplanets around naked-eye stars (V <= 6.5) overhead tonight and amateur-observable exoplanet transits (V <= 12.5, depth >= 0.4%, ephemeris uncertainty <= 30 min) at a place, from the NASA Exoplanet Archive (Caltech/IPAC, public domain). Host stars include J2000 and of-date coordinates, distance in light-years, best time, altitude, azimuth and whether they clear the local Bortle naked-eye limit. Each planet's period and epoch come from one paper that another paper agrees with (ephemerisReference); planets whose papers disagree are left out. Transits include BJD-corrected local ingress, mid-transit and egress times, full vs partial status, depth in percent and millimagnitudes, timing uncertainty, altitudes, Moon separation and clear minutes from the held forecast.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
date string The evening the night starts, YYYY-MM-DD. Default: the night under way, or the coming one.
alt number Minimum altitude in degrees for host stars, 0 to 85 (default 15).
transitAlt number Minimum altitude in degrees for transits, 0 to 85 (default 20).
maxMag number Faintest transit host magnitude, 4 to 15 (default 12.5).
minDepth number Minimum transit depth in percent, 0.1 to 20 (default 0.4).

Try it: /api/v1/exoplanets?lat=47.61&lon=-122.33&tz=America/Los_Angeles&date=2026-11-30

Caching: Explicit coordinates: shared caches may keep it 10 minutes. The caller's own location: private. · Schema: GetExoplanets in OpenAPI

GET /api/v1/transits

When the ISS, Tiangong or Hubble crosses the Sun or Moon near a place

Transits of the ISS, China's Tiangong and the Hubble telescope across the Sun and the Moon whose centre lines pass within radius of the place: when the satellite crosses the middle of the disk at the centre line's nearest point (time, to the millisecond), where that is (nearest, distanceKm and bearingDegrees from the place), how wide the strip is from which it crosses the disk at all (pathWidthKm, across the path) and how long it takes on the centre line, the Sun's or Moon's altitude, azimuth and radius there, the satellite's distance and size, and the same transit from the place itself (here: closest approach, inPath, durationSeconds). centerLine, leftEdge and rightEdge are [longitude, latitude] pairs for a map. Paths are computed for the ground height at the place (groundHeightMeters); shiftPer100MetersKm is how far the path moves toward the Sun or Moon for ground 100 m higher. confidence follows the time since the elements' epoch: firm within a day, likely within three, else early; recheck the day before, as reboosts move the station. Elements are CelesTrak's, refreshed every two hours; the Sun and Moon come from the JPL ephemeris. weather is the cloud forecast at the transit's time for the 0.25° cell around the nearest point (status ok with cloudPercent and summary, beyond when no run reaches it yet, none when there is none), from ECMWF's IFS, DWD's ICON or NOAA's GFS, credited in weatherAttribution.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
radius number Kilometres from the place the centre line may pass, 1 to 250. Default 80.
days integer Days ahead, 1 to 14. Default 10.

Try it: /api/v1/transits?lat=47.61&lon=-122.33&tz=America/Los_Angeles&radius=100

Caching: Explicit coordinates: shared caches may keep it 10 minutes. The caller's own location: private. · Schema: GetTransits in OpenAPI

Satellites

Every active satellite from CelesTrak's catalog, sorted by orbit, purpose, owner country and constellation, with its current mean elements for SGP4. Refreshed every two hours.

GET /api/v1/satellites

Active satellites, filtered and counted

Every active satellite in CelesTrak's catalog (about 17,000, two thirds of them Starlink), filtered by any mix of orbit (leo, meo, geo, heo), trait (sun-synchronous, polar, geostationary, molniya, tundra, retrograde), purpose (communications, navigation, weather, earth-observation, science, crewed, amateur-radio, military, technology, unknown), country (the owner's ISO 3166 code, international or unknown), owner (CelesTrak's SATCAT owner code), constellation (starlink, oneweb, amazon-leo, qianfan, guowang, gps, galileo, beidou and others) or q (part of the name, a COSPAR ID or a catalog number). Each list parameter takes values separated by commas; a satellite matches any of them. byOrbit, byPurpose, byCountry and byConstellation count the whole filtered set; satellites holds one page of it, by catalog number. Purposes come from CelesTrak's group lists, then from program names; satellites neither describes are unknown rather than guessed. Orbits are classed from the mean elements: geo is a period within half an hour of a sidereal day and eccentricity under 0.1 (inclined geosynchronous orbits included), heo an eccentricity of 0.25 or more. dockedTo is the catalog number of the station an object is docked to.

ParameterTypeDescription
orbit string leo, meo, geo or heo, separated by commas.
trait string sun-synchronous, polar, geostationary, molniya, tundra or retrograde.
purpose string communications, navigation, weather, earth-observation, science, crewed, amateur-radio, military, technology or unknown.
country string ISO 3166 codes (US, CN), international or unknown.
owner string CelesTrak SATCAT owner codes (US, PRC, CIS, ESA, SES).
constellation string starlink, oneweb, amazon-leo, qianfan, guowang, iridium, gps, glonass, galileo, beidou and others.
q string Part of a name, a COSPAR ID (1998-067) or a catalog number.
starlink string false leaves Starlink out. Default: included.
limit integer Satellites in the page, 1 to 1000. Default 100.
offset integer Satellites to skip. Default 0.

Try it: /api/v1/satellites?purpose=navigation&orbit=meo&limit=5

Caching: 10 minutes. · Schema: GetSatellites in OpenAPI

GET /api/v1/satellites/{id}

One satellite and its elements

One active satellite by catalog number: what the list gives, its current mean elements in the OMM's terms (and the two TLE lines while its number fits in five digits), and the objects docked to it (the ISS's and Tiangong's visiting vehicles).

ParameterTypeDescription
id
required
integer
in path
NORAD catalog number, e.g. 25544 for the ISS.

Try it: /api/v1/satellites/25544

Caching: 10 minutes. · Schema: GetSatellite in OpenAPI

GET /api/v1/satellites/{id}/passes

When the ISS, Tiangong or Hubble passes over a place

Passes of the ISS (25544), Tiangong (48274) or Hubble (20580) over the place for the next ten days: where each rises through 10°, peaks and sets (time, altitude, azimuth, distance and whether sunlit), and for a visible pass (sunlit, at least 10° up, with the Sun 6° or more below the place's horizon) the moments it is first and last seen and its brightest magnitude, estimated from a standard magnitude at 1000 km and half lit. Predicted with SGP4 from CelesTrak's elements (refreshed every two hours); checked against Skyfield to within 1.5 seconds. A reboost moves later passes by a minute or more: check the day before.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
days integer Days ahead, 1 to 10. Default 10.
visible string false lists every pass above 10°, also those in daylight or in the Earth's shadow. Default: visible ones only.
id
required
integer
in path
25544, 48274 or 20580.

Try it: /api/v1/satellites/25544/passes?lat=47.61&lon=-122.33&tz=America/Los_Angeles

Caching: Explicit coordinates: shared caches may keep it 10 minutes. The caller's own location: private. · Schema: GetSatellitePasses in OpenAPI

Eclipses

Solar eclipses for ten years and lunar for two, with Besselian elements, and how each looks from any place.

GET /api/v1/eclipses

Upcoming eclipses, or a year's

Solar eclipses of the next ten years and lunar of the next two (or every eclipse of a year): type, greatest eclipse and where, gamma, magnitude, contacts, central duration and path width, saros, the countries that see it, and for solar eclipses the polynomial Besselian elements. Times are UTC.

ParameterTypeDescription
year integer A year from 1850 to 2149. Default: the upcoming list.

Try it: /api/v1/eclipses

Caching: Upcoming: 10 minutes. A year: a day. · Schema: GetEclipses in OpenAPI

GET /api/v1/eclipses/local

Upcoming eclipses seen from a place

Every upcoming eclipse with local, null when none of it is seen from the place; otherwise what is seen there (a total solar eclipse can be partial here), when it begins and ends (or the rise or set that interrupts it), the deepest moment and where to look, magnitude and obscuration, and each contact.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.

Try it: /api/v1/eclipses/local?lat=47.61&lon=-122.33&tz=America/Los_Angeles

Caching: Explicit coordinates: shared caches may keep it 10 minutes. The caller's own location: private. · Schema: GetLocalEclipses in OpenAPI

GET /api/v1/eclipses/{slug}

One eclipse, and how it looks from a place

An eclipse by the slug the lists give (solar or lunar is set), with local for the place or the caller's own location.

ParameterTypeDescription
slug
required
string
in path
e.g. 2026-08-12-total-solar-eclipse.
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.

Try it: /api/v1/eclipses/2026-08-12-total-solar-eclipse?lat=40.42&lon=-3.70&tz=Europe/Madrid

Caching: Explicit coordinates: shared caches may keep it 10 minutes. The caller's own location: private. · Schema: GetEclipse in OpenAPI

Calendars and crescent

The first crescent after each new moon by Yallop's and Odeh's criteria; the Islamic, Hebrew, Chinese and Hindu calendars; their holidays; and prayer times by a stated method.

GET /api/v1/crescent

The first crescent after a new moon, from a place

A new moon's first three evenings at the place: sunset, moonset and the lag, the Moon's age, and at the best time (sunset plus 4/9 of the lag) the crescent's geometry (ARCL, ARCV geocentric and topocentric, DAZ, width) with Yallop's q and class (A to F) and Odeh's V and zone (A to D). status says when the criteria do not apply (beforeNewMoon, moonSetsFirst, noSunset). islamic gives the month the new moon begins by the unified calendar (with when and where its criteria were first met), Umm al-Qura and sighting at the place.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
date string The new moon's UTC date (YYYY-MM-DD), 1900 to 2100. Default: the new moon of the last three days, else the next.

Try it: /api/v1/crescent?lat=47.61&lon=-122.33&tz=America/Los_Angeles&date=2027-02-06

Caching: With date and coordinates: 10 minutes. · Schema: GetCrescent in OpenAPI

GET /api/v1/calendars

A day in four calendars

The day's Islamic date by the unified calendar (Türkiye's Diyanet), Umm al-Qura (1423 to 1500 AH) and sighting at the place; the Hebrew date (by its fixed rules); the Chinese date (Beijing time, GB/T 33661-2017) with the year's animal, element and stem-branch; and the Hindu day read at the place's sunrise: tithi, fortnight, month both ways, nakshatra and era years. Days of the Islamic and Hebrew calendars begin at the previous sunset.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
date string Local date, YYYY-MM-DD, in the proleptic Gregorian calendar as ISO 8601 defines it (before 15 October 1582 this is not the Julian date people then wrote). Default: today at the place.

Try it: /api/v1/calendars?lat=47.61&lon=-122.33&tz=America/Los_Angeles&date=2027-02-08

Caching: Explicit coordinates: shared caches may keep it 10 minutes. The caller's own location: private. · Schema: GetCalendars in OpenAPI

GET /api/v1/hijri

An Islamic year's months by a method

Each month's first day and length by one method: unified (the 2016 Istanbul congress's single calendar as Diyanet applies it), umm-al-qura (Saudi Arabia's, 1423 to 1500 AH) or sighting (the day after the crescent should first be seen by eye at the place).

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
year integer Islamic year, 1300 to 1570. Default: the current one.
method string unified (default), umm-al-qura or sighting.

Try it: /api/v1/hijri?year=1448&method=umm-al-qura

Caching: A day. · Schema: GetHijri in OpenAPI

GET /api/v1/holidays

Ramadan, the Eids, Passover, Lunar New Year and Diwali in a year

Each holiday's dates in a Gregorian year. Ramadan, Eid al-Fitr and Eid al-Adha by method (unified, umm-al-qura, sighting at the place; Ramadan with its last day); Passover's 15 Nisan with its last day outside Israel; Lunar New Year; Diwali (Lakshmi Puja) at new-delhi and here, the place.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
year integer 1900 to 2100. Default: this year at the place.

Try it: /api/v1/holidays?lat=47.61&lon=-122.33&tz=America/Los_Angeles&year=2027

Caching: Explicit coordinates: shared caches may keep it 10 minutes. The caller's own location: private. · Schema: GetHolidays in OpenAPI

GET /api/v1/full-moons

A year's full moons, with supermoons, micromoons and blue moons

Every full moon whose local date falls in the year: the instant, the almanac name (the Harvest Moon nearest the September equinox and the Hunter's Moon after it; a month's second is the Blue Moon), the Moon's distance and apparent size, the perigee and apogee nearest in time, and the flags: supermoon and micromoon (within 90% of the way to that perigee or apogee, Espenak's reading of Nolle), blue moon (second in a calendar month in the place's zone) and seasonal blue moon (third of four in a season).

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
year integer 1901 to 2099. Default: this year at the place.

Try it: /api/v1/full-moons?lat=47.61&lon=-122.33&tz=America/Los_Angeles&year=2026

Caching: Explicit coordinates: shared caches may keep it 10 minutes. The caller's own location: private. · Schema: GetFullMoons in OpenAPI

GET /api/v1/prayer-times

Prayer times by a stated method

Fajr, sunrise, Dhuhr, Asr, Maghrib and Isha for one day or up to a month, by a calculation method whose angles and adjustments are returned with the times. Without method, the one usual in the place's country (else the Muslim World League's). fajrByHighLatitudeRule and ishaByHighLatitudeRule mark times set by the high-latitude rule.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
date string Local date, YYYY-MM-DD, in the proleptic Gregorian calendar as ISO 8601 defines it (before 15 October 1582 this is not the Julian date people then wrote). Default: today at the place.
days integer 1 (default) to 31.
method string mwl, isna, egypt, makkah, karachi, diyanet, tehran, jafari, kuwait, qatar, dubai, singapore or france.
asr string standard (one shadow length) or hanafi (two). Default: hanafi in Pakistan, India, Bangladesh and Afghanistan.
high string middle, seventh or angle: how Fajr and Isha are bounded at high latitudes. Default: middle below 48°, seventh above.

Try it: /api/v1/prayer-times?lat=41.0082&lon=28.9784&tz=Europe/Istanbul&method=diyanet&days=7

Caching: Explicit coordinates: shared caches may keep it 10 minutes. The caller's own location: private. · Schema: GetPrayerTimes in OpenAPI

GET /api/v1/events

A year's events in the sky

Every event of a year at the place, in time order with local times: the solstices and equinoxes, perihelion and aphelion, new and full moons (named for the place's zone, with supermoons, micromoons and blue moons), solar and lunar eclipses, the annual meteor showers' peaks (IMO 2026 calendar: rate, radiant, parent), the outer planets' oppositions, Mercury's and Venus' greatest elongations, conjunctions of planets within 3° of each other or of the Moon (from the Earth's center, both at least 15° from the Sun), and the year's holidays (Ramadan, the Eids, Passover, Lunar New Year, Diwali) with their local dates. path is the site's page for each. /united-states/washington/seattle/calendar.ics (or /calendar.ics with lat, lon and tz) is the same as a calendar to subscribe to; include= picks events, moon, holidays, sun and prayer.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
year integer 1901 to 2099. Default: this year at the place.

Try it: /api/v1/events?lat=47.61&lon=-122.33&tz=America/Los_Angeles&year=2026

Caching: Explicit coordinates: shared caches may keep it 10 minutes. The caller's own location: private. · Schema: GetEvents in OpenAPI

GET /api/v1/qibla

The Qibla: the direction of the Kaaba

From the place: the starting bearing of the geodesic to the Kaaba (21.422487° N, 39.826206° E) from true north on the WGS 84 ellipsoid (Vincenty), the great circle on a sphere as most tables give it, the compass bearing with the World Magnetic Model 2025's declination (null outside its years), and the distance; the local day's times the Sun stands in the Qibla's direction (sunToward) and directly opposite it, when shadows point the way (shadowsToward), with the Sun up; and the next time the Sun passes over the Kaaba (late May and mid-July), with whether it is up at the place then.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
date string Local date, YYYY-MM-DD, in the proleptic Gregorian calendar as ISO 8601 defines it (before 15 October 1582 this is not the Julian date people then wrote). Default: today at the place.

Try it: /api/v1/qibla?lat=40.7128&lon=-74.006&tz=America/New_York

Caching: Explicit coordinates: shared caches may keep it 10 minutes. The caller's own location: private. · Schema: GetQibla in OpenAPI

Tides

Tide predictions for about 5,000 stations worldwide (NOAA's harmonic and subordinate stations, and tide gauges from TICON-3) and the EOT20 ocean model along other coasts: high and low waters, heights, the next year's king tides and lowest tides, and windows when the water is past a level. Astronomical tide only; not for navigation.

GET /api/v1/tides

Tides for a place

The station the place's tides come from (the nearest within 120 km, the one asked for, or, with no station within 40 km of a coastal point, the EOT20 model at the nearest open water, heights above mean sea level), the height now and whether the water is rising, the next high and low, each day's high and low waters (local times), and the stations nearby. Heights are above the station's datum: MLLW at NOAA's stations, LAT elsewhere. Inland, station is null and note names the nearest station.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
date string Local date, YYYY-MM-DD, in the proleptic Gregorian calendar as ISO 8601 defines it (before 15 October 1582 this is not the Julian date people then wrote). Default: today at the place.
days integer Days from date, 1 to 31. Default 7.
station string A station id to use instead of the nearest.
units string metric (metres, default) or imperial (feet), for heights.

Try it: /api/v1/tides?lat=47.61&lon=-122.33&tz=America/Los_Angeles

Caching: Explicit coordinates: shared caches may keep it 10 minutes. The caller's own location: private. · Schema: GetTides in OpenAPI

GET /api/v1/tides/stations

Tide stations near a point, or all

Stations nearest first, with their source (noaa, gauge), kind (harmonic: predicted from its own constants; subordinate: NOAA's offsets from a reference station), time zone and tide table page.

ParameterTypeDescription
lat number Latitude, with lon. Required unless all=1.
lon number Longitude.
radius number Kilometres, up to 1000. Default 100.
limit integer 1 to 50. Default 10.
all string 1 lists every station (about 5,000).

Try it: /api/v1/tides/stations?lat=47.61&lon=-122.33&limit=5

Caching: A day. · Schema: GetTideStations in OpenAPI

GET /api/v1/tides/stations/{id}

One tide station

Its datum and levels (HAT, MHHW, MHW, MTL, MSL, MLW, MLLW, LAT; official marks NOAA's published datums, the others are computed from the constants over 2020 to 2038), NOAA's flood thresholds, the kind of tide and its form number, average spring and neap ranges, and the harmonic constants (or the reference station and offsets).

ParameterTypeDescription
id
required
string
in path
e.g. 9447130 (NOAA) or g123 (a gauge).
units string metric (metres, default) or imperial (feet), for heights.

Try it: /api/v1/tides/stations/9447130

Caching: A day. · Schema: GetTideStation in OpenAPI

GET /api/v1/tides/predictions

High and low waters, or heights

Predictions for a station from local midnight of date: every high and low water (interval=hilo), or the height every few minutes. Times are local at the station with their UTC offset. Subordinate stations' heights between high and low waters follow a half cosine.

ParameterTypeDescription
station
required
string Station id.
date string Local date, YYYY-MM-DD, in the proleptic Gregorian calendar as ISO 8601 defines it (before 15 October 1582 this is not the Julian date people then wrote). Default: today at the place.
days integer 1 to 366 for hilo, 1 to 31 for heights. Default 1.
interval string hilo (default), or minutes: 1, 5, 6, 10, 15, 30 or 60.
units string metric (metres, default) or imperial (feet), for heights.
format string json (default) or csv (a file, with the station, datum and credit in # lines first).

Try it: /api/v1/tides/predictions?station=9447130&days=2

Caching: A day with date; an hour without. · Schema: GetTidePredictions in OpenAPI

GET /api/v1/tides/events

Notable tides of the next year

From today at the station for 365 days: king tides (the highest 2% of high waters, grouped in runs, each with the new or full moon nearby, the Moon's distance and whether perigee is within two days), the lowest 2% of low waters (with daylight), high waters reaching NOAA's minor flood threshold, perigean spring tides (new or full moon within 36 hours of perigee) with the biggest tide around each, the year's highest and lowest tide, and each month's lowest daylight low.

ParameterTypeDescription
station
required
string Station id.
units string metric (metres, default) or imperial (feet), for heights.

Try it: /api/v1/tides/events?station=9447130

Caching: Six hours. · Schema: GetTideEvents in OpenAPI

GET /api/v1/tides/world

The ocean tide anywhere, from the world model

For any point at sea (a point on land takes the nearest sea within about 170 km): the EOT20 model averaged over the half-degree square there, with its eight main constituents (amplitude, Greenwich phase lag, speed), the kind of tide and its form number, the average spring and neap ranges, 2 (M2 ± S2), and tropic range, 2 (K1 + O1) (the one that matters where tides are diurnal), when the main lunar tide's high water comes in lunar hours after the Moon crosses Greenwich, the nearest M2 amphidromic point and which way high water turns round it (ccw or cw), and the tide above mean sea level from start (default: now) with its high and low waters in UTC. Open-ocean values: bays and estuaries differ, so use GetTides for a place on the coast.

ParameterTypeDescription
lat
required
number Latitude, decimal degrees.
lon
required
number Longitude, decimal degrees.
start string ISO 8601 date and time (UTC unless an offset is given). Default: now, rounded down to the interval.
hours integer 1 to 168. Default 48.
interval integer Minutes between heights: 10, 15, 30 (default) or 60.
units string metric (metres, default) or imperial (feet), for heights.

Try it: /api/v1/tides/world?lat=44.5&lon=-66&hours=24&interval=60

Caching: Ten minutes without start; a day with it. · Schema: GetWorldTide in OpenAPI

GET /api/v1/tides/world/amphidromes

Amphidromic points

The points in open water where the main twice-daily (M2) or once-daily (K1) tide vanishes and high water turns round, counterclockwise (ccw) or clockwise (cw) seen from above, found in the EOT20 model on a quarter-degree grid.

ParameterTypeDescription
wave string M2, K1 or all (default).

Try it: /api/v1/tides/world/amphidromes?wave=M2

Caching: A day. · Schema: GetWorldAmphidromes in OpenAPI

GET /api/v1/tides/events.ics

Notable tides as a calendar

The same king tides, lowest tides and flood-level tides as an iCalendar file to subscribe to (text/calendar).

ParameterTypeDescription
station
required
string Station id.
units string metric (metres, default) or imperial (feet), for heights.

Try it: /api/v1/tides/events.ics?station=9447130

Caching: Six hours.

GET /api/v1/tides/windows

When the water is past a level

Windows when the water is below (or above) a level for at least minutes, from today for days, optionally only in daylight: for tidepooling, beach walks, launching a boat or passing under a bridge. Each window gives its start and end, the lowest (or highest) water in it and the low (or high) water it holds.

ParameterTypeDescription
station
required
string Station id.
level
required
number The level above the station's datum, in units.
below string 1 (default): below the level; 0: above it.
light string any (default), day (sunrise to sunset) or civil (civil dawn to dusk).
days integer 1 to 366. Default 30.
minutes integer Shortest window. Default 30.
earliest string Local time HH:mm a window may start. Default none.
latest string Local time HH:mm a window must end by. Default none.
weekdays string The days allowed as digits, 0 Sunday to 6 Saturday (06 for weekends). Default all.
units string metric (metres, default) or imperial (feet), for heights.
format string json (default) or ics (a calendar file with one event per window).

Try it: /api/v1/tides/windows?station=9447130&level=0&light=day

Caching: An hour. · Schema: GetTideWindows in OpenAPI

Fishing

Should I fish, and when? The fishing page's answer for a place: windows scored by dawn and dusk, the tide and the weather, each day's answer for the next week, and solunar periods (shown as tradition, not scored).

GET /api/v1/fishing

Should I fish, and when?

The /fishing page's answer (ADR 0048). Every five minutes is scored from the light (dawn and dusk highest), the tide (salt water: moving water beats slack) and the hour's comfort; runs of good minutes the weather doesn't rule out become windows. verdict is yes or maybe (the best window left today, or in the next 24 hours, with or without a weather concern), no (the weather rules out every window today; against says what and when), timing (no forecast covers it: light and tide only) or none. Weather comes from ECMWF's IFS model, or DWD's ICON or NOAA's GFS where it has none (weatherAttribution); without a forecast (weatherStatus unavailable) windows are light and tide only. Times are local with their UTC offset; wind in m/s, temperatures in °C, rain in mm/h.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
water string salt or fresh. Default: salt within 15 km of a tide station (or the EOT20 model's open water), else fresh.
from string shore (default) or boat: a small boat has lower wind limits.
station string A tide station id to use instead of the nearest.
format string json (default) or ics: the windows of the next days as a calendar file.

Try it: /api/v1/fishing?lat=47.61&lon=-122.33&tz=America/Los_Angeles

Caching: Explicit coordinates: shared caches may keep it 5 minutes. The caller's own location: private. · Schema: GetFishing in OpenAPI

Hunting

When can I hunt, and should I go? Legal shooting light under a common rule for each day ahead, and the first and last hour of it with the weather. General suggestions: shooting hours are set by local regulations.

GET /api/v1/hunting

When can I hunt, and should I go?

The /hunting page's answer (ADR 0066). Legal light runs from sunrise minus the rule's offset to sunset plus its offset, for the exact point; the prime windows are its first and last hour, when deer and most game move. now says whether it is legal light (before, legal, after, or none when the Sun doesn't rise), with nextChange. verdict is yes or maybe (the next prime window, with or without a weather concern), no (the weather rules it out; also is the next one it doesn't), timing (no forecast: light only) or none. Weather comes from ECMWF's IFS model, or DWD's ICON or NOAA's GFS where it has none (weatherAttribution); without a forecast (weatherStatus unavailable) windows are light only. These are general suggestions, not the law where you hunt: regulations set shooting hours by species, season and zone. Times are local with their UTC offset; wind in m/s, temperatures in °C.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
rule string 30-30 (half an hour before sunrise to half an hour after sunset; the default), 30-sunset, sun (sunrise to sunset) or 60-60 (an hour each side; the default in Great Britain).
from string ground (default) or stand: a tree stand has lower wind limits.
days integer Days of legal light, 1 to 60. Default 14.

Try it: /api/v1/hunting?lat=47.61&lon=-122.33&tz=America/Los_Angeles

Caching: Explicit coordinates: shared caches may keep it 5 minutes. The caller's own location: private. · Schema: GetHunting in OpenAPI

Camping

Should I camp tonight? Each night's light and dark (pitch-by, last light, the moonless dark sky, first light) and the weather from pitch-by to sunrise with a tent's limits. General suggestions.

GET /api/v1/camping

Should I camp tonight?

The /camping page's answer (ADR 0069). A night runs from the evening's sunset to the next sunrise: pitchBy is an hour before sunset, lastLight civil dusk, fullDark astronomical dusk (darkEnds its end), firstLight civil dawn. darkSky lists the stretches of full dark with the Moon below the horizon (darkSkyHours in total; darkSkyNight when there are at least four). Each night the forecast covers has weather: its call (go, maybe, no) from pitch-by to sunrise, judged with a tent's wind limits (maybe at 20 mph or gusts 30, no at 30 or gusts 39), freezing air (maybe), thunder, heavy rain or snow (no); the low, wind, rain, clouds in the dark hours as stars, and dew. coveragePercent and completeCoverage describe availability for the remaining night. forecastThrough is set for partial coverage without gaps. A partial forecast cannot return go. verdict is yes, maybe or no for tonight, or timing without a forecast; also is the next night worth it. Weather comes from ECMWF's IFS model, or DWD's ICON or NOAA's GFS where it has none (weatherAttribution). General suggestions, not safety advice: a go only means the forecast is within the stated limits. Times are local with their UTC offset; wind in m/s, temperatures in °C, rain in mm/h.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
nights integer Nights to list, tonight first, 1 to 60. Default 14.

Try it: /api/v1/camping?lat=47.61&lon=-122.33&tz=America/Los_Angeles

Caching: Explicit coordinates: shared caches may keep it 5 minutes. The caller's own location: private. · Schema: GetCamping in OpenAPI

GET /api/v1/outdoors/report

Multi-day outdoor trip sheet

The /outdoors/print trip sheet as JSON (ADR 0088): combines Sun and twilight, Moon phase and rise/set, magnetic declination (NOAA/BGS WMM), daily weather summary, camping nights and moonless dark sky, fishing light and solunar periods (tradition, not scored), hunting legal light under a common rule, kayaking daylight and coastal tide highs and lows, for 1 to 30 days from any start date (default: today + 2 days = 3 days). Weather comes from ECMWF's IFS model, or DWD's ICON or NOAA's GFS where it has none (weatherAttribution). General suggestions, not safety, legal or navigation advice.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
start string First local date, YYYY-MM-DD (1550 to 2650). Default: today at the place.
days integer Days to cover, 1 to 30. Default 3 (today + 2 days).
rule string Hunting legal-light rule: 30-30, 30-sunset, sun or 60-60.
water string ocean, delta or lake (default: ocean near a tide station, else lake).

Try it: /api/v1/outdoors/report?lat=47.61&lon=-122.33&tz=America/Los_Angeles&days=3

Caching: Explicit coordinates: shared caches may keep it 5 minutes. The caller's own location: private. · Schema: GetOutdoorsReport in OpenAPI

Kayaking

Should I paddle, and when? Daylight split by the weather with a kayak's wind limits, on the ocean, a river delta or a lake, and predicted high and low water at a nearby tide station (none on a lake). General suggestions, not navigation advice.

GET /api/v1/kayaking

Should I paddle, and when?

The /kayaking page's answer (ADR 0069). Daylight (sunrise to sunset) today and the next two days is split by the forecast into windows of one call each (go, maybe, no; timing without a forecast), judged with a kayak's wind limits (maybe at 12 mph or gusts 18, no at 20 mph or gusts 25), fog, thunder, rain, snow, heat and cold. water is ocean, delta or lake; without one it is ocean when a tide station lies within 25 km (or station is given), else lake. On the ocean or a delta with a tide station within 25 km (or station), each window lists predicted high and low water in waterLevels; on a lake station is null and tides and waterLevels are empty. Current predictions and route advice are unavailable. The legacy slack array is empty and trend, plan, turnAt and planText are null. verdict is yes or maybe (the first good, or else watchable, window of the first day with light), no (the weather rules out the day; also is the next window worth it), timing or none. Weather comes from ECMWF's IFS model, or DWD's ICON or NOAA's GFS where it has none (weatherAttribution). General suggestions, not navigation or safety advice: a go only means the forecast is within the stated limits. Times are local with their UTC offset; heights in metres above the station's datum; wind in m/s, temperatures in °C.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
water string ocean (default) or delta: identifies the type of waterway.
station string A tide station id to use instead of the nearest.

Try it: /api/v1/kayaking?lat=47.61&lon=-122.33&tz=America/Los_Angeles

Caching: Explicit coordinates: shared caches may keep it 5 minutes. The caller's own location: private. · Schema: GetKayaking in OpenAPI

Nature calendar

Spectacles the Moon, the Sun and the tides time: grunion runs, coral spawning, red crabs, the palolo rising, fireworms, glowing bays and the grouper moon, each night predicted from its source's rule; and dark evenings for any place.

GET /api/v1/nature

Every spectacle and what is coming up

The /nature page's list (ADR 0059): each spectacle with where it is, its season, its page and its next window (on now or coming), then the windows coming up across all of them, soonest first. A window is a run of nights tied to one moon: its label, the phase it hangs on, a rating (best, likely, possible, unlikely) and each night's date, when to watch, rating and note, with the high tide or moonrise the time hangs on. Times carry the spectacle's own UTC offset. format=ics gives every spectacle's nights from a month back to a year ahead as a calendar.

ParameterTypeDescription
count integer Windows coming up, 1 to 50. Default 12.
format string json (default) or ics.

Try it: /api/v1/nature

Caching: An hour. · Schema: GetNature in OpenAPI

GET /api/v1/nature/dark-evenings

Dark evenings at a place

From today at the place: each evening's nautical dusk, whether it is dark (the Moon down, or under 15% lit, for the three hours after), and the moonrise or moonset in those hours. Evenings that never reach nautical dusk have dusk null and are not dark. For moth trapping, bioluminescence and deep-sky watching.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.
days integer 1 to 60. Default 30.

Try it: /api/v1/nature/dark-evenings?lat=47.61&lon=-122.33&tz=America/Los_Angeles

Caching: Explicit coordinates: shared caches may keep it 10 minutes. The caller's own location: private. · Schema: GetDarkEvenings in OpenAPI

GET /api/v1/nature/{slug}

A spectacle's nights in a year

One spectacle's windows whose first night falls in the year (its local dates), with its next window, the tide station its times came from, and tideMissing when the rule needs a tide that could not be reached (times then follow sunset). Slugs: grunion-runs, grouper-moon, gladden-spit-whale-sharks, horseshoe-crabs, christmas-island-red-crabs, great-barrier-reef-coral-spawning, ningaloo-coral-spawning, florida-keys-coral-spawning, flower-garden-banks-coral-spawning, okinawa-coral-spawning, kaneohe-bay-rice-coral, palolo-rising, ostional-arribada, waikiki-box-jellyfish, bermuda-fireworms, bioluminescent-bays, toyama-firefly-squid, matsu-blue-tears, victoria-falls-lunar-rainbow, cumberland-falls-moonbow, yosemite-moonbow, kasanka-bat-migration, congress-avenue-bats, phillip-island-penguin-parade, sort-sol-black-sun, severn-bore, mont-saint-michel-great-tides, qiantang-tidal-bore, horsetail-fall-firefall, diamond-fuji-yamanakako, longyearbyen-sun-return, nordkapp-midnight-sun, bau-nyale-lombok, platte-river-sandhill-cranes, burrishoole-silver-eels, lake-kariba-kapenta-lights, gulf-grunion-puerto-penasco. format=ics gives its nights from a month back to two years ahead (or the year asked for) as a calendar.

ParameterTypeDescription
slug
required
string
in path
The spectacle, e.g. grunion-runs.
year integer 2000 to 2100. Default: this year at the spectacle.
format string json (default) or ics.

Try it: /api/v1/nature/grunion-runs?year=2026

Caching: An hour. · Schema: GetNatureSpectacle in OpenAPI

Space weather and aurora

NOAA and NASA data the site keeps current, and the aurora verdict for a place.

GET /api/v1/aurora/forecast

Will the aurora be visible from a place?

The /aurora page's verdict for tonight and the next two nights: the place's magnetic latitude (AACGM-v2), the Kp each viewing level needs, a headline and summary, and per night darkness, the best viewing level (0 not from here, 1 camera only, 2 low on the horizon, 3 overhead) and when, the forecast Kp, the Moon, and the clouds over the best hours (from ECMWF's open model, else DWD's ICON or NOAA's GFS, credited in weatherAttribution), which the headline and summary weigh too.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.

Try it: /api/v1/aurora/forecast?lat=64.84&lon=-147.72&tz=America/Anchorage

Caching: Live data: up to a minute. · Schema: GetAuroraForecast in OpenAPI

GET /api/v1/aurora

NOAA's aurora data

The OVATION oval (a 181 × 360 grid of percent, zlib-compressed and base64-encoded), Kp observed and forecast in 3-hour blocks, NOAA's storm odds, the 27-day outlook, the forecast discussion, the solar wind at L1, hemispheric power, alerts and the solar cycle, with each feed's status. 503 until the first fetch.

Try it: /api/v1/aurora

Caching: Live data: up to a minute. · Schema: GetAurora in OpenAPI

GET /api/v1/aurora/now

Is a geomagnetic storm under way?

NOAA's estimated Kp now and its G level, the highest Kp and G level NOAA forecasts in the next 24 hours, and whether either is a storm (G1 or more), with a one-line summary. A few hundred bytes, the same for everyone; the site's header used it for its storm dot until ADR 0070 (now /api/v1/alerts/now). 503 until the first fetch.

Try it: /api/v1/aurora/now

Caching: Five minutes. · Schema: GetAuroraNow in OpenAPI

GET /api/v1/alerts/now

A solar storm alert, and the aurora from a place tonight

What the site's header dots show. sun: a solar storm alert or null, from NOAA's G level now or forecast within 24 hours, its S level now and its R level now from R2 (R1 comes most days near solar maximum); level is the highest (1 minor to 5 extreme), with each part and a one-line label. aurora: null unless the aurora should be visible from the place tonight (viewing level 1 camera only, 2 low on the horizon or 3 overhead, by the /aurora page's rules, without clouds), with a one-line label. Without coordinates the place is the caller's own.

ParameterTypeDescription
lat number Latitude in degrees, north positive (−90 to 90). With lon; send both: without them the API uses the place saved on the caller's browser, else the site's default. API clients are never placed by their IP address (MaxMind's GeoLite license).
lon number Longitude in degrees, east positive (−180 to 180).
tz string IANA time zone for local dates and times, e.g. America/Los_Angeles. Default: the zone of the nearest listed place, else the nautical zone (marked approximate).
name string A name for the place, echoed back in location.name.

Try it: /api/v1/alerts/now?lat=64.84&lon=-147.72&tz=America/Anchorage

Caching: Five minutes. · Schema: GetAlertsNow in OpenAPI

GET /api/v1/aurora/kp-history

Kp every three hours since 2008

GFZ Potsdam's definitive and nowcast Kp (CC BY 4.0) as thirds (Kp 4+ is 13, 255 missing), zlib-compressed and base64-encoded.

Try it: /api/v1/aurora/kp-history

Caching: An hour. · Schema: GetKpHistory in OpenAPI

GET /api/v1/solar-radiation

The Sun's radiation now

NOAA's GOES X-ray class and flux and proton flux at 10 and 100 MeV, the R (radio blackout) and S (radiation storm) levels and NOAA's three-day outlook. Fields are null when NOAA's report is missing or more than two hours old.

Try it: /api/v1/solar-radiation

Caching: Live data: up to a minute. · Schema: GetSolarRadiation in OpenAPI

GET /api/v1/solar-activity

Recent solar flares

NASA DONKI's flares of the last weeks, the strongest recent one and the latest particle event, with the last fetch's outcome.

Try it: /api/v1/solar-activity

Caching: None: the server refreshes hourly. · Schema: GetSolarActivity in OpenAPI

GET /api/v1/sunspots

Sunspot numbers and today's regions

NOAA SWPC's own sunspot counts: the daily SWPC sunspot number (10 × groups + spots) with the day's sunspot area, new regions and 10.7 cm flux for the last year, monthly observed and 13-month smoothed numbers since 2008, NOAA's forecast of the smoothed number with its range, and the numbered regions on the disk in NOAA's latest summary (location, Carrington longitude, area, spots, McIntosh and Mount Wilson classes, flare probabilities), with each feed's status. 503 until the first fetch.

Try it: /api/v1/sunspots

Caching: Live data: up to a minute. · Schema: GetSunspots in OpenAPI

GET /api/v1/hf-conditions

Space weather for HF radio

What the /ham-radio page works from: solar flux and an effective sunspot number, Kp observed and forecast, GOES X-rays and protons, the solar wind, NOAA's scales and the D-RAP absorption grid, with each feed's status. Band predictions are computed in the visitor's browser.

Try it: /api/v1/hf-conditions

Caching: Live data: up to a minute. · Schema: GetHfConditions in OpenAPI

GET /api/v1/space-weather/status

NASA DONKI services and their freshness

The NASA DONKI services the /space-weather page uses, how long each stays fresh, the last fetch and any error, and the current 30-day slice number.

Try it: /api/v1/space-weather/status

Caching: None. · Schema: GetSpaceWeatherStatus in OpenAPI

GET /api/v1/space-weather/{service}/{slice}

One DONKI service for 30 days

NASA DONKI's own JSON for a service (FLR, CME, CMEAnalysis, CMEAnalysisAll, WSAEnlilSimulations, IPS, SEP, GST, MPC, RBE, HSS, notifications) over one 30-day slice, numbered from 2010-01-01, in an envelope with the fetch time.

ParameterTypeDescription
service
required
string
in path
A DONKI service, e.g. CME.
slice
required
integer
in path
Slice number: days since 2010-01-01 divided by 30.

Try it: /api/v1/space-weather/CME/205

Caching: Current slices: 2 minutes; older: up to a day.

Weather

Cloud cover and conditions for a place, hour by hour for five days. API clients get ECMWF's IFS model, or DWD's ICON or NOAA's GFS where it has none, credited in attribution; the site's own pages show OpenWeather's, whose license keeps it there.

GET /api/v1/weather

Cloud cover and conditions

Hourly cloud cover (percent) and OpenWeather-style condition codes for the 0.25° cell around the point, from the newest run of ECMWF's IFS model the site holds (or DWD's ICON or NOAA's GFS where it has none): five days ahead, 3-hourly values interpolated to hours. Credit attribution wherever you show it. Recorded weather (from and to) is for the site's own pages, whose forecasts come from OpenWeather.

ParameterTypeDescription
lat
required
number Latitude in degrees, north positive (−90 to 90).
lon
required
number Longitude in degrees, east positive (−180 to 180).
from string Start of a past range, ISO 8601.
to string End of the range, at most two days after from.
hours integer Hours ahead the page needs, 1 to 48. Only the site's own pages make the server fetch hours past the first 20; API calls get the hours it holds either way.

Try it: /api/v1/weather?lat=47.61&lon=-122.33

Caching: 10 minutes for API clients (a new run comes every six hours). · Schema: GetWeather in OpenAPI

Places

34,000 named places, any point's name and time zone, and where the caller is.

GET /api/v1/location

Where the caller is

Where the site places the caller (the same logic as the home page: coordinates, then the saved Home or where they are, by mode), the IP address used, the country that address alone places them in (the site's own pages only: API clients are never placed by IP, under MaxMind's GeoLite license), the mode (home or go), the saved Home, and, in Home mode, a network location far from Home that the site would offer to switch to.

Try it: /api/v1/location

Caching: Never. · Schema: GetLocation in OpenAPI

GET /api/v1/addresses

Street addresses while typing

For the site's own place search only: address suggestions from Amazon Location Service, whose terms do not let us offer address lookup as a public API, so API clients get 403. Use /api/v1/places for towns and cities. Japan is not covered.

ParameterTypeDescription
q
required
string The text typed so far, at least 3 characters.
lat number Latitude to rank suggestions around; default where the caller is.
lon number Longitude, with lat.

Try it: /api/v1/addresses?q=1600+Pennsylvania&lat=38.9&lon=-77.04

Caching: Never. · Schema: SuggestAddresses in OpenAPI

GET /api/v1/addresses/{id}

An address's coordinates

For the site's own place search only (API clients get 403): the coordinates, short name, label, country and nearest listed place's time zone of an address /api/v1/addresses suggested.

ParameterTypeDescription
id
required
string
in path
An id from /api/v1/addresses.

Try it: /api/v1/addresses/{id}

Caching: Never. · Schema: GetAddress in OpenAPI

GET /api/v1/addresses/at

A point's town or street

For the site's own map only (API clients get 403; Amazon Location's terms do not let us offer a public geocoder, and /api/v1/places/at names any point by the nearest listed place). Names a point by the address nearest it, from Amazon Location Service: its town ("Bellevue, WA"), or with detail=street its street and town ("NE 24th St, Bellevue, WA") when an address is within 300 m; never a house number. Amazon gets the point to about 100 m for a town and 10 m for a street. The time zone is the nearest listed place's. 404 where nothing with an address is near (the open sea); /api/v1/places/at names any point for free by the nearest listed place. Limited per network each hour and per day for the whole site; 429 or 503 with Retry-After when used up. The result may be kept.

ParameterTypeDescription
lat
required
number Latitude, -90 to 90.
lon
required
number Longitude, -180 to 180.
detail string town (default) or street.

Try it: /api/v1/addresses/at?lat=47.6101&lon=-122.2015&detail=town

Caching: Never. · Schema: AddressAtPoint in OpenAPI

GET /api/v1/places

Places by name

Accent- and case-insensitive prefix search over 34,000 GeoNames places, largest first. "Portland, OR" or "Paris, Texas" narrows by state or country.

ParameterTypeDescription
q
required
string The name, or its start.
limit integer 1 to 20; default 8.

Try it: /api/v1/places?q=portland

Caching: A day: the data changes only with a deployment. · Schema: SearchPlaces in OpenAPI

GET /api/v1/parks

US National and State Parks nearby or by name

All 63 US National Parks (National Park Service, public domain) and over 3,100 US State Parks (GeoNames, CC BY 4.0). Pass lat and lon to list all parks within radiusKm (default 321.9 km / 200 miles), sorted closest first, or pass q to search by park name or state.

ParameterTypeDescription
lat number Latitude in degrees (−90 to 90), paired with lon for nearby parks.
lon number Longitude in degrees (−180 to 180), paired with lat for nearby parks.
radiusKm number Search radius in kilometres (1 to 1000). Default 321.9 km (200 miles).
q string Park name or state filter.
kind string all (default), national or state.
limit integer Maximum results (default 500 for nearby, 20 for search).

Try it: /api/v1/parks?lat=47.61&lon=-122.33

Caching: A day: the data changes only with a deployment. · Schema: GetUsParks in OpenAPI

POST /api/v1/ask

A question answered in words

For the site's own search box only (API clients get 403; AI assistants get the same tools from the MCP server at /mcp). Answers a question with Claude Haiku 5.5 on Amazon Bedrock, which calls the MCP tools for every time and number, as server-sent events: status (a lookup under way), text (the answer in Markdown, in pieces), links (the pages used), error and done. Limited per network each hour and day and by a daily budget; 429 or 503 with Retry-After when used up.

curl -X POST -H "Authorization: Bearer smk_..." -H "Content-Type: application/json" \
  -d '{"question":"When is sunset in Lisbon on Friday?","place":{"latitude":38.7167,"longitude":-9.1333,"timeZone":"Europe/Lisbon","name":"Lisbon"}}' \
  "https://sunandmoon.com/api/v1/ask"

Caching: Never.

GET /api/v1/places/at

A name and time zone for any point

The listed place within 25 km takes the name, "Near X" within 100 km, else the coordinates; the time zone is the nearest place's within 500 km, else the nautical zone (approximate).

ParameterTypeDescription
lat
required
number Latitude in degrees, north positive (−90 to 90).
lon
required
number Longitude in degrees, east positive (−180 to 180).

Try it: /api/v1/places/at?lat=35.7&lon=139.7

Caching: A day: the data changes only with a deployment. · Schema: PlaceAtPoint in OpenAPI

GET /api/v1/countries

Countries with listed places

Every country with places: ISO code, English name, how many places and its page.

Try it: /api/v1/countries

Caching: A day: the data changes only with a deployment. · Schema: ListCountries in OpenAPI

GET /api/v1/countries/{code}/places

A country's places

Every listed place in a country, most populous first.

ParameterTypeDescription
code
required
string
in path
ISO 3166-1 alpha-2, e.g. US.

Try it: /api/v1/countries/nz/places

Caching: A day: the data changes only with a deployment. · Schema: PlacesInCountry in OpenAPI

Aurora alerts

Your account's aurora alerts, the same ones as on /aurora/alerts: list, create, change, pause, test and delete them. These act for the key's account, so they need a key; they count toward its limits like any call.

GET /api/v1/aurora/alerts Needs a key

Your aurora alerts

Every alert of the key's account, oldest first, each with its place, settings, what it last sent and, when NOAA's data is at hand, tonight's outlook from there; the account's limits; and whether email to the account's address is getting through (email.alertsHeld is true while it bounces or was reported as spam: no alert goes out until that is fixed on /account).

curl -H "Authorization: Bearer smk_..." \
  "https://sunandmoon.com/api/v1/aurora/alerts"

Caching: Never. · Schema: ListAuroraAlerts in OpenAPI

POST /api/v1/aurora/alerts Needs a key

Create an aurora alert

Starts watching a place. latitude and longitude are required; timeZone and name default to the nearest listed place's (as /api/v1/places/at gives them). Every setting is optional and starts as on the page: level horizon, forecast tonight, now on, stronger on, any clouds, no quiet hours. level is camera, horizon or overhead; nights 1 (tonight) or 3; maxClouds 0 (ignore), 25, 50 or 75; quietFrom and quietTo HH:mm, local to the place, both or neither. 201 with the alert and its address in Location. One alert per place: 409 when the account already has an alert within 10 km (the problem's existing names it, and Location points to it), or as many alerts as it may keep.

curl -X POST -H "Authorization: Bearer smk_..." -H "Content-Type: application/json" \
  -d '{"latitude": 64.84, "longitude": -147.72, "timeZone": "America/Anchorage", "name": "Fairbanks", "level": "overhead", "nights": 3}' \
  "https://sunandmoon.com/api/v1/aurora/alerts"

Caching: Never. · Schema: CreateAuroraAlert in OpenAPI

GET /api/v1/aurora/alerts/{id} Needs a key

One aurora alert

The alert as the list gives it.

ParameterTypeDescription
id
required
string
in path
The alert's id.
curl -H "Authorization: Bearer smk_..." \
  "https://sunandmoon.com/api/v1/aurora/alerts/k3d9x2p7qa"

Caching: Never. · Schema: GetAuroraAlert in OpenAPI

PATCH /api/v1/aurora/alerts/{id} Needs a key

Change, pause or resume an alert

Changes only the fields sent; the place cannot change (delete the alert and create another). paused stops and restarts emails. Send an empty string for label, quietFrom and quietTo to clear them.

ParameterTypeDescription
id
required
string
in path
The alert's id.
curl -X PATCH -H "Authorization: Bearer smk_..." -H "Content-Type: application/json" \
  -d '{"level": "horizon", "maxClouds": 50, "quietFrom": "23:00", "quietTo": "06:30"}' \
  "https://sunandmoon.com/api/v1/aurora/alerts/k3d9x2p7qa"

Caching: Never. · Schema: UpdateAuroraAlert in OpenAPI

DELETE /api/v1/aurora/alerts/{id} Needs a key

Delete an alert

Stops it for good. 204, or 404 when there is no such alert.

ParameterTypeDescription
id
required
string
in path
The alert's id.
curl -X DELETE -H "Authorization: Bearer smk_..." \
  "https://sunandmoon.com/api/v1/aurora/alerts/k3d9x2p7qa"

Caching: Never.

POST /api/v1/aurora/alerts/{id}/test Needs a key

Send a test email for an alert

Emails the account what the alert would say now (or, when nothing is due, tonight's outlook marked as a test). It never marks the alert or counts toward the daily alert emails. 429 after three in an hour; 409 while email to the account's address is on hold; 503 before NOAA's data arrives.

ParameterTypeDescription
id
required
string
in path
The alert's id.
curl -X POST -H "Authorization: Bearer smk_..." \
  "https://sunandmoon.com/api/v1/aurora/alerts/k3d9x2p7qa/test"

Caching: Never. · Schema: TestAuroraAlert in OpenAPI

Daily sky brief

Your account's daily sky brief, the same as on /tonight/email: the places it gets tonight's sky for by email at 4 PM local time, starting, renaming, pausing and stopping them, and today's brief sent now. These act for the key's account and email only its own address, so they need a key; they count toward its limits like any call. GET /api/v1/tonight/brief gives the brief itself as JSON, without a key.

GET /api/v1/tonight/email Needs a key

Your daily sky briefs

Every place the key's account gets the brief for, oldest first: its place, when it goes out (sendAt, HH:mm local, and the zone as people know it), the local date it last went (lastSent), whether it is paused, and when the next is due (nextSend; up to three hours in the past while it is going out, null while paused), the sign-up page for the place, and today's brief as JSON. Also the account's limit, and whether email to its address is getting through (email.briefsHeld is true while it bounces or was reported as spam: no brief goes out until that is fixed on /account).

curl -H "Authorization: Bearer smk_..." \
  "https://sunandmoon.com/api/v1/tonight/email"

Caching: Never. · Schema: ListSkyBriefs in OpenAPI

POST /api/v1/tonight/email Needs a key

Start the daily brief for a place

The key's account gets tonight's sky for the place by email every day at 4 PM there, from the next 4 PM (today if it is earlier there, else tomorrow; see nextSend). latitude and longitude are required; timeZone and name default to the nearest listed place's (as /api/v1/places/at gives them). The place is kept to 0.01°. 201 with the brief and its address in Location. One brief per place: 409 when the account already gets the brief within 10 km in the same time zone, or under the same name (the problem's existing names it, and Location points to it), or for as many places as it may.

curl -X POST -H "Authorization: Bearer smk_..." -H "Content-Type: application/json" \
  -d '{"latitude": 47.61, "longitude": -122.33, "timeZone": "America/Los_Angeles", "name": "Seattle"}' \
  "https://sunandmoon.com/api/v1/tonight/email"

Caching: Never. · Schema: StartSkyBrief in OpenAPI

GET /api/v1/tonight/email/{id} Needs a key

One daily sky brief

The brief as the list gives it.

ParameterTypeDescription
id
required
string
in path
The brief's id.
curl -H "Authorization: Bearer smk_..." \
  "https://sunandmoon.com/api/v1/tonight/email/q7m2k9x4ta8w3e1z"

Caching: Never. · Schema: GetSkyBrief in OpenAPI

PATCH /api/v1/tonight/email/{id} Needs a key

Rename, pause or resume a daily brief

Changes only the fields sent: name is what the brief and its email call the place (1 to 80 characters); paused true stops the daily email until it is set back to false (nextSend is null meanwhile). The place itself cannot move: stop the brief and start one for the other place.

ParameterTypeDescription
id
required
string
in path
The brief's id.
curl -X PATCH -H "Authorization: Bearer smk_..." -H "Content-Type: application/json" \
  -d '{"name": "Home", "paused": true}' \
  "https://sunandmoon.com/api/v1/tonight/email/q7m2k9x4ta8w3e1z"

Caching: Never. · Schema: ChangeSkyBrief in OpenAPI

DELETE /api/v1/tonight/email/{id} Needs a key

Stop a daily brief

Stops it for good, as its email's Unsubscribe button does. 204, or 404 when there is no such brief.

ParameterTypeDescription
id
required
string
in path
The brief's id.
curl -X DELETE -H "Authorization: Bearer smk_..." \
  "https://sunandmoon.com/api/v1/tonight/email/q7m2k9x4ta8w3e1z"

Caching: Never.

POST /api/v1/tonight/email/{id}/send Needs a key

Send today's brief now

Emails today's brief for the brief's place to the account now, without waiting for 4 PM: the same email, with its Unsubscribe button. It does not count as the day's brief. 429 after 3 a day to one address (with the site's Send it now) or 6 an hour from one network; 409 while email to the account's address is on hold.

ParameterTypeDescription
id
required
string
in path
The brief's id.
curl -X POST -H "Authorization: Bearer smk_..." \
  "https://sunandmoon.com/api/v1/tonight/email/q7m2k9x4ta8w3e1z/send"

Caching: Never. · Schema: SendSkyBrief in OpenAPI

POST /api/v1/tonight/email/send Needs a key

Send today's brief for any place now

Send it now, as on /tonight/email: emails today's brief for a place to the account once, right away. When the account gets the brief for that place, the email is that brief (brief names it); otherwise it is a one-off that signs nothing up (brief is null). The place as for starting a brief. Only to the key's own account: the API never emails other addresses. Limits and errors as for sending a brief.

curl -X POST -H "Authorization: Bearer smk_..." -H "Content-Type: application/json" \
  -d '{"latitude": 64.84, "longitude": -147.72, "name": "Fairbanks"}' \
  "https://sunandmoon.com/api/v1/tonight/email/send"

Caching: Never. · Schema: SendSkyBriefNow in OpenAPI

Facts and history

The site's written content as data: fact sheets, famous moonlit nights, the Apollo missions and every mission to the Moon since, with sources.

GET /api/v1/facts

The fact sheets

Each sheet's slug, edition (grown-ups or kids), title, summary, page and how many facts it holds.

Try it: /api/v1/facts

Caching: A day: the data changes only with a deployment. · Schema: ListFacts in OpenAPI

GET /api/v1/facts/{slug}

A fact sheet

Forty facts about the Sun or the Moon in chapters, with numbered references (grown-ups) or sources (kids).

ParameterTypeDescription
slug
required
string
in path
sun or moon.
edition string grown-ups (default) or kids.
units string metric (default) or imperial, for distances and temperatures in the text.

Try it: /api/v1/facts/moon

Caching: A day: the data changes only with a deployment. · Schema: GetFacts in OpenAPI

GET /api/v1/moonlit-history

Famous nights and the Moon above them

Thirty-nine nights from 413 BC to 2024: what happened, what the Moon was doing, and the Moon computed for the place and hour (phase, position, rise and set, any eclipse), with references.

ParameterTypeDescription
units string metric (default) or imperial, for distances and temperatures in the text.

Try it: /api/v1/moonlit-history

Caching: A day: the data changes only with a deployment. · Schema: GetMoonlitHistory in OpenAPI

GET /api/v1/apollo

The Apollo lunar missions

Apollo 11 to 17: landing site (selenographic coordinates; Apollo 13's planned site), crew, key times in UTC, durations, moonwalks and samples.

Try it: /api/v1/apollo

Caching: A day: the data changes only with a deployment. · Schema: ListApolloMissions in OpenAPI

GET /api/v1/apollo/{number}

One Apollo mission in full

The mission with its 100-odd sourced facts by category, NASA photographs on this site and the sources.

ParameterTypeDescription
number
required
integer
in path
11 to 17.
units string metric (default) or imperial, for distances and temperatures in the text.

Try it: /api/v1/apollo/11

Caching: A day: the data changes only with a deployment. · Schema: GetApolloMission in OpenAPI

GET /api/v1/moon-missions/crewed

Crewed flights to the Moon

Artemis II's crew and flight, the distance records, the crewed missions to come and plans that never flew, and everyone who has gone to the Moon and who walked on it, with references.

ParameterTypeDescription
units string metric (default) or imperial, for distances and temperatures in the text.

Try it: /api/v1/moon-missions/crewed

Caching: A day: the data changes only with a deployment. · Schema: GetCrewedMoonMissions in OpenAPI

GET /api/v1/moon-missions/uncrewed

Robotic missions to the Moon

Every robotic mission to the Moon by era: who flew it, what kind it was, how it went, its dates and summary, its marks on the site's Moon maps, and the missions coming next, with references.

ParameterTypeDescription
units string metric (default) or imperial, for distances and temperatures in the text.

Try it: /api/v1/moon-missions/uncrewed

Caching: A day: the data changes only with a deployment. · Schema: GetUncrewedMoonMissions in OpenAPI

GET /api/v1/apollo/kids

The Apollo story for kids

The storybook's pages: text, a fact card and NASA photos, with references.

ParameterTypeDescription
units string metric (default) or imperial, for distances and temperatures in the text.

Try it: /api/v1/apollo/kids

Caching: A day: the data changes only with a deployment. · Schema: GetKidsApollo in OpenAPI

Accuracy

How the site's numbers compared last night with the US Naval Observatory, NOAA's tide predictions, NASA JPL Horizons and California's grunion schedule: every row, and a line per night before (ADR 0061). The same data as /accuracy.

GET /api/v1/accuracy

Last night's comparison with MET Norway, NOAA and JPL

The latest nightly run: its UTC date and spot date, then each reference (status ok, failed with its last good comparison and the date it was made, or off with the reason) and its groups. A group has its unit (s, min, mm or arcsec), its test in a sentence, how many rows were compared, agree, are exact, missing or extra, the median, 95th percentile and largest absolute difference, and every row: place, event, the place's time zone, the instant, ours and theirs as the page shows them, the difference (ours minus theirs; against MET Norway, which prints the minute a time falls in, ours minus the middle of that minute) and whether it agrees, with a note. history has one line per night (up to 400) with each group's counts and largest difference. latest is null until the first run.

Try it: /api/v1/accuracy

Caching: Ten minutes. · Schema: GetAccuracy in OpenAPI

Used by the site's pages

Files the pages load. They work, but their format follows the pages and may change without notice.

GET /api/v1/dark-sky/data/{name}

Dark skies page data

Files the /dark-skies page draws from.

ParameterTypeDescription
name
required
string
in path
File name.

Try it: /api/v1/dark-sky/data/meta?v=2025

Caching: Immutable with ?v.

GET /api/v1/dark-sky/tiles/{tile}

Dark skies map tiles

The 10° tiles the /dark-skies page's maps read.

ParameterTypeDescription
tile
required
string
in path
Tile name, e.g. h05v04.

Try it: /api/v1/dark-sky/tiles/h05v04?v=2025

Caching: Immutable with ?v.

GET /api/v1/sdo

NASA SDO's latest images

The /solar-observer page's SDO channels and the newest image the server has of each (it fetches none for this call).

Try it: /api/v1/sdo

Caching: Live data: up to a minute. · Schema: GetSdoChannels in OpenAPI

GET /api/v1/sdo/{channel}

One SDO channel's newest image

Fetches the channel's image first when the server has none.

ParameterTypeDescription
channel
required
string
in path
HMIIC, HMIB, 1700, 1600, 0304, 0171, 0193, 0211, 0335, 0094 or 0131.

Try it: /api/v1/sdo/HMIIC

Caching: Live data: up to a minute. · Schema: GetSdoChannel in OpenAPI

GET /api/v1/openapi.json

This API as OpenAPI 3.1

The machine-readable description of every endpoint above.

Try it: /api/v1/openapi.json

Caching: An hour.

Data sources and credit

Please credit Sun & Moon (sunandmoon.com) where you show the data, and the sources below where their data appears.

  • Sun and Moon: NASA JPL's DE440 and DE440s ephemerides, Earth orientation from the IERS, reductions with ERFA (IAU SOFA algorithms).
  • Compass bearings: NOAA and BGS's World Magnetic Model.
  • Weather: ECMWF's IFS model ("Based on data and products of the European Centre for Medium-Range Weather Forecasts (ECMWF)", CC BY 4.0), or where it has none DWD's ICON model ("Datenbasis: Deutscher Wetterdienst", CC BY 4.0) or NOAA's GFS (CC0), averaged or rounded into 0.25° cells. Each answer's attribution names the one used; show it with the data, and do not present GFS values as original NOAA data. The site's own pages show OpenWeather forecasts for the hours it covers, which its license keeps there, and these models' hours after them.
  • Space weather and aurora: NOAA Space Weather Prediction Center; NASA DONKI; Kp history from GFZ Potsdam, CC BY 4.0; magnetic coordinates AACGM-v2.
  • Dark skies: NASA Black Marble night lights.
  • Places: GeoNames, CC BY 4.0. Country outlines: Natural Earth. Without lat and lon, API clients are not placed by their IP address: MaxMind's GeoLite license keeps its IP locations on the site's own pages.
  • Streets (/api/v1/city-henge and /streets): © OpenStreetMap contributors, under the ODbL. Credit OpenStreetMap, and street data you share keeps the ODbL; each response carries its attribution and license.
  • Tides: NOAA CO-OPS (public domain), TICON-3 (CC BY 4.0) and EOT20 (CC BY 4.0); each response carries its attribution.
  • Skyline and terrain (terrain=1, /api/v1/skyline): Copernicus WorldDEM-30 © DLR e.V. 2010-2014 and © Airbus Defence and Space GmbH 2014-2018, provided under COPERNICUS by the European Union and ESA; all rights reserved. Show this notice where you show the data.
  • Facts, nights and missions: each item carries its own references.

Fair use and versions

Using the API means agreeing to the terms of use; the privacy policy says what we keep about API calls and keys.

  • The API is a personal project's, free and provided as is, with no guarantees: its answers can be wrong, misleading, incomplete or out of date, and it can change or stop. Check anything that matters, and do not build navigation or anything safety-critical on it (terms, sections 2 and 8).
  • Cache what you can, and keep to one request at a time for bulk work; a calendar for a year is better asked for once and kept.
  • Limits may change. A key used to get around them, or one that slows the site for others, may be revoked.
  • /api/v1 keeps its fields and meanings. Changes that would break clients go to /api/v2; additions come to v1 as they are made.

Questions get a written answer from Claude Haiku, an AI model, using the site's own calculations. Check times that matter on the linked page. Privacy