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
Harmonized global air-quality measurements from public monitors for building multi-country pollution alerts outside a single national feed.
Report a ProblemFrom Source to Product Signal
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.
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))Test a Useful Signal
Test whether OpenAQ locations can power a bounded non-U.S. air-quality lookup.
OpenAQ is a nonprofit source. Last verified 2026-08-20. Temporal coverage: location-dependent historical measurements through near-real-time updates.