x402AgentsToolsHub

Sun Position

Where the sun is in the sky right now — or at any timestamp — for any coordinates: azimuth (compass bearing), elevation angle, cardinal direction, right ascension and declination, from the NOAA solar equations. Deterministic astronomy for shadow math, solar-panel orientation and photo planning.

Worked examples

Berlin at solar noon (solstice)

GET /api/v1/geo-time/sun-position?lat=52.52&lon=13.41&atIso=2026-06-21T11%3A09%3A00Z

Result: Altitude 60.9° · Azimuth 270.3° (W)

New York now

GET /api/v1/geo-time/sun-position?lat=40.71&lon=-74.01

Result: Altitude -57.7° · Azimuth 103.6° (ESE) — below horizon

Midnight Arctic (below horizon)

GET /api/v1/geo-time/sun-position?lat=69.65&lon=18.96&atIso=2026-12-21T23%3A00%3A00Z

Result: Altitude -43.7° · Azimuth 95.5° (E) — below horizon

Machine API (x402)

$0.002 / call

This 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/sun-position?lat=52.52&lon=13.41&atIso=2026-06-21T11%3A09%3A00Z HTTP/1.1
Host: agentstoolshub.com

→ 402 (payment required, instructions in headers)
→ 200 (after X-PAYMENT header; JSON body below)

{
  "tool": "geo-time/sun-position",
  "input": {"lat":52.52,"lon":13.41,"atIso":"2026-06-21T11:09:00Z"},
  "result": { "value": 60.92, "answer": "Altitude 60.9° · Azimuth 270.3° (W)" }
}

Agent docs: /llms.txt · OpenAPI spec · integration guide

About this tool

Instant sun position from the NOAA solar equations: azimuth in compass degrees, elevation above the horizon, and equatorial coordinates at any place and time. Powers shadow-length math, solar-panel tilt decisions and 'which direction was the sun in this photo' checks — exactly, not from memory.

Frequently asked questions

How accurate is it?

About 1 arcminute versus precise ephemerides — plenty for shadow and orientation work. The main correction not applied is atmospheric refraction near the horizon (~0.5°).

What does azimuth 0 mean?

Due north, increasing clockwise: 90° east, 180° south, 270° west — matching compass bearings.

Related tools