Microproduct data guideintermediate

EPA AirNow Air Quality

Preliminary real-time AQI observations and forecasts for building local air-quality displays, relays, and operational awareness tools.

At a glance

Difficulty
Intermediate — some data preparation helps
Size
Small · ≤0.1 GB
Formats
JSON, CSV, XML
Access
API or Download
API key
Required
Provider
U.S. Environmental Protection Agency AirNow Program
Updates
Near real time
Data terms
EPA AirNow Data Use Guidelines

From source to product signal

Test a product idea in four steps

AirNow distributes AQI observations and forecasts reported by participating air-quality agencies. Start with the current monitoring-site service for a small geographic box and preserve the official AQI values and categories. Observations are preliminary, not regulatory data, and must not be altered or presented as independent health or regulatory advice.

1

Check the setup

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

Access the data

  1. 1.Request an AirNow account, accept the Data Use Guidelines, and save the key in AIRNOW_API_KEY.
  2. 2.Open the current Observations by Monitoring Site query documentation and choose a small bounding box.
  3. 3.Request a short time window and retain AirNow's values, units, categories, timestamps, and source attribution unchanged.
Open official source
3

Run the Python example

Install the packages, then run the notebook cell.

python -m pip install pandas requests

import os
from datetime import datetime, timedelta, timezone
import pandas as pd
import requests

end = datetime.now(timezone.utc).replace(minute=0, second=0, microsecond=0)
start = end - timedelta(hours=2)
response = requests.get(
    "https://www.airnowapi.org/aq/data/",
    params={
        "startDate": start.strftime("%Y-%m-%dT%H"),
        "endDate": end.strftime("%Y-%m-%dT%H"),
        "parameters": "O3,PM25",
        "BBOX": "-77.20,38.80,-76.80,39.10",
        "dataType": "A",
        "format": "application/json",
        "verbose": 1,
        "monitorType": 0,
        "includerawconcentrations": 0,
        "API_KEY": os.environ["AIRNOW_API_KEY"],
    },
    timeout=30,
)
response.raise_for_status()
observations = pd.DataFrame(response.json())
observations["retrieved_at_utc"] = pd.Timestamp.now(tz="UTC")
columns = ["UTC", "Parameter", "AQI", "Category", "Latitude", "Longitude"]
print(observations.reindex(columns=columns).head(20))
4

Test a useful signal

Relay official AQI observations for one area

Display the latest official AirNow AQI values and categories returned for a small geographic area.

  1. 01Keep the most recent observation per monitoring site and pollutant without recalculating its AQI or category.
  2. 02Display the observation time, preliminary status, AirNow attribution, and reporting agency where available.
  3. 03Explain that AirNow observations are preliminary and must not be used as regulatory data or transformed into independent health advice.

Dataset details

U.S. Environmental Protection Agency AirNow Program is a government source. Last verified 2026-08-11. Temporal coverage: current and recent observations and forecasts.

Domains

Air QualityPublic HealthWeather

Data types

Time SeriesGeospatialOperational Data

Tasks

MonitoringAlertingOperational Planning

Geography

United States

Formats

JSONCSVXML

Provider

U.S. Environmental Protection Agency AirNow Program

Data terms

EPA AirNow Data Use Guidelines