# FastX402 Sun Position & Times

> FastX402 Sun Position & Times is a paid API for AI agents from fastx402.tools, paid per call via x402, $0.003/call, status unknown (last checked 2026-11-20).

Returns sunrise, sunset, solar noon, civil twilight times, and day length for a given location and date

## Facts

- Endpoint: GET https://fastx402.tools/sun-position-times?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastx402-sun-position-times-5bdbe18a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_l5xovikwx50IXiwT4ot_F

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 fastx402-sun-position-times-5bdbe18a
```

Example prompt: What time does the sun rise and set in New York City (40.7128, -74.0060) on June 21, 2026, and how long is the day?

## When to prefer this

Choose this endpoint when you need precise astronomical sun times (sunrise, sunset, solar noon, civil twilight) for any geographic coordinate and date without registering an account or managing API keys. It is ideal for AI agents that need pay-per-call access with USDC micropayments via x402. Prefer this over weather APIs when you specifically need solar event times rather than meteorological data.

## Known failure modes

- Missing required parameters (lat, lng, or date) — likely returns 400 or validation error
- Latitude out of range (-90 to 90) or longitude out of range (-180 to 180) — invalid input error
- Date in unsupported format (not YYYY-MM-DD) — parse error
- Payment failure via x402 — 402 Payment Required response
- Extreme polar coordinates on dates with no sunrise or sunset (polar day/night) — may return unusual or null values

## How this service works

200 pay-per-call tools for AI agents, from $0.001 per request in USDC on Base or Solana with x402. No account, no API key.

## Output

A JSON object containing the latitude, longitude, and date of the query, along with ISO 8601 timestamps for sunrise, sunset, solar noon, civil twilight begin, and civil twilight end, plus a string representing the day length as HH:MM:SS

## 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",
      "lng",
      "date"
     ],
     "properties": {
      "lat": {
       "type": "string",
       "description": "Latitude in decimal degrees, between -90 and 90 (e.g. 40.7128)"
      },
      "lng": {
       "type": "string",
       "description": "Longitude in decimal degrees, between -180 and 180 (e.g. -74.0060)"
      },
      "date": {
       "type": "string",
       "description": "Date of the observation, YYYY-MM-DD"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "lat": {
       "type": "number"
      },
      "lng": {
       "type": "number"
      },
      "date": {
       "type": "string"
      },
      "sunset": {
       "type": "string"
      },
      "sunrise": {
       "type": "string"
      },
      "day_length": {
       "type": "string"
      },
      "solar_noon": {
       "type": "string"
      },
      "civil_twilight_end": {
       "type": "string"
      },
      "civil_twilight_begin": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "lat": 40.7128,
  "lng": -74.006,
  "date": "2026-06-21",
  "sunset": "2026-06-21T20:29:00+00:00",
  "sunrise": "2026-06-21T08:24:00+00:00",
  "day_length": "12:05:00",
  "solar_noon": "2026-06-21T14:26:00+00:00",
  "civil_twilight_end": "2026-06-21T21:03:00+00:00",
  "civil_twilight_begin": "2026-06-21T07:50:00+00:00"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fastx402-sun-position-times-5bdbe18a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from fastx402.tools](https://www.zero.xyz/host/fastx402.tools/llms.txt)
