# Sun Position & Solar Event Calculator

> Sun Position & Solar Event Calculator is a paid API for AI agents from astro.openverbs.com, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-14).

Calculates sun position, sunrise, sunset, and other solar events for a given geographic location and date

## Facts

- Endpoint: POST https://astro.openverbs.com/v1/sun
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/sun-position-solar-event-calculator-c9f12628
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Xt3FIsLje9IZRIyLuBsZQ

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability sun-position-solar-event-calculator-c9f12628 -d '<json body>'
```

Example prompt: What time does the sun rise and set at latitude 40.7128, longitude -74.0060 on June 21, 2025?

## When to prefer this

Use this endpoint when you need precise solar event calculations (sunrise, sunset, solar noon) for a specific geographic coordinate and date. Ideal for applications in agriculture, photography planning, event scheduling, navigation, or any use case requiring accurate daylight information. Prefer this over general weather APIs that only approximate sunrise/sunset times, especially when exact timing and full solar position data are needed.

## Known failure modes

- Invalid latitude (outside -90 to 90) or longitude (outside -180 to 180) returns validation error
- Invalid date components (e.g. month 13, day 32) return validation error
- Payment failure or insufficient funds returns 402 error
- Missing required fields (lat, lon, year, month, day) returns 400 error
- Extreme edge cases like polar regions during midnight sun or polar night may return unusual values

## How this service works

Compute sunrise, sunset, solar noon and day length for a latitude/longitude (east-positive) and date, using the NOAA sunrise equation. All times are UTC ISO-8601. Locations in polar day or night return null rise/set with a `polar` flag — a successful result, not an error.

## Output

Returns solar event data for the specified location and date, including sunrise time, sunset time, solar noon, day length, and potentially sun azimuth/altitude data, all computed for the exact latitude/longitude coordinates provided.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "lat",
      "lon",
      "year",
      "month",
      "day"
     ],
     "properties": {
      "day": {
       "type": "integer",
       "maximum": 31,
       "minimum": 1
      },
      "lat": {
       "type": "number",
       "maximum": 90,
       "minimum": -90,
       "description": "Latitude (north-positive)."
      },
      "lon": {
       "type": "number",
       "maximum": 180,
       "minimum": -180,
       "description": "Longitude (east-positive)."
      },
      "year": {
       "type": "integer",
       "maximum": 9999,
       "minimum": 1
      },
      "month": {
       "type": "integer",
       "maximum": 12,
       "minimum": 1
      }
     },
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/sun-position-solar-event-calculator-c9f12628/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from astro.openverbs.com](https://www.zero.xyz/host/astro.openverbs.com/llms.txt)
