Microproduct Data Guideintermediate

OpenAQ Air Quality API

Harmonized global air-quality measurements from public monitors for building multi-country pollution alerts outside a single national feed.

Report a Problem

At a Glance

Difficulty
Intermediate — some data preparation helps
Size
Tiny · ≤0.05 GB
Formats
JSON
Access
API
API Key
Required
Provider
OpenAQ
Updates
Near real time
Last Verified
Aug 20, 2026
Source Type
Nonprofit source
  • Python syntax checked

From Source to Product Signal

Test a Product Idea in Four Steps

OpenAQ aggregates publicly available air-quality monitors into one API. Start with a handful of locations in one country. U.S. products should start from AirNow; OpenAQ is a multi-country access layer, coverage is incomplete, and callers must follow each upstream source license.

1

Check the Setup

  • Python 3.10 or newer
  • A notebook environment such as Jupyter or Google Colab
  • An OpenAQ API key saved in the OPENAQ_API_KEY environment variable
2

Access the Data

  1. 1.Register for a free OpenAQ API key and save it in the OPENAQ_API_KEY environment variable.
  2. 2.Read the Terms of Use, including upstream source-license and attribution rules.
  3. 3.Request a bounded page of locations for one ISO country code.
Open Official Source
3

Run the Python Example

Install the packages, then run the notebook cell.

python -m pip install pandas requests

import os
import pandas as pd
import requests

response = requests.get(
    "https://api.openaq.org/v3/locations",
    headers={"X-API-Key": os.environ["OPENAQ_API_KEY"]},
    params={"iso": "IN", "limit": 5, "page": 1},
    timeout=30,
)
response.raise_for_status()
locations = pd.json_normalize(response.json()["results"])
locations["retrieved_at_utc"] = pd.Timestamp.now(tz="UTC")
print(locations.head(20))
4

Test a Useful Signal

List recent monitors in one country

Test whether OpenAQ locations can power a bounded non-U.S. air-quality lookup.

  1. 01Keep location id, name, coordinates, and any license or provider fields from the page.
  2. 02Choose one location and note whether it is a government monitor or a sensor.
  3. 03Explain that U.S. products should use AirNow, that coverage is incomplete, and that source licenses still apply.

Dataset Details

OpenAQ is a nonprofit source. Last verified 2026-08-20. Temporal coverage: location-dependent historical measurements through near-real-time updates.

Geography

Formats

Provider

OpenAQ

Data Terms

OpenAQ Terms of Use with upstream source licenses

Send Feedback