# Air Quality API

> Air Quality is an air pollution API that reports particulate pollution levels and health recommendations for any city, or a US, UK or Canadian postal code. Look up PM2.5 and PM10 concentrations to check current air conditions; paid plans add ozone, toxic gases, EPA and DEFRA index scores, and an estimated 0-500 US AQI with its category and dominant pollutant.

**Endpoint:** `GET https://api.apiverve.com/v1/airquality`  
**Category:** Weather  
**Cost:** 10 credits per call  
**Canonical page:** https://apiverve.com/marketplace/airquality

## Overview

On paid plans it also works as an air quality index (AQI) API, returning the US EPA and UK DEFRA index categories alongside the raw readings, plus, with aqi=true, a 0-500 US AQI estimated from the current concentrations with the EPA breakpoint tables, its category, the pollutant driving it and the index for each pollutant. Air Quality works by retrieving the air quality data from various reliable sources and providing it in a structured format.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl "https://api.apiverve.com/v1/airquality?city=San%20Francisco&aqi=true" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `city` | string | Yes | The city name for which you want to get the air quality data (e.g., New York). A name shared by several places resolves to the best-known one (Delhi is Delhi, India); add a state, province or country after a comma to pick another (e.g., Portland, Maine or London, Ontario). length 0-100 |
| `aqi` | boolean | No | Include the estimated 0-500 US AQI, its category, the dominant pollutant and the index for each pollutant. default false. Premium field |

## Response fields

- `pm2_5` — number · Fine particulate matter concentration in micrograms per cubic meter
- `pm10` — number · Coarse particulate matter concentration in micrograms per cubic meter
- `carbonMonoxide` — number · Carbon monoxide concentration level in parts per billion · (premium)
- `ozone` — number · Ground-level ozone concentration in parts per billion · (premium)
- `nitrogenDioxide` — number · Nitrogen dioxide concentration level in parts per billion · (premium)
- `sulfurdioxide` — number · Sulfur dioxide concentration level in parts per billion · (premium)
- `usEpaIndex` — number · US EPA air quality index rating from one to six scale · (premium)
- `gbDefraIndex` — number · UK DEFRA air quality index rating from one to ten scale · (premium)
- `aqi` — number · Estimated US AQI (0-500) from the current readings, using the EPA breakpoint tables (with aqi=true) · (premium)
- `aqiCategory` — string · EPA category for the AQI: Good, Moderate, Unhealthy for Sensitive Groups, Unhealthy, Very Unhealthy or Hazardous (with aqi=true) · (premium)
- `dominantPollutant` — string · The pollutant with the highest index, named as in this response (pm2_5, pm10, ozone, carbonMonoxide, sulfurdioxide, nitrogenDioxide) (with aqi=true) · (premium)
- `pollutantAqi` — object · Estimated AQI for each pollutant; null where the reading is missing (with aqi=true) · (premium)
  - `pollutantAqi.pm2_5` — number · AQI for fine particulate matter · (premium)
  - `pollutantAqi.pm10` — number · AQI for coarse particulate matter · (premium)
  - `pollutantAqi.ozone` — number · AQI for ozone (8-hour table) · (premium)
  - `pollutantAqi.carbonMonoxide` — number · AQI for carbon monoxide · (premium)
  - `pollutantAqi.sulfurdioxide` — number · AQI for sulfur dioxide · (premium)
  - `pollutantAqi.nitrogenDioxide` — number · AQI for nitrogen dioxide · (premium)
- `recommendation` — string · Air quality assessment and health recommendation for the city
- `city` — string · The city name for which air quality data was retrieved

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "pm2_5": 16.75,
    "pm10": 18.85,
    "carbonMonoxide": 387.85,
    "ozone": 9,
    "nitrogenDioxide": 38.55,
    "sulfurdioxide": 5.95,
    "usEpaIndex": 2,
    "gbDefraIndex": 2,
    "aqi": 65,
    "aqiCategory": "Moderate",
    "dominantPollutant": "pm2_5",
    "pollutantAqi": {
      "pm2_5": 65,
      "pm10": 17,
      "ozone": 4,
      "carbonMonoxide": 3,
      "sulfurdioxide": 3,
      "nitrogenDioxide": 19
    },
    "recommendation": "The air quality in San Francisco is moderate. It is generally safe to go outside, but unusually sensitive individuals may experience health effects.",
    "city": "San Francisco"
  }
}
```

## Use cases

- **HVAC Air Intake Automation** — Smart thermostat controllers read local PM2.5 and PM10 concentrations to automatically switch ventilation systems to internal recirculation during high pollution spikes.
- **Outdoor Workout Planning** — Fitness mobile apps show runners actionable health recommendations and particulate ratings by city before they start an outdoor training session.
- **Property Environmental Profiles** — Display local particulate measurements and health advice on real estate listings so buyers can evaluate neighborhood environmental quality.
- **School Sports Scheduling** — When particulate counts exceed safe thresholds, athletic directors consult real-time pollution readings and health recommendations to move student practices indoors.

## SDKs

- **npm** — `npm install @apiverve/airquality` (https://www.npmjs.com/package/@apiverve/airquality)
- **PyPI** — `pip install apiverve-airquality` (https://pypi.org/project/apiverve-airquality/)
- **NuGet** — `dotnet add package APIVerve.API.AirQuality` (https://www.nuget.org/packages/APIVerve.API.AirQuality)
- **Source** — https://github.com/apiverve/airquality-api

## More

- Full reference: https://docs.apiverve.com/ref/airquality
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
