v1

latestSwagger 2.02026-07-132137180.4 KB
Historical Air Quality

Returns 72 hours of historical air quality conditions - Given a geolocation.

Returns historical air quality conditions. See https://www.weatherbit.io/api for API specific rate limits.

get/history/airquality

Query parameters

latnumber double required

Latitude component of location.

lonnumber double required

Longitude component of location.

citystring string

City search.. Example - &city=Raleigh,NC or &city=Berlin,DE or city=Paris&country=FR

postal_codestring string

Postal Code. Example: 28546

countrystring string

Country Code (2 letter) - to be used with postal_code.

start_datestring string

Start Date (YYYY-MM-DD or YYYY-MM-DD:HH).

end_datestring string

End Date (YYYY-MM-DD or YYYY-MM-DD:HH).

tz'local' | 'utc' string

Assume utc (default) or local time for start_date, end_date

keystring string required

Your registered API key.

Response

Historical air quality conditions

city_namestring

Nearest city name

state_codestring

State Abbreviation

country_codestring

Country Abbreviation

latnumber

Latitude

lonnumber

Longitude

timezonestring

Local IANA time zone

Example response

{
  "city_name": "Raleigh",
  "state_code": "NC",
  "country_code": "US",
  "lat": 38.25,
  "lon": -78,
  "timezone": "America/New_York",
  "data": [
    {
      "timestamp_local": "2019-03-04T12:00:00",
      "timestamp_utc": "2019-03-04T17:00:00",
      "datetime": "2019-03-04:17",
      "aqi": 100,
      "co": 72.3664,
      "so2": 50,
      "no2": 25,
      "o3": 2,
      "pm25": 230,
      "pm10": 150
    }
  ]
}