# Sun, Moon and Planets – Rise/Set & Twilight Calculator

> Sun, Moon and Planets – Rise/Set & Twilight Calculator is a paid API for AI agents from sky-calc.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-11-22).

Returns sunrise, sunset, solar noon, civil/nautical/astronomical twilights, and golden/blue hour times for a given latitude, longitude, and date, including polar day/night handling.

## Facts

- Endpoint: GET https://sky-calc.x402tookit.com/rise-set-sun?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/sun-moon-and-planets-rise-set-twilight-calculator-a33d26c5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_67bQtO1c53vg7bQtcI4J8

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-moon-and-planets-rise-set-twilight-calculator-a33d26c5
```

Example prompt: What time is sunrise, sunset, solar noon, and golden hour in Denver, Colorado (latitude 39.74, longitude -104.98) on July 4th 2025, using UTC-6?

## When to prefer this

Choose this endpoint when you need precise solar event times (sunrise, sunset, twilights, golden/blue hour) for any location and date, especially when polar conditions must be handled gracefully. It is preferable to generic weather APIs that only provide basic sunrise/sunset without twilight breakdowns, and to astronomy libraries when you need a simple HTTP call without running local code.

## Known failure modes

- Invalid latitude or longitude (outside -90/90 or -180/180 range) returns an error
- Date outside supported range 1900–2100 returns an error
- Polar day or polar night condition — sun never rises or sets — returns a special verdict flag rather than times
- Missing required parameters (lat, lon, date) returns a validation error
- Extreme UTC offset values outside -12 to 14 return an error

## How this service works

Sunrise, sunset, solar noon, three twilights, golden and blue hour for a lat/lon and date; handles polar day and night.

## Output

A JSON object containing UTC and local times for sunrise, sunset, solar noon, civil dawn/dusk, nautical dawn/dusk, astronomical dawn/dusk, golden hour, and blue hour — plus a summary verdict, accuracy note, and flags for polar day or polar night conditions when applicable.

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "lat",
      "lon",
      "date"
     ],
     "properties": {
      "lat": {
       "type": "number",
       "description": "Latitude, -90 to 90 (north positive)"
      },
      "lon": {
       "type": "number",
       "description": "Longitude, -180 to 180 (east positive)"
      },
      "date": {
       "type": "string",
       "description": "Local calendar date YYYY-MM-DD, 1900 to 2100"
      },
      "utc_offset_hours": {
       "type": "number",
       "description": "Local UTC offset in hours, -12 to 14, default 0 (the date is then a UTC day)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "lat": {
       "type": [
        "null",
        "number"
       ]
      },
      "lon": {
       "type": [
        "null",
        "number"
       ]
      },
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "date": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "sunset": {
       "type": [
        "null",
        "object"
       ],
       "properties": {
        "utc": {
         "type": [
          "null",
          "string"
         ]
        },
        "local": {
         "type": [
          "null",
          "string"
         ]
        }
       }
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "sunrise": {
       "type": [
        "null",
        "object"
       ],
       "properties": {
        "utc": {
         "type": [
          "null",
          "string"
         ]
        },
        "local": {
         "type": [
          "null",
          "string"
         ]
     
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/sun-moon-and-planets-rise-set-twilight-calculator-a33d26c5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from sky-calc.x402tookit.com](https://www.zero.xyz/host/sky-calc.x402tookit.com/llms.txt)
