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).
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
| Caller | Per minute | Per day (UTC) | Counted by |
| No key | 30 | 1,000 | IP address |
| Free key | 60 | 10,000 | Account, all its keys together |
Every response says where you stand:
RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset | The minute's allowance, what is left and the seconds until it resets. |
X-Quota-Limit, X-Quota-Remaining, X-Quota-Reset | The same for the day; it resets at midnight UTC. |
X-Api-Plan | keyless or your plan, e.g. free. |
Retry-After | On 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." ] } }
400 | A parameter is missing or out of range. |
401 | The key is unknown or revoked. |
404 | No such eclipse, place, mission or sheet; for dark skies, no land at that point. |
429 | Over the minute's or the day's limit. Wait Retry-After seconds. |
503 | Live data has not arrived yet, or a larger ephemeris is loading. Try again shortly. |
Reference
Every endpoint is a GET. The links run the example in your browser, without a key.
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).
| Parameter | Type | Description |
lat |
number |
Latitude in degrees, north positive (−90 to 90). With lon; without both, the caller's own location (from the IP address) is used. |
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. Default: today at the place. |
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/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.
| Parameter | Type | Description |
lat |
number |
Latitude in degrees, north positive (−90 to 90). With lon; without both, the caller's own location (from the IP address) is used. |
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.
| Parameter | Type | Description |
lat |
number |
Latitude in degrees, north positive (−90 to 90). With lon; without both, the caller's own location (from the IP address) is used. |
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. 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.
| Parameter | Type | Description |
month required |
string |
YYYY-MM. |
tz |
string |
IANA time zone for the days. 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/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 where the server has a forecast (withClouds). The peak with its WHO category, the stretches needing protection (UV 3 or more) and every 10-minute sample.
| Parameter | Type | Description |
lat |
number |
Latitude in degrees, north positive (−90 to 90). With lon; without both, the caller's own location (from the IP address) is used. |
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. 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
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 cloud forecast the server has. Times are Unix seconds; series are sampled every step seconds from start.
| Parameter | Type | Description |
lat |
number |
Latitude in degrees, north positive (−90 to 90). With lon; without both, the caller's own location (from the IP address) is used. |
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/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/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.
| Parameter | Type | Description |
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.
| Parameter | Type | Description |
lat |
number |
Latitude in degrees, north positive (−90 to 90). With lon; without both, the caller's own location (from the IP address) is used. |
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
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.
| Parameter | Type | Description |
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.
| Parameter | Type | Description |
lat |
number |
Latitude in degrees, north positive (−90 to 90). With lon; without both, the caller's own location (from the IP address) is used. |
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.
| Parameter | Type | Description |
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; without both, the caller's own location (from the IP address) is used. |
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
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 and the Moon. Clouds are not included: ask /api/v1/weather.
| Parameter | Type | Description |
lat |
number |
Latitude in degrees, north positive (−90 to 90). With lon; without both, the caller's own location (from the IP address) is used. |
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/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/aurora/sources
The aurora pages' references
Every source the aurora pages cite, in list order.
Try it: /api/v1/aurora/sources
Caching: A day: the data changes only with a deployment. · Schema: GetAuroraSources 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/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.
| Parameter | Type | Description |
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
The cloud forecast the sky panorama draws, and recorded weather of the last week.
GET
/api/v1/weather
Cloud cover and conditions
OpenWeather's forecast for the 0.25° cell around the point, as the sky panorama uses it: each value's time (Unix ms), cloud cover (percent) and condition code. With from and to, also the recorded weather of that range, up to 7 days back. API calls return what the server already has: they never make it buy a forecast, so status may be unavailable for places nobody has looked at lately. Credit OpenWeather (CC BY-SA 4.0).
| Parameter | Type | Description |
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. |
Try it: /api/v1/weather?lat=47.61&lon=-122.33
Caching: Until the forecast is due for refreshing; past ranges an hour. · 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 network address), the IP address used and the country that address alone places them in.
Try it: /api/v1/location
Caching: Never. · Schema: GetLocation 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.
| Parameter | Type | Description |
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/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).
| Parameter | Type | Description |
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.
| Parameter | Type | Description |
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
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).
| Parameter | Type | Description |
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.
| Parameter | Type | Description |
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.
| Parameter | Type | Description |
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.
| Parameter | Type | Description |
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.
| Parameter | Type | Description |
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.
| Parameter | Type | Description |
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
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.
| Parameter | Type | Description |
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.
| Parameter | Type | Description |
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/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.
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.
- 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.