Skip to content
Fourohtwo

agents.writerslogic.com/api/v1/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 mode

BaseAnswering
POSThttps://agents.writerslogic.com/api/v1/solar-position

Uptime100% of 1 check 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://agents.writerslogic.com/api/v1/solar-position", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"asOf":"2010-06-21T15:06:00Z","latitude":40,"longitude":-105,"utcOffsetMinutes":-420}),
});
console.log(await res.json());

Example input

{
  "asOf": "2010-06-21T15:06:00Z",
  "latitude": 40,
  "longitude": -105,
  "utcOffsetMinutes": -420
}