agent402.tools/api/sun-times
Sunrise, sunset, solar noon, day length and the civil, nautical and astronomical twilights for any point and date, plus the sun's elevation and azimuth at a given time. Computed with the NOAA solar equations; times are UTC, good to about a minute away from the poles. Says so when the sun stays up or down all day.
GET
https://agent402.tools/api/sun-timesUptime100% of 5 checks in 30 days
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
// npm install fourohtwo
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://agent402.tools/api/sun-times?date=2026-06-21&lat=40.7128&lon=-74.006&time=2026-06-21T16%3A00%3A00Z");
console.log(await res.json());Example input
{
"date": "2026-06-21",
"lat": 40.7128,
"lon": -74.006,
"time": "2026-06-21T16:00:00Z"
}