Endpoint: airquality/forecasts

The Air Quality API Forecasts endpoint provides information for locations globally. This endpoint can provide daily and hourly forecast data up to 4 days. Forecast data will be interpolated for the exact location queried. Available information includes the air quality index (AQI), category, dominant pollutant, and information for primary pollutants when available.

https://api.aerisapi.com/airquality/forecasts

This endpoint is currently in beta, which means there may be occasional errors and/or the supported features and response output may change before its production version.

Supported Actions

The following actions are supported with the airquality/forecasts endpoint:

:id Requesting data by using the :id action is used for returning data for a particular item that has an ID associated with it. This is the primary method for requesting general weather information for a single location (observations, forecasts, advisories, etc.) as the location's name or a zip code serves as the id. Other endpoints may expect a certain value for the ID, such as storm cells whose ID value is a combination of the radar site identifier and unique identifier assigned to every storm cell. Refer to an enpoint's detailed documentation for specific information regarding how to use the :id action.

Supported Parameters

The following parameters are optional unless otherwise noted:

p p=:place Defines the location to query data for. Refer to the list of supported place value formats.
filter filter=:string Predefined filters for limiting the results. The filter value can be a single, comma-delimited or a semicolon delimited string of filter names.
fields fields=:string Provides a comma separated list of values for the API to return. This parameter is often used to limit the amount of data returned. See Reducing Output.
callback callback=:functionName Used with JSONP implementation.

Defines the callback function to use for the response. The response will be enclosed as C(response), where C is the callback function provided.
limit limit=:total The total number of results to return as an integer. Each endpoint may have a set maximum for this value depending on usage.

The default limit is 1 if not specified.
plimit plimit=:total Applied only on the periods property, the total number of periods to return as an integer. This parameter has a normal default of one (1).
pskip pskip=:number Applied only on the periods property, used to skip over a specific number of periods in the data set.

Supported Filters

The following filters can be passed to the filter parameter to reduce the results that are returned:

day (default) Returns daily forecast air quality information
daynight Returns forecast data in a daily 12-hour format in which day and night forecasts are separated.
#hr Returns forecast air quality information for the specified interval starting at the locale's current time. Supports values: 1hr, 2hr, 3hr, 4hr, 6hr, 12hr, 24hr.
china Utilize the Chinese Government AQI categories, in place of the default AirNOW categories

For more information on various Air Quality Index standards, please visit the wiki page.
india Utilize the India AQI categories, in place of the default AirNOW categories

For more information on various Air Quality Index standards, please visit the wiki page.

Examples

The /[:endpoint]/[:action]? portion within the query template below can be exchanged with any of the examples. Also, please note you will need to input your client credentials in the [ID] and [SECRET] fields which can be found under the Apps section of the members area.

https://api.aerisapi.com/[:endpoint]/[:action]?client_id=[ID]&client_secret=[SECRET]

Returns the estimated daily air quality forecast for Minneapolis, MN
/airquality/forecasts/55403?

Returns the next 24 hour estimated air quality forecast in hourly intervals for Beijing, China
/airquality/forecasts/beijing,cn?filter=1hr&limit=24&

Returns the estimated air quality forecast for the specified latitude, longitude in 3 hour intervals for the next 48 hours
/airquality/forecasts/44.9778,-93.265?filter=3hr&limit=16&

Returns the estimated air quality forecast for Beijing, China using the China defined air quality categories.
/airquality/forecasts/beijing,cn?filter=1hr&limit=24&filter=china&

Response

The following is an example of what each object in the response will consist of. Depending on your requested action, the response may contain multiple instances of this object within an array.

Default
GeoJSON

{
    "success": true,
    "error": null,
    "response": [{
        "id": null,
        "loc": {
            "long": 73.855,
            "lat": 18.52
        },
        "place": {
            "name": "pune",
            "state": null,
            "country": "in"
        },
        "periods": [{
            "dateTimeISO": "2018-05-29T23:30:00+05:30",
            "timestamp": 1527616800,
            "aqi": 147,
            "category": "usg",
            "color": "FF7E00",
            "method": "airnow",
            "dominant": "pm2.5",
            "pollutants": [{
                "type": "o3",
                "name": "ozone",
                "valuePPB": 38,
                "valueUGM3": 77,
                "aqi": 35,
                "category": "good",
                "color": "00E400"
            }, {
                "type": "pm2.5",
                "name": "particle matter (<2.5µm)",
                "valuePPB": null,
                "valueUGM3": 54,
                "aqi": 147,
                "category": "usg",
                "color": "FF7E00"
            }, {
                "type": "pm10",
                "name": "particle matter (<10µm)",
                "valuePPB": null,
                "valueUGM3": 77,
                "aqi": 62,
                "category": "moderate",
                "color": "FFFF00"
            }, {
                "type": "co",
                "name": "carbon monoxide",
                "valuePPB": 172,
                "valueUGM3": 198,
                "aqi": 2,
                "category": "good",
                "color": "00E400"
            }, {
                "type": "no2",
                "name": "nitrogen dioxide",
                "valuePPB": 5,
                "valueUGM3": 11,
                "aqi": 5,
                "category": "good",
                "color": "00E400"
            }, {
                "type": "so2",
                "name": "sulfur dioxide",
                "valuePPB": 5,
                "valueUGM3": 14,
                "aqi": 7,
                "category": "good",
                "color": "00E400"
            }]
        }],
        "profile": {
            "tz": "Asia\/Kolkata",
            "sources": [{
                "name": "CAMS"
            }],
            "stations": null
        }
    }]
}
								

{
    "type": "FeatureCollection",
    "features": [{
        "type": "Feature",
        "geometry": {
            "type": "Point",
            "coordinates": [73.855, 18.52]
        },
        "properties": {
            "id": null,
            "loc": {
                "long": 73.855,
                "lat": 18.52
            },
            "place": {
                "name": "pune",
                "state": null,
                "country": "in"
            },
            "periods": [{
                "dateTimeISO": "2018-05-29T23:30:00+05:30",
                "timestamp": 1527616800,
                "aqi": 147,
                "category": "usg",
                "color": "FF7E00",
                "method": "airnow",
                "dominant": "pm2.5",
                "pollutants": [{
                    "type": "o3",
                    "name": "ozone",
                    "valuePPB": 38,
                    "valueUGM3": 77,
                    "aqi": 35,
                    "category": "good",
                    "color": "00E400"
                }, {
                    "type": "pm2.5",
                    "name": "particle matter (<2.5µm)",
                    "valuePPB": null,
                    "valueUGM3": 54,
                    "aqi": 147,
                    "category": "usg",
                    "color": "FF7E00"
                }, {
                    "type": "pm10",
                    "name": "particle matter (<10µm)",
                    "valuePPB": null,
                    "valueUGM3": 77,
                    "aqi": 62,
                    "category": "moderate",
                    "color": "FFFF00"
                }, {
                    "type": "co",
                    "name": "carbon monoxide",
                    "valuePPB": 172,
                    "valueUGM3": 198,
                    "aqi": 2,
                    "category": "good",
                    "color": "00E400"
                }, {
                    "type": "no2",
                    "name": "nitrogen dioxide",
                    "valuePPB": 5,
                    "valueUGM3": 11,
                    "aqi": 5,
                    "category": "good",
                    "color": "00E400"
                }, {
                    "type": "so2",
                    "name": "sulfur dioxide",
                    "valuePPB": 5,
                    "valueUGM3": 14,
                    "aqi": 7,
                    "category": "good",
                    "color": "00E400"
                }]
            }],
            "profile": {
                "tz": "Asia\/Kolkata",
                "sources": [{
                    "name": "CAMS"
                }],
                "stations": null
            }
        }
    }]
}
								

Response Properties

The following properties will be provided in every response object:

periods (array) Array of air quality observations
periods.#.timestamp (number) UNIX timestamp of the period.
periods.#.dateTimeISO (string) ISO 8601 date of the period.
periods.#.aqi (number) The standardized Air Quality Index, from 0 to 500
See AirNow
periods.#.category (string) The Air Quality category based on the AQI:
See AirNow

- good
- moderate
- usg (Unhealthy for Sensitive Groups)
- unhealthy
- very Unhealthy
- hazardous

If using filter=china, the following categories are utilized:
More info on China AQI / Categories.

- excellent
- good
- slightly polluted
- lightly polluted
- moderately polluted
- severely polluted

If using the filter=india, the following categories are utilizes:
More info on India AQI / Categories.

- good
- satisfactory
- moderately polluted
- poor
- very poor
- severe
periods.#.color (string) The 6 character hexadecimal color code for the specific category.
See AirNow
periods.#.method (string) The method used for the AQI calculation:
- airnow = Used the EPA AirNow AQI specification (default)
- china = Used the China AQI specification (filter=china)
- india = Used the India AQI specification (filter=india)
periods.#.dominant (string) The dominant pollutant. Normally set to one of the following:
- co (Carbon Monoxide)
- no2 (Nitrogen Dioxide)
- o3 (Ozone)
- pm10 (Particle Matter <10µm)
- pm2.5 (Particle Matter <2.5µm)
- so2 (Sulfur Dioxide)
periods.#.pollutants (array) Array of pollutants
periods.#.pollutants.#.type (string) The type abbreviation of the pollutant:
co = carbon monoxide
no2 = nitrogen dioxide
o3 = ozone
pm1 = partical matter (<1µm)
pm10 = partical matter (<10µm)
pm2.5 = partical matter (<2.5µm)
so2 = sulfer dioxide
periods.#.pollutants.#.name (string) Name of the pollutant
periods.#.pollutants.#.valuePPB (number) The pollutant measurement in parts per billion. Null if this unit is not utilized

pm2.5 & pm10 do not utilize PPB
periods.#.pollutants.#.valueUGM3 (number) The pollutant measurement in parts per micrograms per cubic meter. Null if this unit is not utilized
periods.#.pollutants.#.aqi (number) The pollutant measurement converted to the common AQI value, from 0 to 500
periods.#.pollutants.#.category (number) The Air Quality category based on the AQI:
See AirNow

- good
- moderate
- usg (Unhealthy for Sensitive Groups)
- unhealthy
- very Unhealthy
- hazardous

If using filter=china, the following categories are utilized:
More info on China AQI / Categories.

- excellent
- good
- slightly polluted
- lightly polluted
- moderately polluted
- severely polluted

If using the filter=india, the following categories are utilizes:
More info on India AQI / Categories.

- good
- satisfactory
- moderately polluted
- poor
- very poor
- severe
periods.#.pollutants.#.color (number) The 6 character hexadecimal color code for the specific category.
See AirNow
profile.sources (array) Array of sources for the air quality information for this location
profile.sources.#.name (string) The name of the source
loc.long (number) The longitude coordinate of the record.
loc.lat (number) The latitude coordinate of the record.
place.name (string) The place or nearest place to the record.
place.state (string) The state abbreviation in which the record is located. This may be null depending on the country.
place.country (string) The country abbreviation in which the record is located.
profile.tz (string) The timezone name association with the record's location.