Almanac API
Retrieve a full-year solar almanac for any location.
GET /solar/almanac
Returns solstices, equinoxes, solar noon drift, and day-length data for the requested year.
Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
lat | ✅ | float | Latitude |
lng | ✅ | float | Longitude |
year | No | int | Year (default: current year) |
Example
Response
{
"latitude": 51.5074,
"longitude": -0.1278,
"year": 2026,
"solstices": {
"summer": {"utc": "2026-06-21T10:24:00Z", "solar_noon": "13:02", "day_length_h": 16.7},
"winter": {"utc": "2026-12-21T20:50:00Z", "solar_noon": "11:58", "day_length_h": 7.8}
},
"equinoxes": {
"spring": {"utc": "2026-03-20T14:45:00Z", "solar_noon": "12:04", "day_length_h": 12.1},
"autumn": {"utc": "2026-09-22T20:05:00Z", "solar_noon": "12:09", "day_length_h": 12.1}
},
"solar_noon_extremes": {
"earliest_utc": {"date": "2026-11-03", "time": "11:44"},
"latest_utc": {"date": "2026-02-11", "time": "12:14"}
},
"civil_solar_offset_annual_mean_min": -10.3,
"days": [
{
"date": "2026-01-01",
"sunrise_utc": "08:06",
"solar_noon_utc": "12:02",
"sunset_utc": "15:58",
"day_length_h": 7.87,
"equation_of_time_min": -3.2
}
]
}
The days array contains one entry per day of the year.
Use Cases
- Agriculture: Schedule irrigation and harvest around actual solar peak
- Architecture: Calculate sun angles for passive solar design
- Health research: Annual civil-solar offset dataset for epidemiology
- iCal integration: Pair with
/solar/icalfor a full calendar feed