# AviationAPIs Airport Sun Times

> AviationAPIs Airport Sun Times is a paid API for AI agents from aviationapis.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-13).

Returns sunrise, sunset, solar noon, day length, and civil twilight times for a geographic coordinate and date

## Facts

- Endpoint: POST https://aviationapis.com/airport-sun-times
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/aviationapis-airport-sun-times-1f4ca33d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0teZ-spY1uvfsWCNBo33q

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 aviationapis-airport-sun-times-1f4ca33d -d '<json body>'
```

Example prompt: What are the sunrise and sunset times at SFO (latitude 37.6188, longitude -122.375) on June 2nd, 2026, including civil twilight and total daylight hours?

## When to prefer this

Choose this endpoint when you need precise solar event times (sunrise, sunset, solar noon, twilight) for any geographic coordinate, especially for aviation or outdoor planning. It is ideal when you have a lat/lon rather than a named location and need UTC-accurate sun times for a specific date. Prefer this over general weather APIs that do not provide civil twilight or solar noon data.

## Known failure modes

- Missing or invalid latitude/longitude returns an error response
- Date in wrong format (not YYYY-MM-DD) may cause a validation error
- Coordinates outside valid range (-90 to 90 lat, -180 to 180 lon) may return an error
- Payment failure via x402 protocol returns 402 status with no data
- Network timeout for remote coordinate lookups

## How this service works

Pay-per-call aviation data APIs for AI agents, settled in USDC via the x402 protocol.

## Output

A JSON object with the queried latitude, longitude, and date, plus UTC timestamps for sunrise, sunset, and solar noon, total day length in hours, and UTC timestamps for civil twilight begin and civil twilight end.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "lat": {
   "type": "number",
   "description": "Latitude in decimal degrees"
  },
  "lon": {
   "type": "number",
   "description": "Longitude in decimal degrees"
  },
  "date": {
   "type": "string",
   "description": "UTC date YYYY-MM-DD (optional; defaults to today)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "lat": 37.6188,
  "lon": -122.375,
  "date": "2026-06-02",
  "sunset": "2026-06-03T03:23:00.000Z",
  "sunrise": "2026-06-02T12:48:00.000Z",
  "solar_noon": "2026-06-02T20:05:00.000Z",
  "day_length_hours": 14.58,
  "civil_twilight_end": "2026-06-03T03:52:00.000Z",
  "civil_twilight_begin": "2026-06-02T12:19:00.000Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/aviationapis-airport-sun-times-1f4ca33d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from aviationapis.com](https://www.zero.xyz/host/aviationapis.com/llms.txt)
