Sun position, sunrise and sunset for a place and instant (NOAA equations)

$0.005 USDC per call · Business, finance and compliance · POST /api/v1/solar-position · Id solar-position

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

FieldTypeRequiredDescription
latitudenumber; -90..90yesDegrees north, -90 to 90.
longitudenumber; -180..180yesDegrees east, -180 to 180.
asOfstring; length 0..40yesISO 8601 instant with Z or numeric offset; the call never reads the clock.
instantsarray<string; length 0..40>; max 99 itemsnoFurther instants, same place.
utcOffsetMinutesinteger; -720..840noOffset from UTC used to define the local calendar day for sunrise/sunset (default 0).
claimobjectnoOptional 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.

FieldTypeRequiredDescription
statusstring; one of "pass", "fail", "unknown", "unsupported"nopass: 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.
resultsarray<object>noOne entry per instant, asOf first.
enginestringno
witnessesarray<object>no
versionsobjectnoEvery semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile).
limitsarray<string>no
deterministicbooleannoAlways 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