Air Quality API logo
DataMAINTAINED10 tokens / call

Air Quality API

Nearest-station PM2.5, ozone and US AQI readings for any coordinates

Latest air-quality readings — PM2.5, PM10, ozone, NO2, SO2, CO and more — from the nearest government and research-grade monitoring station to any coordinates, with a computed US EPA AQI (value, category, dominant pollutant), per-pollutant timestamps and staleness flags, a nearby-station directory, station detail and a pollutant catalogue. Open data via OpenAQ under each station's own government licence (public domain, CC BY, ODC-BY, UK OGL and similar; non-commercial stations excluded), edge-cached for 15 minutes.

Every call needs an X-Api-Key header. A free key includes 500 tokens a month, no card required. 10 tokens per call, so the free plan covers about 50 calls a month.

No credit card requiredAccess to 125+ APIsCancel anytime
response.json
{
  "ok": true,
  "latitude": 40.71,
  "longitude": -74,
  "station": {
    "id": 664,
    "name": "Bklyn - PS274",
    "locality": "New York-Northern New Jersey-Long Island",
    "country": "US",
    "latitude": 40.694401,
    "longitude": -73.928596,
    "distance_km": 6.3,
    "provider": "AirNow",
    "reference_monitor": true,
    "mobile": false,
    "timezone": "America/New_York",
    "parameters": [
      "pm25"
    ],
    "last_updated": "2026-09-12T06:00:00Z",
    "active": true,
    "license": "US Public Domain",
    "attribution": "Unknown Governmental Organization"
  },
  "stale": false,
  "aqi_us": {
    "value": 33,
    "category": "Good",
    "dominant_pollutant": "pm25",
    "by_pollutant": {
      "pm25": 33
    },
    "note": "US EPA AQI computed from the latest particulate readings using the 24-hour breakpoints (2024 PM2.5 scale); gases are not included."
  },
  "measurements": [
    {
      "parameter": "pm25",
      "display_name": "PM2.5",
      "value": 5.9,
      "unit": "µg/m³",
      "last_updated": "2026-09-12T06:00:00Z",
      "age_hours": 0.6,
      "stale": false
    }
  ],
  "nearby_stations": [
    {
      "id": 662,
      "name": "Division Street",
      "distance_km": 0.6,
      "last_updated": "2020-02-19T16:00:00Z"
    },
    {
      "id": 642,
      "name": "PS 19",
      "distance_km": 2.6,
      "last_updated": "2017-12-18T10:00:00Z"
    },
    {
      "id": 648,
      "name": "Bklyn - PS 314",
      "distance_km": 7.7,
      "last_updated": "2026-09-12T06:00:00Z"
    },
    {
      "id": 628,
      "name": "Maspeth",
      "distance_km": 9.2,
      "last_updated": "2026-09-12T06:00:00Z"
    }
  ]
}
Production Ready
Battle-tested infrastructure with a 99.9% uptime SLA. Rate limits are generous, responses are consistent.
Simple Integration
Standard REST + JSON. Works with any HTTP client. Copy-ready code snippets in 4 languages.
One Key, 125+ APIs
Your DataAndAPIs subscription unlocks every API on the platform — anime, finance, sports, and more.

Use cases for Air Quality API

  • Show a live air-quality badge and US AQI category on a weather, running or cycling app for the user's exact location.

  • Alert asthma or allergy patients when PM2.5 or ozone near their home crosses a threshold, using per-pollutant timestamps to skip stale readings.

  • Enrich property listings, travel pages or city guides with the nearest monitoring station and its latest readings.

  • Build a dashboard of government and research-grade stations within a radius, with distance and reference-monitor flags for each.

Air Quality API endpoints

Every endpoint with its parameters and a real example response.

GETData Sources

https://api-air-quality.dataandapis.com/v1/sources

This endpoint takes no parameters.

Example request

curl "https://api-air-quality.dataandapis.com/v1/sources" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response
{
  "ok": true,
  "sources": [
    {
      "name": "OpenAQ v3 API",
      "url": "https://docs.openaq.org",
      "provides": "Latest readings and metadata for government and research-grade monitoring stations worldwide.",
      "licensing": "Per originating agency — US Public Domain, CC0, CC BY, ODC-BY, UK OGL and similar attribution licences; non-commercial licences are excluded."
    }
  ],
  "attribution": {
    "source": "OpenAQ — government and research-grade air-quality monitoring stations",
    "source_url": "https://openaq.org",
    "note": "Each station carries the licence of its originating agency (see the station's license/attribution fields); stations whose licence forbids commercial use are excluded. Readings are edge-cached for up to 15 minutes; readings older than 24 hours are flagged stale."
  },
  "aqi": {
    "scale": "US EPA AQI",
    "url": "https://www.airnow.gov/aqi/aqi-basics/",
    "pollutants": [
      "pm25",
      "pm10"
    ]
  },
  "cache_seconds": 900,
  "stale_after_hours": 24
}

GETNearby Stations

https://api-air-quality.dataandapis.com/v1/stations

Query parameters

ParameterExample
lat40.71Required
limit5Optional
lon-74.0Required
radius10Optional

Example request

curl "https://api-air-quality.dataandapis.com/v1/stations?lat=40.71&limit=5&lon=-74.0&radius=10" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response
{
  "ok": true,
  "latitude": 40.71,
  "longitude": -74,
  "radius_km": 10,
  "count": 5,
  "stations": [
    {
      "id": 662,
      "name": "Division Street",
      "locality": null,
      "country": "US",
      "latitude": 40.7142,
      "longitude": -73.995,
      "distance_km": 0.6,
      "provider": "AirNow",
      "reference_monitor": true,
      "mobile": false,
      "timezone": "America/New_York",
      "parameters": [
        "pm25"
      ],
      "last_updated": "2020-02-19T16:00:00Z",
      "active": false,
      "license": "US Public Domain",
      "attribution": "Unknown Governmental Organization"
    },
    {
…
Show full response
{
  "ok": true,
  "latitude": 40.71,
  "longitude": -74,
  "radius_km": 10,
  "count": 5,
  "stations": [
    {
      "id": 662,
      "name": "Division Street",
      "locality": null,
      "country": "US",
      "latitude": 40.7142,
      "longitude": -73.995,
      "distance_km": 0.6,
      "provider": "AirNow",
      "reference_monitor": true,
      "mobile": false,
      "timezone": "America/New_York",
      "parameters": [
        "pm25"
      ],
      "last_updated": "2020-02-19T16:00:00Z",
      "active": false,
      "license": "US Public Domain",
      "attribution": "Unknown Governmental Organization"
    },
    {
      "id": 642,
      "name": "PS 19",
      "locality": null,
      "country": "US",
      "latitude": 40.73,
      "longitude": -73.984459,
      "distance_km": 2.6,
      "provider": "AirNow",
      "reference_monitor": true,
      "mobile": false,
      "timezone": "America/New_York",
      "parameters": [
        "pm25"
      ],
      "last_updated": "2017-12-18T10:00:00Z",
      "active": false,
      "license": "US Public Domain",
      "attribution": "Unknown Governmental Organization"
    },
    {
      "id": 664,
      "name": "Bklyn - PS274",
      "locality": "New York-Northern New Jersey-Long Island",
      "country": "US",
      "latitude": 40.694401,
      "longitude": -73.928596,
      "distance_km": 6.3,
      "provider": "AirNow",
      "reference_monitor": true,
      "mobile": false,
      "timezone": "America/New_York",
      "parameters": [
        "pm25"
      ],
      "last_updated": "2026-09-12T06:00:00Z",
      "active": true,
      "license": "US Public Domain",
      "attribution": "Unknown Governmental Organization"
    },
    {
      "id": 648,
      "name": "Bklyn - PS 314",
      "locality": "KINGS",
      "country": "US",
      "latitude": 40.641819,
      "longitude": -74.018707,
      "distance_km": 7.7,
      "provider": "AirNow",
      "reference_monitor": true,
      "mobile": false,
      "timezone": "America/New_York",
      "parameters": [
        "pm25"
      ],
      "last_updated": "2026-09-12T06:00:00Z",
      "active": true,
      "license": "US Public Domain",
      "attribution": "Unknown Governmental Organization"
    },
    {
      "id": 628,
      "name": "Maspeth",
      "locality": "New York-Northern New Jersey-Long Island",
      "country": "US",
      "latitude": 40.7269,
      "longitude": -73.8933,
      "distance_km": 9.2,
      "provider": "AirNow",
      "reference_monitor": true,
      "mobile": false,
      "timezone": "America/New_York",
      "parameters": [
        "pm25"
      ],
      "last_updated": "2026-09-12T06:00:00Z",
      "active": true,
      "license": "US Public Domain",
      "attribution": "Unknown Governmental Organization"
    }
  ]
}

GETNearest Readings

https://api-air-quality.dataandapis.com/v1/air-quality

Query parameters

ParameterExample
lat40.71Required
lon-74.0Required
radius25Optional

Example request

curl "https://api-air-quality.dataandapis.com/v1/air-quality?lat=40.71&lon=-74.0&radius=25" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response
{
  "ok": true,
  "latitude": 40.71,
  "longitude": -74,
  "station": {
    "id": 664,
    "name": "Bklyn - PS274",
    "locality": "New York-Northern New Jersey-Long Island",
    "country": "US",
    "latitude": 40.694401,
    "longitude": -73.928596,
    "distance_km": 6.3,
    "provider": "AirNow",
    "reference_monitor": true,
    "mobile": false,
    "timezone": "America/New_York",
    "parameters": [
      "pm25"
    ],
    "last_updated": "2026-09-12T06:00:00Z",
    "active": true,
    "license": "US Public Domain",
    "attribution": "Unknown Governmental Organization"
  },
  "stale": false,
  "aqi_us": {
    "value": 33,
    "category": "Good",
…
Show full response
{
  "ok": true,
  "latitude": 40.71,
  "longitude": -74,
  "station": {
    "id": 664,
    "name": "Bklyn - PS274",
    "locality": "New York-Northern New Jersey-Long Island",
    "country": "US",
    "latitude": 40.694401,
    "longitude": -73.928596,
    "distance_km": 6.3,
    "provider": "AirNow",
    "reference_monitor": true,
    "mobile": false,
    "timezone": "America/New_York",
    "parameters": [
      "pm25"
    ],
    "last_updated": "2026-09-12T06:00:00Z",
    "active": true,
    "license": "US Public Domain",
    "attribution": "Unknown Governmental Organization"
  },
  "stale": false,
  "aqi_us": {
    "value": 33,
    "category": "Good",
    "dominant_pollutant": "pm25",
    "by_pollutant": {
      "pm25": 33
    },
    "note": "US EPA AQI computed from the latest particulate readings using the 24-hour breakpoints (2024 PM2.5 scale); gases are not included."
  },
  "measurements": [
    {
      "parameter": "pm25",
      "display_name": "PM2.5",
      "value": 5.9,
      "unit": "µg/m³",
      "last_updated": "2026-09-12T06:00:00Z",
      "age_hours": 0.6,
      "stale": false
    }
  ],
  "nearby_stations": [
    {
      "id": 662,
      "name": "Division Street",
      "distance_km": 0.6,
      "last_updated": "2020-02-19T16:00:00Z"
    },
    {
      "id": 642,
      "name": "PS 19",
      "distance_km": 2.6,
      "last_updated": "2017-12-18T10:00:00Z"
    },
    {
      "id": 648,
      "name": "Bklyn - PS 314",
      "distance_km": 7.7,
      "last_updated": "2026-09-12T06:00:00Z"
    },
    {
      "id": 628,
      "name": "Maspeth",
      "distance_km": 9.2,
      "last_updated": "2026-09-12T06:00:00Z"
    }
  ]
}

GETPollutant Parameters

https://api-air-quality.dataandapis.com/v1/parameters

This endpoint takes no parameters.

Example request

curl "https://api-air-quality.dataandapis.com/v1/parameters" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response
{
  "ok": true,
  "count": 44,
  "parameters": [
    {
      "code": "bc",
      "display_name": "BC",
      "unit": "µg/m³",
      "description": "Black Carbon mass concentration"
    },
    {
      "code": "bc_370",
      "display_name": "BC 370nm",
      "unit": "ng/m³",
      "description": "Black Carbon mass concentration 375nm "
    },
    {
      "code": "bc_375",
      "display_name": "BC 375nm",
      "unit": "ng/m³",
      "description": "Black Carbon mass concentration 375nm "
    },
    {
      "code": "bc_470",
      "display_name": "BC 470nm",
      "unit": "ng/m³",
      "description": "Black Carbon mass concentration 470nm "
    },
…
Show full response
{
  "ok": true,
  "count": 44,
  "parameters": [
    {
      "code": "bc",
      "display_name": "BC",
      "unit": "µg/m³",
      "description": "Black Carbon mass concentration"
    },
    {
      "code": "bc_370",
      "display_name": "BC 370nm",
      "unit": "ng/m³",
      "description": "Black Carbon mass concentration 375nm "
    },
    {
      "code": "bc_375",
      "display_name": "BC 375nm",
      "unit": "ng/m³",
      "description": "Black Carbon mass concentration 375nm "
    },
    {
      "code": "bc_470",
      "display_name": "BC 470nm",
      "unit": "ng/m³",
      "description": "Black Carbon mass concentration 470nm "
    },
    {
      "code": "bc_528",
      "display_name": "BC 528nm",
      "unit": "ng/m³",
      "description": "Black Carbon mass concentration 528nm "
    },
    {
      "code": "bc_625",
      "display_name": "BC 625nm",
      "unit": "ng/m³",
      "description": "Black Carbon mass concentration 625nm "
    },
    {
      "code": "bc_880",
      "display_name": "BC 880nm",
      "unit": "ng/m³",
      "description": "Black Carbon mass concentration 880nm "
    },
    {
      "code": "ch4",
      "display_name": "CH₄",
      "unit": "ppm",
      "description": "Methane concentration"
    },
    {
      "code": "co",
      "display_name": "CO mass",
      "unit": "µg/m³",
      "description": "Carbon Monoxide mass concentration"
    },
    {
      "code": "co",
      "display_name": "CO",
      "unit": "ppm",
      "description": "Carbon Monoxide concentration"
    },
    {
      "code": "co",
      "display_name": "CO",
      "unit": "ppb",
      "description": null
    },
    {
      "code": "co2",
      "display_name": "CO₂",
      "unit": "ppm",
      "description": "Carbon Dioxide concentration"
    },
    {
      "code": "humidity",
      "display_name": "H",
      "unit": "%",
      "description": null
    },
    {
      "code": "no",
      "display_name": "NO",
      "unit": "ppb",
      "description": null
    },
    {
      "code": "no",
      "display_name": "NO",
      "unit": "ppm",
      "description": "Nitrogen Monoxide concentration"
    },
    {
      "code": "no",
      "display_name": "NO mass",
      "unit": "µg/m³",
      "description": "Nitrogen Monoxide mass concentration"
    },
    {
      "code": "no2",
      "display_name": "NO₂ mass",
      "unit": "µg/m³",
      "description": "Nitrogen Dioxide mass concentration"
    },
    {
      "code": "no2",
      "display_name": "NO₂",
      "unit": "ppm",
      "description": "Nitrogen Dioxide concentration"
    },
    {
      "code": "no2",
      "display_name": "NO₂",
      "unit": "ppb",
      "description": null
    },
    {
      "code": "nox",
      "display_name": "NOX",
      "unit": "ppb",
      "description": null
    },
    {
      "code": "nox",
      "display_name": "NOx mass",
      "unit": "µg/m³",
      "description": "Nitrogen Oxides mass concentration"
    },
    {
      "code": "nox",
      "display_name": "NOx",
      "unit": "ppm",
      "description": "Nitrogen Oxides concentration"
    },
    {
      "code": "o3",
      "display_name": "O₃ mass",
      "unit": "µg/m³",
      "description": "Ozone mass concentration"
    },
    {
      "code": "o3",
      "display_name": "O₃",
      "unit": "ppm",
      "description": "Ozone concentration"
    },
    {
      "code": "o3",
      "display_name": "O₃",
      "unit": "ppb",
      "description": null
    },
    {
      "code": "pm1",
      "display_name": "PM1",
      "unit": "µg/m³",
      "description": "Particulate matter less than 1 micrometer in diameter mass concentration"
    },
    {
      "code": "pm10",
      "display_name": "PM10",
      "unit": "µg/m³",
      "description": "Particulate matter less than 10 micrometers in diameter mass concentration"
    },
    {
      "code": "pm25",
      "display_name": "PM2.5",
      "unit": "µg/m³",
      "description": "Particulate matter less than 2.5 micrometers in diameter mass concentration"
    },
    {
      "code": "pm4",
      "display_name": "PM4.0",
      "unit": "µg/m³",
      "description": "Particulate matter less than 4 micrometers in diameter mass concentration"
    },
    {
      "code": "pressure",
      "display_name": "Atmospheric pressure",
      "unit": "hpa",
      "description": "Atmospheric or barometric pressure"
    },
    {
      "code": "pressure",
      "display_name": "Pressure",
      "unit": "mb",
      "description": null
    },
    {
      "code": "relativehumidity",
      "display_name": "RH",
      "unit": "%",
      "description": null
    },
    {
      "code": "so2",
      "display_name": "SO₂ mass",
      "unit": "µg/m³",
      "description": "Sulfur Dioxide mass concentration"
    },
    {
      "code": "so2",
      "display_name": "SO₂",
      "unit": "ppm",
      "description": "Sulfur Dioxide concentration"
    },
    {
      "code": "so2",
      "display_name": "SO₂",
      "unit": "ppb",
      "description": null
    },
    {
      "code": "temperature",
      "display_name": "Temperature (C)",
      "unit": "c",
      "description": null
    },
    {
      "code": "temperature",
      "display_name": "Temperature (F)",
      "unit": "f",
      "description": null
    },
    {
      "code": "ufp",
      "display_name": "UFP count",
      "unit": "particles/cm³",
      "description": "Ultrafine Particles count concentration"
    },
    {
      "code": "um003",
      "display_name": "PM0.3 count",
      "unit": "particles/cm³",
      "description": null
    },
    {
      "code": "um010",
      "display_name": "PM1 count",
      "unit": "particles/cm³",
      "description": "PM1 count"
    },
    {
      "code": "um025",
      "display_name": "PM2.5 count",
      "unit": "particles/cm³",
      "description": "PM2.5 count"
    },
    {
      "code": "um100",
      "display_name": "PM10 count",
      "unit": "particles/cm³",
      "description": "PM10 count"
    },
    {
      "code": "wind_direction",
      "display_name": "Wind direction",
      "unit": "deg",
      "description": "Direction that the wind originates from"
    },
    {
      "code": "wind_speed",
      "display_name": "Wind speed",
      "unit": "m/s",
      "description": "Average wind speed in meters per second"
    }
  ]
}

GETStation Detail

https://api-air-quality.dataandapis.com/v1/stations/{id}

Path parameters

ParameterExample
id664Required

Example request

curl "https://api-air-quality.dataandapis.com/v1/stations/664" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response
{
  "ok": true,
  "station": {
    "id": 664,
    "name": "Bklyn - PS274",
    "locality": "New York-Northern New Jersey-Long Island",
    "country": "US",
    "latitude": 40.694401,
    "longitude": -73.928596,
    "distance_km": null,
    "provider": "AirNow",
    "reference_monitor": true,
    "mobile": false,
    "timezone": "America/New_York",
    "parameters": [
      "pm25"
    ],
    "last_updated": "2026-09-12T05:00:00Z",
    "active": true,
    "license": "US Public Domain",
    "attribution": "Unknown Governmental Organization",
    "first_reading": "2016-03-10T08:00:00Z"
  },
  "stale": false,
  "aqi_us": {
    "value": 33,
    "category": "Good",
    "dominant_pollutant": "pm25",
…
Show full response
{
  "ok": true,
  "station": {
    "id": 664,
    "name": "Bklyn - PS274",
    "locality": "New York-Northern New Jersey-Long Island",
    "country": "US",
    "latitude": 40.694401,
    "longitude": -73.928596,
    "distance_km": null,
    "provider": "AirNow",
    "reference_monitor": true,
    "mobile": false,
    "timezone": "America/New_York",
    "parameters": [
      "pm25"
    ],
    "last_updated": "2026-09-12T05:00:00Z",
    "active": true,
    "license": "US Public Domain",
    "attribution": "Unknown Governmental Organization",
    "first_reading": "2016-03-10T08:00:00Z"
  },
  "stale": false,
  "aqi_us": {
    "value": 33,
    "category": "Good",
    "dominant_pollutant": "pm25",
    "by_pollutant": {
      "pm25": 33
    },
    "note": "US EPA AQI computed from the latest particulate readings using the 24-hour breakpoints (2024 PM2.5 scale); gases are not included."
  },
  "measurements": [
    {
      "parameter": "pm25",
      "display_name": "PM2.5",
      "value": 5.9,
      "unit": "µg/m³",
      "last_updated": "2026-09-12T06:00:00Z",
      "age_hours": 0.6,
      "stale": false
    }
  ]
}

Where the data comes from

Source
OpenAQ aggregation of government and research-grade monitoring stations (AirNow, EEA, DEFRA and others), each under its own open licence. Non-commercial stations are excluded.
Freshness
Live readings, edge-cached for 15 minutes. Per-pollutant timestamps and a stale flag on every response.

One install. Every endpoint.

No proprietary SDKs needed. Any HTTP client works. Pick your language and paste.

3languages
5endpoints
RESTarchitecture
1key for all APIs
  • Fully typed responses — auto-completion in your IDE
  • Tracks the API in lockstep — new endpoints land same day
  • One key works across 125+ APIs on the platform
import axios from 'axios';

const { data } = await axios.get(
  'https://api-air-quality.dataandapis.com/v1/sources',
  { headers: { 'X-Api-Key': process.env.API_KEY } }
);

Air Quality API · X-Api-Key

Explore the endpoints

Browse request parameters and inspect live example responses.

Available Endpoints

Request Parameters

API URL

Headers

X-Api-Key
import axios from 'axios';

const url = 'https://api-air-quality.dataandapis.com/v1/sources';
const { data } = await axios.get(url, {
  headers: { 'X-Api-Key': 'YOUR_API_KEY' }
});

One subscription. Every API.

Tokens unlock this API and 125+ others on DataAndAPIs. Switch APIs any time — we promote.

FREE

$0/mo

500 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Community support
Start free
Most Popular

STARTER

$6.99/mo

25,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Email support
Subscribe

PRO

$24.99/mo

100,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Priority email support
Subscribe

ULTRA

$99.99/mo

1,000,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Priority support
Subscribe

Need higher volume, dedicated infra, or a custom contract? Talk to sales →

Questions about Air Quality API

Ship Air Quality API this afternoon.

500 free tokens. No card. Plus 125+ other APIs on the same key.