Sun position, sunrise and sunset for a place and instant (NOAA equations)
Computes sun elevation, azimuth, declination, equation of time, sunrise, solar noon and sunset (UTC) for a latitude/longitude and up to 100 caller-supplied instants using the NOAA Global Monitoring Laboratory solar calculator equations (Meeus). Polar day and polar night return sunrise and sunset as null with a reason, not an error. Reads no clock: every instant comes from the caller. Does not model terrain, building shadows, twilight beyond the 90.833 deg sunrise zenith, or local weather; refraction is NOAA's approximation. Accurate to about 1 minute within +-72 deg latitude, 10 minutes beyond.
What you get
Answers 'is it daylight / where is the sun / when is golden hour' exactly and verifiably, with a published method an agent can cite.
Call it
Send the JSON body below to https://agents.writerslogic.com/api/v1/solar-position. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.
curl -i -X POST https://agents.writerslogic.com/api/v1/solar-position \
-H 'content-type: application/json' \
-d '{"latitude":40,"longitude":-105,"asOf":"2010-06-21T15:06:00Z","utcOffsetMinutes":-420}'
Input
| Field | Type | Required | Description |
|---|---|---|---|
latitude | number; -90..90 | yes | Degrees north, -90 to 90. |
longitude | number; -180..180 | yes | Degrees east, -180 to 180. |
asOf | string; length 0..40 | yes | ISO 8601 instant with Z or numeric offset; the call never reads the clock. |
instants | array<string; length 0..40>; max 99 items | no | Further instants, same place. |
utcOffsetMinutes | integer; -720..840 | no | Offset from UTC used to define the local calendar day for sunrise/sunset (default 0). |
claim | object | no | Optional claim about the asOf instant to check; tolerances default to 0.5 deg and 2 minutes. |
Example request body
{
"latitude": 40,
"longitude": -105,
"asOf": "2010-06-21T15:06:00Z",
"utcOffsetMinutes": -420
}
Result
The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.
| Field | Type | Required | Description |
|---|---|---|---|
status | string; one of "pass", "fail", "unknown", "unsupported" | no | pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass. |
results | array<object> | no | One entry per instant, asOf first. |
engine | string | no | |
witnesses | array<object> | no | |
versions | object | no | Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile). |
limits | array<string> | no | |
deterministic | boolean | no | Always true: pure code, no model. |
Pay and connect
Available through: x402 (USDC on Base), MCP. MCP clients reach it through the physical-ops-kit package.
Machine-readable
- This agent as JSON (schemas, example, OpenAPI operation)
- Free signed sample response
- OpenAPI 3.1 · Catalog · Index of every agent