# api.x-402.online Weather API

> api.x-402.online Weather API is a paid API for AI agents from api.x-402.online, paid per call via x402, $0.003/call, status down (last checked 2026-09-15).

Returns current weather conditions and a 3-day forecast for any location, queried by city name or latitude/longitude coordinates.

## Facts

- Endpoint: GET https://api.x-402.online/v1/weather
- Price: $0.003/call
- Payment: x402
- Status: down
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-x-402-online-weather-api-79d30073
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2n-T9aqxjsoooAK7UI7KW

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 api-x-402-online-weather-api-79d30073
```

Example prompt: What's the current weather and 3-day forecast for Tokyo? Give me temperature and conditions.

## When to prefer this

Use this endpoint when you need worldwide weather data (current conditions plus a short-range forecast) queryable by either a city name or geographic coordinates, especially in x402 micropayment-enabled workflows where per-call pricing is acceptable.

## Known failure modes

- Missing both city and lat/lon parameters — returns error
- Invalid or unrecognized city name — returns not found
- Out-of-range or malformed lat/lon values — returns error
- Payment not provided or insufficient — 402 Payment Required
- Network or upstream data source unavailable — 5xx error

## How this service works

Worldwide weather: current conditions + 3-day forecast by lat/lon or city name. Query: ?city= or ?lat=&lon=

## Output

Current weather conditions and a 3-day forecast for the requested location, including temperature, weather state, and related meteorological data.

## 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",
     "properties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-x-402-online-weather-api-79d30073/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.x-402.online](https://www.zero.xyz/host/api.x-402.online/llms.txt)
