Sunrise & Sunset
Compute sunrise, sunset, solar noon, civil dawn/dusk, golden hours and day length for any latitude/longitude and date — with the exact NOAA solar equations, accurate to about a minute. Answers agents repeatedly get wrong from memory.
Worked examples
Berlin summer solstice
GET /api/v1/geo-time/sunrise-sunset?lat=52.52&lon=13.41&date=2026-06-21
Result: Sunrise 02:44:18 UTC · Sunset 19:34:24 UTC (16h 50m)
New York today
GET /api/v1/geo-time/sunrise-sunset?lat=40.71&lon=-74.01
Result: Sunrise 11:09:32 UTC · Sunset 22:15:49 UTC (11h 6m)
Tromsø in December (polar night)
GET /api/v1/geo-time/sunrise-sunset?lat=69.65&lon=18.96&date=2026-12-21
Result: 2026-12-21: polar night (sun never rises)
Machine API (x402)
$0.002 / callThis tool is also a JSON API for AI agents. Requests without payment receive 402 Payment Required plus instructions; agents pay USDC on Base via the x402 protocol — no accounts, no API keys.
GET /api/v1/geo-time/sunrise-sunset?lat=52.52&lon=13.41&date=2026-06-21 HTTP/1.1
Host: agentstoolshub.com
→ 402 (payment required, instructions in headers)
→ 200 (after X-PAYMENT header; JSON body below)
{
"tool": "geo-time/sunrise-sunset",
"input": {"lat":52.52,"lon":13.41,"date":"2026-06-21"},
"result": { "value": 1010, "answer": "Sunrise 02:44:18 UTC · Sunset 19:34:24 UTC (16h 50m)" }
}Agent docs: /llms.txt · OpenAPI spec · integration guide
About this tool
Exact sun times from the NOAA solar position equations — sunrise, sunset, solar noon, civil twilight, golden hours and total day length for any coordinates and date. Pure astronomy, no network: identical input always returns identical times (UTC). Handles polar day and night explicitly.
hour angle H = arccos((sin h − sin φ · sin δ) / (cos φ · cos δ)), h = −0.833° incl. refraction
Frequently asked questions
What timezone are the times in?
UTC — coordinates carry no timezone. Add your local UTC offset (e.g. +2 for Berlin in summer) or compute the offset for the coordinates separately.
What is 'golden hour' here?
The period when the sun's center is between −4° and +6° elevation: roughly from civil-adjacent dawn to just after sunrise, and the mirrored window before sunset.