Historical Air Quality
This Air Quality API returns hourly historical air quality conditions for any location in the world. It returns air quality data on the 6 major surface pollutants - PM 2.5, PM 10, CO, SO2, NO2, and O3. Additionally, this API returns an air quality index score. By default this API returns the past 72 hours, however, a start/end date may be passed to obtain a different range. Data is available going back to January 13th, 2022 at this time.. Requests for more than 5 days of data count as multiple historical requests against your daily quota ie. (30 days = 6 requests, 14 days = 3 requests).
This API is available to the following plans (See: pricing):
- Business plan
- Enterprise plan
All parameters should be supplied to the API as query string parameters.
Base URL
Request Parameters
key- Your API Key.
local- [DEFAULT] Assumes LOCAL for start_date, end_dateUTC- Assumes UTC time for start_date, end_date
API Endpoints
| Description | Required Parameters | Example(s) |
|---|---|---|
| Get data by lat/lon (Recommended) | lat,lon | &lat=38.123&lon=-78.543 |
| Get data by city name | city, state(optional), country (optional) |
|
| Get data by postal code | postal_code, country (optional) | &postal_code=27601&country=US |
| Get data by city id | city_id | &city_id=8953360 |
Example Requests:
https://api.weatherbit.io/v2.0/history/airquality?lat=35.5&lon=-78.0&key=API_KEY
https://api.weatherbit.io/v2.0/history/airquality?lat=35.5&lon=-78.0&start_date=2025-12-01&end_date=2025-12-02&tz=local&key=API_KEY
Example Response (JSON):
{
"lat":38,
"lon":-78,
"timezone":"America\/New_York",
"city_name":"Louisa",
"country_code":"US",
"state_code":"VA",
"data":[
{
"timestamp_utc":"2019-03-04T17:00:00",
"timestamp_local":"2019-03-04T12:00:00",
"ts":1551718800,
"aqi":4,
"o3":57.3993,
"so2":3.8594,
"no2":5.42472,
"pm10":2.1667,
"pm25":0.927972,
"co":383.437
},
{
"timestamp_utc":"2019-03-04T16:00:00",
"timestamp_local":"2019-03-04T11:00:00",
"ts":1551718800,
"aqi":10,
"o3":44.3993,
"so2":2.8594,
"no2":4.42472,
"pm10":3.1667,
"pm25":0.927972,
"co":422.000
}, ...
]
}
Field Decriptions:
lat:Latitude (Degrees).lon:Longitude (Degrees).timezone:Local IANA Timezone.city_name:City name.country_code:Country abbreviation.state_code:State abbreviation/code.data: [timestamp_local:Timestamp at local time.timestamp_utc:Timestamp at UTC time.ts:Unix Timestamp at UTC time.aqi:Air Quality Index [US - EPA standard 0 - +500]o3:Concentration of surface O3 (µg/m³)so2:Concentration of surface SO2 (µg/m³)no2:Concentration of surface NO2 (µg/m³)co:Concentration of carbon monoxide (µg/m³)pm25:Concentration of particulate matter < 2.5 microns (µg/m³)pm10:Concentration of particulate matter < 10 microns (µg/m³)... ]