# X402 Hub Weather API

> X402 Hub Weather API is a paid API for AI agents from x402-hub.vercel.app, paid per call via x402, $0.075/call, status unknown (last checked 2026-09-14).

Returns weather data for a given query, served as a micropayment-gated endpoint on Base via x402

## Facts

- Endpoint: POST https://x402-hub.vercel.app/api/weather338
- Price: $0.075/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-hub-weather-api-89fb4d78
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_v0jfFpMjAAZWZ0hwmwC0T

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-hub-weather-api-89fb4d78 -d '<json body>'
```

Example prompt: What's the current weather in San Francisco? Look it up via the X402 Hub weather endpoint and give me the temperature and conditions.

## When to prefer this

Choose this endpoint when you need weather data and are operating in an x402 micropayment-enabled agent environment on Base, where per-call USDC billing is acceptable and no long-term API subscription is desired. Useful for low-frequency, on-demand weather lookups without managing separate weather API credentials.

## Known failure modes

- Missing or empty 'query' field returns a 400 validation error
- Payment not included or insufficient USDC triggers a 402 Payment Required response
- Upstream weather provider unavailable returns a 503 or wrapped error in data field
- Malformed query (e.g. unrecognized location) may return empty or null data
- Network timeout from upstream weather API

## How this service works

63 paid API endpoints protected by x402 micropayments on Base

## Output

Returns a JSON object with a 'data' field containing upstream weather information such as temperature, conditions, and forecast details for the queried location.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "query"
 ],
 "properties": {
  "query": {
   "type": "string",
   "description": "Query parameter for the API"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "data": {
   "type": "object",
   "description": "Response data from upstream API"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-hub-weather-api-89fb4d78/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-hub.vercel.app](https://www.zero.xyz/host/x402-hub.vercel.app/llms.txt)
