# US Naval Observatory Astronomy Times

> US Naval Observatory Astronomy Times is a paid API for AI agents from time.memoryapi.org, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Returns sunrise, sunset, twilight, moonrise, and moonset times for any geographic location, sourced from the US Naval Observatory.

## Facts

- Endpoint: GET https://time.memoryapi.org/x402/time/astronomy
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/time-memoryapi-org-383d536d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_frDf3T8qRgv3Qj7uZSNWq

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 time-memoryapi-org-383d536d
```

Example prompt: What time does the sun rise and set, and when does the moon rise and set, in Denver, Colorado on July 4th?

## When to prefer this

Use this endpoint when you need precise, authoritative sunrise, sunset, twilight, moonrise, or moonset times for any global location on a specific date. Prefer this over generic weather APIs when authoritative USNO-sourced astronomical timing data is required for photography planning, outdoor scheduling, navigation, or scientific purposes.

## Known failure modes

- Invalid or missing location coordinates return an error
- Unsupported date ranges may return no data
- Network timeout or service unavailability returns a 5xx error
- Malformed request parameters return a 4xx validation error

## How this service works

Time, astronomy, and moon phase data via x402 micropayments. Powered by TimeAPI.io and US Naval Observatory.

## Output

Returns sunrise, sunset, and twilight times along with moonrise and moonset times for the specified location and date, sourced from US Naval Observatory calculations.

## Example request

```json
{
 "tz": -6,
 "lat": 39.7392,
 "lon": -104.9903,
 "date": "2024-07-04"
}
```

## Response schema (JSON Schema)

```json
{
 "example": {
  "sun": {
   "set": "20:01",
   "rise": "05:55",
   "transit": "12:58",
   "civil_twilight_end": "20:28",
   "civil_twilight_begin": "05:28"
  },
  "date": "2025-05-29",
  "moon": {
   "set": "14:47",
   "rise": "03:12"
  },
  "source": "US Naval Observatory",
  "success": true,
  "location": {
   "lat": 40.7128,
   "lon": -74.006
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/time-memoryapi-org-383d536d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from time.memoryapi.org](https://www.zero.xyz/host/time.memoryapi.org/llms.txt)
