# x402-deployer Weather Forecast API

> x402-deployer Weather Forecast API is a paid API for AI agents from x402-deployer.x402-deployer.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Returns current weather conditions plus 1–7 day daily and optional hourly forecasts for any latitude/longitude coordinate, powered by Open-Meteo.

## Facts

- Endpoint: POST https://x402-deployer.x402-deployer.workers.dev/weather
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-deployer-x402-deployer-workers-dev-8f9acab5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_p1ShTmq7UQrrD3k1xpsL7

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-deployer-x402-deployer-workers-dev-8f9acab5 -d '<json body>'
```

Example prompt: What's the weather forecast for the next 5 days at latitude 40.7128, longitude -74.0060? Include hourly forecasts and give me the daily high/low temps, precipitation, UV index, and sunrise/sunset times.

## When to prefer this

Prefer this endpoint when you need structured daily or hourly weather forecast data for any global coordinate with temperature ranges, precipitation, UV index, and solar timing — especially when using x402 micropayment infrastructure and needing Open-Meteo quality data without managing your own API keys.

## Known failure modes

- Missing or invalid latitude/longitude returns a 400 error
- Forecast days out of range (not 1–7) returns a validation error
- Open-Meteo backend unavailability causes 502/503 upstream errors
- Coordinates outside supported geographic range may return empty or error responses
- Payment failure (x402) blocks the request before processing

## How this service works

Weather API / weather forecast / current weather / hourly forecast. Returns current conditions plus 1-7 day daily forecast and optional hourly forecast for any latitude/longitude. Daily includes temp max/min, precipitation, sunrise/sunset, UV index. Open-Meteo backend.

## Output

A JSON object containing current weather conditions and a daily forecast array (1–7 days) with temperature max/min, precipitation, sunrise/sunset times, and UV index per day; optionally includes an hourly forecast array with conditions per hour.

## Example request

```json
{
 "input": {
  "body": {
   "units": "metric",
   "hourly": true,
   "latitude": 40.7128,
   "longitude": -74.006,
   "forecast_days": 5
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 }
}
```

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "required": [
      "latitude",
      "longitude"
     ],
     "properties": {
      "units": {
       "enum": [
        "metric",
        "imperial"
       ],
       "type": "string",
       "description": "'metric' (°C, km/h, mm) or 'imperial' (°F, mph, inch). Default 'metric'."
      },
      "hourly": {
       "type": "boolean",
       "description": "If true, include hourly temperature, precipitation, and weather code arrays. Default false."
      },
      "latitude": {
       "type": "number",
       "description": "Decimal degrees, range [-90, 90]. Positive north."
      },
      "longitude": {
       "type": "number",
       "description": "Decimal degrees, range [-180, 180]. Positive east."
      },
      "forecast_days": {
       "type": "number",
       "description": "Number of forecast days, 1-7. Default 3."
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "daily": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "date": {
          "type": "string"
         },
         "sunset": {
          "type": "string"
         },
         "sunrise": {
          "type": "string"
         },
         "uv_index_max": {
          "type": "number"
         },
         "weather_code": {
          "type": "integer"
         },
         "temperature_max": {
          "type": "number"
         },
         "temperature_min": {
          "type": "number"
         },
         "precipitation_mm": {
          "type": "integer"
         },
         "precipitation_probability_max": {
          "type": "integer"
         }
        }
       }
      },
      "units": {
       "type": "string"
      },
      "source": {
       "type": "string"
      },
      "current": {
       "type
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-deployer-x402-deployer-workers-dev-8f9acab5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-deployer.x402-deployer.workers.dev](https://www.zero.xyz/host/x402-deployer.x402-deployer.workers.dev/llms.txt)
