# xx402 Weather API

> xx402 Weather API is a paid API for AI agents from xx402.vercel.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-20).

Returns current weather data for any specified location via a paid POST endpoint

## Facts

- Endpoint: POST https://xx402.vercel.app/weather?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/xx402-vercel-app-7fb2423f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Vu5gyiK51WaU_WgLuov-s

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 xx402-vercel-app-7fb2423f -d '<json body>'
```

Example prompt: What's the current weather in Tokyo right now?

## When to prefer this

Use this endpoint when you need weather data for any arbitrary global location and are operating in an x402 micropayment-enabled environment. It is well-suited for agents that can handle pay-per-call billing at $0.001 USDC per query.

## Known failure modes

- Invalid or unrecognized location name returns an error
- Payment of $0.001 USDC not provided or rejected results in 402 response
- Network or server error on Vercel hosting returns 5xx
- Malformed POST body returns 400 bad request

## How this service works

获取任意位置的天气

## Output

Weather data for the requested location, likely including temperature, conditions, and related meteorological details.

## Example request

```json
{
 "units": "metric",
 "location": "Tokyo"
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "city": {
   "type": "string"
  },
  "weather": {
   "type": "string"
  },
  "temperature": {
   "type": "number"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/xx402-vercel-app-7fb2423f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from xx402.vercel.app](https://www.zero.xyz/host/xx402.vercel.app/llms.txt)
