# AgentIndex x402 Weather

> AgentIndex x402 Weather is a paid API for AI agents from x402.agentindex.world, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-12).

Returns current conditions and a multi-day daily forecast for a given city or coordinates, paid per-call in USDC on Base.

## Facts

- Endpoint: GET https://x402.agentindex.world/weather?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentindex-x402-weather-bb1ff578
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_DI8KIOky8wP93RqTuI-Je

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 agentindex-x402-weather-bb1ff578
```

Example prompt: What's the current weather and daily forecast for Paris? I need the temperature, humidity, wind speed, and conditions for the next few days.

## When to prefer this

Choose this endpoint when you need live current conditions plus a multi-day daily forecast in a single pay-per-call request without a subscription, especially in agentic workflows that already operate on Base/USDC via the x402 micropayment protocol. Prefer it over free-tier weather APIs when you need reliable uptime with per-call billing and no API key management.

## Known failure modes

- Missing both city and lat/lon parameters — returns 400 or empty result
- Invalid city name that cannot be geocoded — may return error or empty location
- Payment failure on Base network (insufficient USDC balance) — 402 response with payment required details
- Network timeout or upstream weather provider outage — 503 or timeout error
- Ambiguous city name (e.g. 'Springfield') — may resolve to unexpected location

## How this service works

Current weather and a 3-day forecast for any city or lat/lon - temperature, humidity, wind, conditions. No account, no API key. Try GET /weather/sample.

## Output

Returns a JSON object with three sections: (1) location metadata (name, country, lat/lon, timezone), (2) current conditions (temperature in Celsius, humidity %, wind speed km/h, weather code and text description, timestamp), and (3) an array of daily forecasts (date, max/min temperature in Celsius, precipitation sum in mm, weather code and conditions string).

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "lat": {
       "type": "number",
       "description": "Latitude. Use with lon when you already have coordinates."
      },
      "lon": {
       "type": "number",
       "description": "Longitude. Use with lat when you already have coordinates."
      },
      "city": {
       "type": "string",
       "description": "City name (e.g. Paris, Tokyo). Preferred when you do not have coordinates."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "location",
      "current",
      "daily"
     ],
     "properties": {
      "daily": {
       "type": "array",
       "items": {
        "type": "object"
       }
      },
      "query": {
       "type": "string"
      },
      "current": {
       "type": "object"
      },
      "location": {
       "type": "object"
      },
      "x402_receipt": {
       "type": "object"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "daily": [
   {
    "date": "2026-09-30",
    "conditions": "rain",
    "weather_code": 63,
    "temperature_max_c": 22.8,
    "temperature_min_c": 20.5,
    "precipitation_sum_mm": 13.2
   },
   {
    "date": "2026-10-01",
    "conditions": "rain_showers",
    "weather_code": 80,
    "temperature_max_c": 21,
    "temperature_min_c": 16,
    "precipitation_sum_mm": 1.9
   },
   {
    "date": "2026-10-02",
    "conditions": "overcast",
    "weather_code": 3,
    "temperature_max_c": 20.6,
    "temperature_min_c": 12.5,
    "precipitation_sum_mm": 0
   }
  ],
  "query": "Paris",
  "current": {
   "time": "2026-09-30T12:30",
   "conditions": "slight_rain",
   "humidity_pct": 78,
   "weather_code": 61,
   "temperature_c": 21.1,
   "wind_speed_kmh": 8.9
  },
  "location": {
   "name": "Paris",
   "country": "France",
   "latitude": 48.85341,
   "timezone": "Europe/Paris",
   "longitude": 2.3488,
   "country_code": "FR"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentindex-x402-weather-bb1ff578/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.agentindex.world](https://www.zero.xyz/host/x402.agentindex.world/llms.txt)
