# OpenWeather Air Quality Index API

> OpenWeather Air Quality Index API is a paid API for AI agents from openweather-coral.vercel.app, paid per call via x402, $0.002/call, status down (last checked 2026-09-15).

Returns real-time air quality index (AQI) with detailed pollutant concentrations (PM2.5, PM10, NO2, O3, CO, SO2) for any geographic location

## Facts

- Endpoint: GET https://openweather-coral.vercel.app/weather/air-quality
- Price: $0.002/call
- Payment: x402
- Status: down
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/openweather-coral-vercel-app-4ca4f482
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_lx2N42GdwHO2mBM_-lPmn

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-coral-vercel-app-4ca4f482
```

Example prompt: What's the current air quality index and pollutant breakdown — PM2.5, PM10, ozone, NO2 — for San Francisco right now? Use latitude 37.7749 and longitude -122.4194.

## When to prefer this

Use this endpoint when you need real-time air pollution data including granular pollutant concentrations (PM2.5, PM10, NO2, O3, CO, SO2) for a specific latitude/longitude or city. It is ideal for health-aware applications, travel planning, or environmental monitoring workflows that need AQI alongside specific chemical component levels.

## Known failure modes

- Invalid or out-of-range latitude/longitude returns an error
- Missing required query parameters (no lat/lon or city) returns a 400-type error
- Unrecognized city name may fail to resolve coordinates
- Payment failure (insufficient balance) returns 402
- Service unavailability from upstream OpenWeatherMap returns a 5xx error

## How this service works

Air quality index (AQI) with PM2.5, PM10, NO2, O3, CO, SO2 for any location

## Output

Returns an AQI object with a numeric index (1-5) and label (e.g. 'Moderate'), plus individual concentrations in μg/m³ for CO, NO, NO2, O3, SO2, PM2.5, PM10, and NH3, along with the measurement timestamp and coordinates.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "city": "London"
  }
 }
}
```

## 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": {
      "lat": {
       "type": "string",
       "description": "Latitude"
      },
      "lon": {
       "type": "string",
       "description": "Longitude"
      },
      "city": {
       "type": "string",
       "description": "City name"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "aqi": {
       "type": "object"
      },
      "city": {
       "type": "string"
      },
      "components": {
       "type": "object"
      }
     }
    }
   }
  }
 }
}
```

## More

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