# Saylor Innovations Sunrise, Sunset, Twilight & Moon Phase API

> Saylor Innovations Sunrise, Sunset, Twilight & Moon Phase API is a paid API for AI agents from saylorinnovations.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-01).

Returns sunrise, sunset, solar noon, day length, civil/nautical/astronomical twilight times, moon phase, illumination percentage, and next full/new moon dates for any geographic coordinates and date.

## Facts

- Endpoint: GET https://saylorinnovations.com/api/sun/times?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/saylor-innovations-sunrise-sunset-twilight-moon-phase-api-be2ecac2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_GxJ9DFh-SkelvZJB9-Ow0

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 saylor-innovations-sunrise-sunset-twilight-moon-phase-api-be2ecac2
```

Example prompt: What time is sunrise, sunset, and civil twilight at coordinates 48.8566° N, 2.3522° E (Paris) on July 14, 2025, and what's the moon phase that night?

## When to prefer this

Choose this endpoint when you need precise solar event times (sunrise, sunset, twilight windows) or lunar data (phase, illumination, upcoming full/new moon) for any arbitrary coordinates and date. It handles edge cases like polar day and polar night, making it more robust than many alternatives. Ideal for photography planning, outdoor activity scheduling, navigation, religious observance timing, and any geospatial or astronomical application.

## Known failure modes

- Missing required lat/lon parameters returns an error
- Invalid coordinate values (out of range) may return an error or unexpected results
- Date format issues may cause computation failure
- Polar locations may return null for sunrise/sunset when polar day or polar night applies — this is expected behavior, not a bug

## How this service works

Sunrise, Sunset, Twilight & Moon Phase for Any Place/Date — Science

## Output

A JSON object with two top-level keys: 'sun' containing sunrise, sunset, solar noon, day length, and civil/nautical/astronomical twilight start and end times for the given coordinates and date (including polar day/night handling); and 'moon' containing the current moon phase name, illumination percentage, and dates of the next full and new moon.

## 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",
      "POST",
      "PUT",
      "PATCH",
      "DELETE",
      "HEAD"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "lat": {
       "type": "string",
       "description": "latitude (query)"
      },
      "lon": {
       "type": "string",
       "description": "longitude (query)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "json"
    },
    "example": {
     "type": "object",
     "required": [
      "sun",
      "moon"
     ],
     "properties": {
      "sun": {
       "type": "object"
      },
      "moon": {
       "type": "object"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/saylor-innovations-sunrise-sunset-twilight-moon-phase-api-be2ecac2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from saylorinnovations.com](https://www.zero.xyz/host/saylorinnovations.com/llms.txt)
