# OpenWeather Air Quality Index via Locus x402

> OpenWeather Air Quality Index via Locus x402 is a paid API for AI agents from openweather.x402.paywithlocus.com, paid per call via x402, $0.006/call, status unknown (last checked 2026-09-15).

Returns current air quality index and pollutant concentrations for a given geographic coordinate, paid via x402 microtransaction.

## Facts

- Endpoint: POST https://openweather.x402.paywithlocus.com/openweather/air-quality
- Price: $0.006/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/openweather-air-quality-index-via-locus-x402-6d9018b6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Cb-a9flWN-3cfpE-5yg9N

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 openweather-air-quality-index-via-locus-x402-6d9018b6 -d '<json body>'
```

Example prompt: What's the current air quality index at latitude 34.05 and longitude -118.24 — is the air safe to breathe there right now?

## When to prefer this

Choose this endpoint when you need real-time air quality and pollutant data for a specific geographic coordinate and can pay per call via x402/USDC microtransactions. Prefer it over scraping environmental agency websites when you need programmatic, structured AQI data. It is especially useful in agent workflows that already use x402-compatible payment rails, or when you need to combine air quality with other OpenWeather data available on the same host.

## Known failure modes

- Invalid or out-of-range latitude/longitude returns a 400 error
- Payment failure or insufficient USDC balance causes a 402 response
- Network timeout if OpenWeatherMap upstream is slow
- Coordinates in ocean or uninhabited areas may return sparse or no pollutant data
- Rate limiting if too many requests are made in a short window

## How this service works

Global weather data — current conditions, 5-day forecasts, hourly forecasts, air quality index with pollutants, geocoding, and One Call 3.0 with full weather suite and government alerts.

## Output

Returns a JSON object with current air quality index (AQI on a 1-5 scale), individual pollutant concentrations (CO, NO, NO2, O3, SO2, PM2.5, PM10, NH3) in μg/m³, and the timestamp of the measurement, along with payment settlement metadata.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "lat": {
   "type": "number"
  },
  "lon": {
   "type": "number"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {},
  "payment": {
   "scheme": "exact",
   "settledUsdc": "0.001000",
   "authorizedMaxUsdc": "0.001000"
  },
  "request": {
   "id": "00000000-0000-4000-8000-000000000000",
   "statusUrl": "/requests/00000000-0000-4000-8000-000000000000"
  },
  "success": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/openweather-air-quality-index-via-locus-x402-6d9018b6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from openweather.x402.paywithlocus.com](https://www.zero.xyz/host/openweather.x402.paywithlocus.com/llms.txt)
