EPA Air Quality Index Scraper avatar

EPA Air Quality Index Scraper

Pricing

from $3.00 / 1,000 results

Go to Apify Store
EPA Air Quality Index Scraper

EPA Air Quality Index Scraper

Scrape US EPA annual Air Quality Index (AQI) data from the public EPA AQS database - no API key required. Get AQI statistics, pollutant breakdowns (PM2.5, PM10, ozone, NO2, CO), and health category day counts for US counties, metro areas (CBSAs), and states. Historical data from 1980 to present.

Pricing

from $3.00 / 1,000 results

Rating

0.0

(0)

Developer

Crawler Bros

Crawler Bros

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Share

Scrape annual Air Quality Index (AQI) statistics for every US county, metropolitan area (CBSA), and state from the EPA Air Quality System (AQS) public database. No API key or registration required. Historical data from 1980 through 2024.

What You Can Scrape

  • By County — AQI statistics for every US county (3,100+ counties), including good/moderate/unhealthy day counts, pollutant breakdowns, and AQI percentiles.
  • By Metro Area — same statistics aggregated for 400+ Core-Based Statistical Areas (CBSAs), the standard US metro/micropolitan regions.
  • By State — aggregate AQI statistics derived by state (50 states + DC), including average median AQI and worst county max AQI.

Output Fields

County records (recordType: "countyAqi")

FieldTypeDescription
statestringUS state name (e.g. California)
countystringCounty name (e.g. Los Angeles)
yearintegerCalendar year
daysWithAqiintegerNumber of days with AQI data available
goodDaysintegerDays classified as AQI "Good" (0–50)
moderateDaysintegerDays classified as AQI "Moderate" (51–100)
unhealthyForSensitiveGroupsDaysintegerDays classified as "Unhealthy for Sensitive Groups" (101–150)
unhealthyDaysintegerDays classified as "Unhealthy" (151–200)
veryUnhealthyDaysintegerDays classified as "Very Unhealthy" (201–300)
hazardousDaysintegerDays classified as "Hazardous" (301+)
maxAqiintegerHighest single-day AQI in the year
percentile90Aqiinteger90th percentile AQI
medianAqiintegerMedian AQI across all monitored days
medianAqiCategorystringHealth category label for median AQI
daysCointegerDays where CO was the primary pollutant
daysNo2integerDays where NO2 was the primary pollutant
daysOzoneintegerDays where ozone was the primary pollutant
daysPm25integerDays where PM2.5 was the primary pollutant
daysPm10integerDays where PM10 was the primary pollutant
dominantPollutantstringPollutant with the most monitoring days
sourceUrlstringEPA AQS zip file URL for this year
scrapedAtstringUTC timestamp when record was scraped
recordTypestringAlways "countyAqi"

Metro area records (recordType: "metroAqi")

Same fields as county records, plus:

FieldTypeDescription
cbsastringCBSA name (e.g. Los Angeles-Long Beach-Anaheim, CA)
cbsaCodestringCBSA numeric code
stateAbbreviationsarrayState abbreviations in this CBSA

State records (recordType: "stateAqi")

FieldTypeDescription
statestringUS state name
yearintegerCalendar year
countyCountintegerNumber of counties included in the aggregation
avgMedianAqiintegerAverage of county median AQI values
avgMedianAqiCategorystringHealth category for average median AQI
stateMaxAqiintegerHighest max AQI among all counties
avgDaysWithAqiintegerAverage days with monitoring data per county
totalGoodDaysintegerSum of good days across all counties
totalUnhealthyDaysintegerSum of unhealthy days across all counties

Input Parameters

ParameterTypeDefaultDescription
modeselectbyCountybyCounty, byMetro, or byState
yearinteger2024Year to fetch (1980–2024)
yearsarrayMultiple years for a single run
stateFilterstringFilter to one state (e.g. California)
minMedianAqiintegerMinimum median AQI
maxMedianAqiintegerMaximum median AQI
minDaysWithAqiintegerMinimum monitoring days
minMaxAqiintegerMinimum max AQI (find worst air quality)
pollutantFilterselectFilter by dominant pollutant: co, no2, ozone, pm25, pm10
sortByselectmedianAqiSort field: medianAqi, maxAqi, unhealthyDays, goodDays, daysWithAqi, state
maxItemsinteger500Maximum records to emit

Example Inputs

Counties with worst air quality in California for 2023

{
"mode": "byCounty",
"year": 2023,
"stateFilter": "California",
"sortBy": "medianAqi",
"maxItems": 50
}

All US metro areas for 2024 sorted by worst AQI

{
"mode": "byMetro",
"year": 2024,
"sortBy": "maxAqi",
"maxItems": 100
}

Historical data: California AQI by county for 2015–2024

{
"mode": "byCounty",
"years": ["2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024"],
"stateFilter": "California",
"maxItems": 5000
}

State-level summary for 2024

{
"mode": "byState",
"year": 2024,
"sortBy": "medianAqi",
"maxItems": 51
}

Find counties with the most PM2.5 pollution days

{
"mode": "byCounty",
"year": 2023,
"pollutantFilter": "pm25",
"sortBy": "medianAqi",
"maxItems": 100
}

Use Cases

  • Air quality research — analyze long-term trends in US air quality at county and metro levels.
  • Public health — identify areas with high numbers of unhealthy air days for sensitive populations.
  • Policy analysis — compare AQI improvements across states and metro areas over time.
  • Environmental journalism — find the cleanest and most polluted areas in the US.
  • Real estate / relocation — evaluate air quality history when choosing where to live.
  • Academic research — build datasets linking air quality to health outcomes, demographics, or economic activity.

AQI Health Categories

AQI RangeCategory
0–50Good — Air quality is satisfactory
51–100Moderate — Acceptable quality; some pollutants may concern sensitive people
101–150Unhealthy for Sensitive Groups — At-risk populations may experience health effects
151–200Unhealthy — Everyone may experience health effects
201–300Very Unhealthy — Health warnings of emergency conditions
301+Hazardous — Serious health effects for entire population

Data Source

Data comes directly from the EPA Air Quality System (AQS) public bulk data files, which are freely available without registration or API keys. Data is published annually and covers all EPA monitoring stations across the United States.

FAQ

Does this require an API key? No. The EPA AQS bulk data files are publicly accessible ZIP archives — no registration or API key is needed.

What years are available? Annual AQI data is available from 1980 through 2024. Set year or provide a list in years.

How current is the data? Annual data is published by the EPA for the previous year. The most recent available year is typically published by Q2 of the following year.

How many counties does the US have? The US has approximately 3,143 counties/county-equivalents. Not all have EPA monitoring stations, but 2,000+ typically appear in the annual dataset.

What is a CBSA? A Core-Based Statistical Area is the standard US geographic unit for metropolitan and micropolitan statistical areas, defined by the US Office of Management and Budget. The AQI dataset covers 400+ CBSAs.

Can I get data for multiple years at once? Yes — use the years input to provide a list of years. Each year is fetched as a separate EPA download and all records are emitted in the same run.