# CoCo Sun Times API

> CoCo Sun Times API is a paid API for AI agents from cocoeatsai.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-19).

Returns sunrise, sunset, dawn, dusk, solar noon, and total daylight hours for a given location and date

## Facts

- Endpoint: GET https://cocoeatsai.com/area4/agent/tools/sun?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/coco-sun-times-api-d5a6d4bb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__j_UBSov-fB9Yg3NISloM

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 coco-sun-times-api-d5a6d4bb
```

Example prompt: What time does the sun rise and set in Denver, Colorado (latitude 39.7392, longitude -104.9903) on November 15, 2025, using the America/Denver timezone?

## When to prefer this

Choose this endpoint when you need precise, computed solar event times (sunrise, sunset, dawn, dusk, solar noon) and daylight duration for any geographic coordinate and date. It is ideal for planning outdoor activities, photography, scheduling, or solar energy calculations when you need offline-computed, stable results rather than real-time weather data.

## Known failure modes

- Missing required query parameters (lat, lon, date) returns an error
- Invalid latitude or longitude values may produce incorrect or no results
- Unrecognized timezone string may default to UTC or return an error
- Out-of-range date values may cause computation failure
- Network or server errors return non-2xx HTTP status

## How this service works

Zach Riehn's lab: an about-me and portfolio, a news desk, The Atelier for AI experiments, Launch Lab for XRP research, and Fracture for games.

## Output

A JSON object containing the date, dawn, sunrise, solar noon, sunset, dusk times as ISO 8601 timestamps with timezone offset, the timezone string, and total daylight_hours as a decimal number.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input",
  "output"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ]
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "tz": {
       "type": "string"
      },
      "lat": {
       "type": "string"
      },
      "lon": {
       "type": "string"
      },
      "date": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type",
    "example"
   ],
   "properties": {
    "type": {
     "const": "json"
    },
    "example": {
     "type": "object",
     "required": [
      "date"
     ],
     "properties": {
      "date": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "date": "2026-10-18",
  "dawn": "2026-10-18T11:43:40.034069+00:00",
  "dusk": "2026-10-18T23:44:19.763945+00:00",
  "noon": "2026-10-18T17:44:25+00:00",
  "sunset": "2026-10-18T23:17:19.613313+00:00",
  "sunrise": "2026-10-18T12:10:41.658582+00:00",
  "timezone": "UTC",
  "daylight_hours": 11.11
 },
 "exampleNote": "Computed offline with demonstration inputs; time/random values are illustrative."
}
```

## More

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