# Agent Data Tools: Sunrise & Sunset Times

> Agent Data Tools: Sunrise & Sunset Times is a paid API for AI agents from agent-data-tools.revmesh2074.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-29).

Returns sunrise, sunset, civil dawn/dusk, solar noon, and day length for a given geographic coordinate and optional date

## Facts

- Endpoint: GET https://agent-data-tools.revmesh2074.workers.dev/sun?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-data-tools-sunrise-sunset-times-6304c73c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_wn-EIvuqujrpxDdQi7kOb

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 agent-data-tools-sunrise-sunset-times-6304c73c
```

Example prompt: What time does the sun rise and set at latitude 35.6895, longitude 139.6917 on December 21, 2026? Also give me the civil dawn and dusk times and total day length.

## When to prefer this

Choose this endpoint when you need precise solar event times (sunrise, sunset, civil dawn/dusk, solar noon) for any coordinate on Earth, especially when you want pay-per-call access with no API key or account setup. Prefer it over weather APIs when solar timing data is the primary need, or when building autonomous agent workflows that require programmatic access to daylight information.

## Known failure modes

- Missing required lat or lon parameters returns an error
- Latitude out of range (-90 to 90) or longitude out of range (-180 to 180) causes a validation error
- Invalid date string format may cause a parse error or default to today
- Payment failure via x402 results in no charge and no response
- Extreme polar coordinates may return a polar flag with null sunrise/sunset

## How this service works

Sunrise, sunset, solar noon, civil dawn and dusk (UTC) and day length for any place and date, computed with the standard solar equations; handles polar day and night. No outside service. Use for photography, events and outdoor planning.

## Output

A JSON object containing the date, UTC timestamps for sunrise, sunset, civil dawn, civil dusk, and solar noon, a dayLengthMinutes number indicating total daylight, and a polar field (null if normal day, otherwise indicating polar day or polar night).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "lat",
  "lon"
 ],
 "properties": {
  "lat": {
   "type": "number",
   "description": "Latitude (-90 to 90)"
  },
  "lon": {
   "type": "number",
   "description": "Longitude (-180 to 180)"
  },
  "date": {
   "type": "string",
   "description": "Date (default today)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "date": {
   "type": "string"
  },
  "polar": {},
  "sunset": {
   "type": "string"
  },
  "sunrise": {
   "type": "string"
  },
  "civilDawn": {
   "type": "string"
  },
  "civilDusk": {
   "type": "string"
  },
  "solarNoon": {
   "type": "string"
  },
  "dayLengthMinutes": {
   "type": "number"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-data-tools-sunrise-sunset-times-6304c73c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-data-tools.revmesh2074.workers.dev](https://www.zero.xyz/host/agent-data-tools.revmesh2074.workers.dev/llms.txt)
