# x402.forgemesh.io Sunrise-Sunset & Moon Phase API

> x402.forgemesh.io Sunrise-Sunset & Moon Phase API is a paid API for AI agents from x402.forgemesh.io, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Returns sunrise, sunset, solar noon, golden hour times, moon phase, and moon illumination for any coordinates and date, computed instantly.

## Facts

- Endpoint: POST https://x402.forgemesh.io/sunrise-sunset
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-forgemesh-io-sunrise-sunset-moon-phase-api-3606b146
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_CsfEWy_1G2IOGkdxH4yLZ

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 x402-forgemesh-io-sunrise-sunset-moon-phase-api-3606b146 -d '<json body>'
```

Example prompt: What are the sunrise, sunset, golden hour, and moon phase details for coordinates 48.8566° N, 2.3522° E on June 21, 2025?

## When to prefer this

Choose this endpoint when you need precise solar event times (sunrise, sunset, golden hour, solar noon) or moon phase/illumination data for any geographic coordinates and date — especially for photography scheduling, agricultural planning, solar energy calculations, or outdoor event planning. Prefer over weather APIs when the need is specifically astronomical/solar rather than meteorological.

## Known failure modes

- Missing latitude or longitude returns a validation error
- Invalid date format (non-ISO) may return a parse error or unexpected result
- Coordinates out of valid range (-90 to 90 lat, -180 to 180 lon) may cause computation errors
- Payment failure via x402 protocol blocks the request
- No result for dates far in the past or future if computation bounds are exceeded

## How this service works

Sunrise and sunset API: sun times (sunrise, sunset, solar noon, golden hour) plus moon phase and illumination for any coordinates and date, computed instantly. For photography, agriculture, solar, and outdoor-planning agents.

## Output

Returns computed sun event times (sunrise, sunset, solar noon, golden hour start/end) and moon data (phase name, illumination percentage) for the requested latitude/longitude and date — all calculated server-side with no external dependency.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "date": {
   "type": "string",
   "description": "ISO date, default today"
  },
  "latitude": {
   "type": "string"
  },
  "longitude": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "sunset": "2026-07-16T01:24:00.000Z",
  "moonset": "2026-07-16T02:44:50.146Z",
  "sunrise": "2026-07-15T11:26:00.000Z",
  "moonrise": "2026-07-16T13:57:29.603Z",
  "moon_phase": "new moon",
  "next_new_moon": "2026-08-13",
  "next_full_moon": "2026-07-30",
  "moon_illumination": 0.02
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-forgemesh-io-sunrise-sunset-moon-phase-api-3606b146/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.forgemesh.io](https://www.zero.xyz/host/x402.forgemesh.io/llms.txt)
