Location:
Forecast length:

By default, we provide forecasts for 7 days, but you can access forecasts for up to 16 days.

* Only available in Europe during pollen season with 4 days forecast
Note: Current conditions are based on 15-minutely weather model data. Every weather variable available in hourly data, is available as current condition as well.

API Documentation

The /air-quality endpoint returns pollutant and AQI data as JSON for any location. Provide coordinates and select variables. Default: 5 days starting at midnight today. Parameters:

latitude longitude Floating point Required
WGS84 latitude and longitude. Comma-separated for multiple locations, e.g. &latitude=52.52,48.85&longitude=13.41,2.35. Multi-location responses return a list; CSV/XLSX add location_id.
hourly String array
Comma-separated list of hourly variables, or use multiple &hourly= parameters.
current String array
Variables for current conditions (latest values).
timeformat String Default: iso8601
Use unixtime for Unix epoch seconds (GMT). For daily values, add utc_offset_seconds to get the correct local date.
timezone String Default: GMT
Time zone for local timestamps (data starts at 00:00 local). Use any IANA time zone. Set auto to resolve from coordinates. Comma-separated for multiple locations.
past_days Integer (0-92) Default: 0
Include past days (e.g. yesterday) in the response.
forecast_days Integer (0-7) Default: 5
Number of forecast days (default 5, max 7).
forecast_hours past_hours Integer (>0)
Number of hourly timesteps. Uses the current hour as reference instead of midnight.
start_date end_date String (yyyy-mm-dd)
Date range in ISO format, e.g. 2022-06-30.
start_hour end_hour String (yyyy-mm-ddThh:mm)
Time range for hourly data in ISO format, e.g. 2022-06-30T12:00.
cell_selection String Default: nearest
Grid-cell selection: land, sea, or nearest (default).
api_key String
Your API key for authenticated requests.

New optional parameters may be added over time. Required parameters will not change for API stability.

Hourly Parameter Definition

Available hourly air quality variables. Most are instantaneous at the given hour.

pm10 pm2_5 μg/m³
Particulate matter with diameter smaller than 10 µm (PM10) and smaller than 2.5 µm (PM2.5) close to surface (10 meter above ground)
carbon_monoxide nitrogen_dioxide sulphur_dioxide ozone μg/m³
Atmospheric gases close to surface (10 meter above ground)
carbon_dioxide ppm
CO2 close to surface (10 meter above ground)
ammonia μg/m³
Ammonia concentration. Only available for Europe.
aerosol_optical_depth Dimensionless
Aerosol optical depth at 550 nm of the entire atmosphere to indicate haze.
methane μg/m³
Methane close to surface (10 meter above ground)
dust μg/m³
Saharan dust particles close to surface level (10 meter above ground).
uv_index uv_index_clear_sky Index
UV index considering clouds and clear sky.
alder_pollen birch_pollen grass_pollen mugwort_pollen olive_pollen ragweed_pollen Grains/m³
Pollen for various plants. Only available in Europe as provided by CAMS European Air Quality forecast.
european_aqi european_aqi_pm2_5 european_aqi_pm10 european_aqi_nitrogen_dioxide european_aqi_ozone european_aqi_sulphur_dioxide European AQI
European Air Quality Index (AQI) calculated for different particulate matter and gases individually. The consolidated european_aqi returns the maximum of all individual indices. Ranges from 0-20 (good), 20-40 (fair), 40-60 (moderate), 60-80 (poor), 80-100 (very poor) and exceeds 100 for extremely poor conditions.
us_aqi us_aqi_pm2_5 us_aqi_pm10 us_aqi_nitrogen_dioxide us_aqi_ozone us_aqi_sulphur_dioxide us_aqi_carbon_monoxide U.S. AQI
United States Air Quality Index (AQI) calculated for different particulate matter and gases individually. The consolidated us_aqi returns the maximum of all individual indices. Ranges from 0-50 (good), 51-100 (moderate), 101-150 (unhealthy for sensitive groups), 151-200 (unhealthy), 201-300 (very unhealthy) and 301-500 (hazardous).

JSON Return Object

On success a JSON object will be returned.

{
    "latitude": 52.52,
    "longitude": 13.419,
    "elevation": 44.812,
    "generationtime_ms": 2.2119,
    "utc_offset_seconds": 0,
    "timezone": "Europe/Berlin",
    "timezone_abbreviation": "CEST",
    "hourly": {
        "time": ["2022-07-01T00:00", "2022-07-01T01:00", "2022-07-01T02:00", ...],
        "pm10": [1, 1.7, 1.7, 1.5, 1.5, 1.8, 2.0, 1.9, 1.3, ...]
    },
    "hourly_units": {
        "pm10": "μg/m³"
    },
}
latitude longitude Floating point
WGS84 of the center of the weather grid-cell which was used to generate this forecast. This coordinate might be a few kilometres away from the requested coordinate.
generationtime_ms Floating point
Generation time of the weather forecast in milliseconds. This is mainly used for performance monitoring and improvements.
utc_offset_seconds Integer
Applied timezone offset from the &timezone= parameter.
timezone timezone_abbreviation String
Timezone identifier (e.g. Europe/Berlin) and abbreviation (e.g. CEST)
hourly Object
For each selected weather variable, data will be returned as a floating point array. Additionally a time array will be returned with ISO8601 timestamps.
hourly_units Object
For each selected weather variable, the unit will be listed here.

Errors

In case an error occurs, for example a URL parameter is not correctly specified, a JSON error object is returned with a HTTP 400 status code.

{
    "error": true, 
    "reason": "Cannot initialize WeatherVariable from invalid String value
	    temperature_2m for key hourly" 
}