# Sun Times (Sunrise/Sunset) API

> Sun Times (Sunrise/Sunset) API is a paid API for AI agents from anibalb.duckdns.org, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-31).

Returns sunrise, sunset, solar noon, and day length for today at the server's default location, paid per call in USDC via x402.

## Facts

- Endpoint: GET https://anibalb.duckdns.org/x402/sun-times?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/sun-times-sunrise-sunset-api-8701907f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_3GH5YdF9nmZJ4KgzhFpR-

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-times-sunrise-sunset-api-8701907f
```

Example prompt: What time is sunrise and sunset today, and how long is the day in total?

## When to prefer this

Choose this endpoint when you need quick, no-account-required solar time lookups paid per call in USDC via x402, and do not need to specify a custom latitude/longitude (endpoint uses a default location). Ideal for lightweight agents that need ephemeris data without API key management.

## Known failure modes

- Payment not provided or insufficient USDC — returns 402 Payment Required
- Network unreachability to duckdns.org host — connection timeout
- Server-side solar computation error — may return 500
- No query parameters accepted; passing unexpected params may be silently ignored or error

## How this service works

Public data and utility APIs paid per call in USDC on Base (x402). No accounts, no API keys. 174 routes: crypto/equity data, onchain reads, DNS/email/security intel, geo/weather, x402 payment diagnostics, dev utilities and more.

## Output

A JSON object containing ISO 8601 timestamps for sunrise, sunset, and solar noon, plus the total day length in seconds (e.g. {"sunrise":"2026-10-26T06:35:27+00:00","sunset":"2026-10-26T17:27:50+00:00","solar_noon":"2026-10-26T12:01:38+00:00","day_length_s":39143}).

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "sunset": "2026-10-26T17:27:50+00:00",
  "sunrise": "2026-10-26T06:35:27+00:00",
  "solar_noon": "2026-10-26T12:01:38+00:00",
  "day_length_s": 39143
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/sun-times-sunrise-sunset-api-8701907f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from anibalb.duckdns.org](https://www.zero.xyz/host/anibalb.duckdns.org/llms.txt)
