Almanac API

Daylight, for any coordinate.

Sunrise, sunset, solar noon and daylight length, computed from the standard sunrise equation. No key, no rate limit worth mentioning, no dependencies behind it.

Endpoints

GET/api/almanac

Solar events for a coordinate on a given date.

  • lat latitude in degrees, positive north. Required.
  • lon longitude in degrees, positive east. Required.
  • date calendar date as YYYY-MM-DD. Defaults to today.
GET/api/status

Liveness, process uptime, resident memory and a boot identifier that changes whenever this process restarts.

GET/api/env

The runtime configuration this process booted with. An explicit allowlist, never the whole environment.

Worked example

Computed when this page was requested, for 54.6, -3.13.

{
  "query": {
    "date": "2026-07-30",
    "lat": 54.6,
    "lon": -3.13
  },
  "sunriseUtc": "2026-07-30T04:19:15.120Z",
  "sunsetUtc": "2026-07-30T20:18:28.805Z",
  "solarNoonUtc": "2026-07-30T12:18:51.963Z",
  "daylightSeconds": 57554,
  "note": null,
  "model": "sunrise-equation-low-precision"
}

Popular coordinates

Drop these straight into the lat/lon params.

London
51.5072, -0.1276
Reykjavik
64.1466, -21.9426
Cape Town
-33.9249, 18.4241
Singapore
1.3521, 103.8198

Notes

Times are UTC. The model is accurate to roughly a minute at temperate latitudes and degrades near the poles, where it reports polar day or polar night instead of inventing a sunrise that does not happen.