v1

latestSwagger 2.02026-07-132137180.4 KB
Air Quality Forecast

Returns 72 hour (hourly) Air Quality forecast - Given a geolocation.

Returns 72 hour (hourly) Air Quality forecast, where each point represents a one hour period.

get/forecast/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.

keystring string required

Your registered API key.

hoursinteger

Number of hours to return.

Response

A forecast object.

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
    }
  ]
}