Air Quality

Air Quality API
Powered by MeteoGroup

Overview


MeteoGroup’s Air Quality API can provide pollution data for specific location. As an additional for UK it also provides pollen data.

How is the request processed?


Formatting a request to the Air Quality API is different than the Point-Forecast or Observation API.

To retrieve pollution or pollen data you have to provide geo location point by latitude and longitude.

The data is then processed and returned to you, formatted in the JSON format. This makes it easy to use in your business.

Formatting

Pollution


A sample request using the Air Quality API for pollution looks like this:
https://air-quality-forecast.weather.mg/pollution/search?locatedAt=-0.11,51.51&fields=airPollutionIndex,publishedAt

Returns air pollution forecasts for today + 4 days.


The returned data will be formatted in JSON, and will look like this:

    
            {
              "forecasts": [
                {
                  "period": "PT24H",
                  "validFrom": "2017-05-10T00:00:00+01:00",
                  "validUntil": "2017-05-11T00:00:00+01:00",
                  "forecastLocation": [ -0.1248, 51.5081 ],
                  "airPollutionIndex": 3,
                  "publishedAt": "2017-05-10T06:00:00+01:00"
                },
                {
                  "period": "PT24H",
                  "validFrom": "2017-05-11T00:00:00+01:00",
                  "validUntil": "2017-05-12T00:00:00+01:00",
                  "forecastLocation": [ -0.1248, 51.5081 ],
                  "airPollutionIndex": 5,
                  "publishedAt": "2017-05-10T06:00:00+01:00"
                },
                {
                  "period": "PT24H",
                  "validFrom": "2017-05-12T00:00:00+01:00",
                  "validUntil": "2017-05-13T00:00:00+01:00",
                  "forecastLocation": [ -0.1248, 51.5081 ],
                  "airPollutionIndex": 3,
                  "publishedAt": "2017-05-10T06:00:00+01:00"
                },
                {
                  "period": "PT24H",
                  "validFrom": "2017-05-13T00:00:00+01:00",
                  "validUntil": "2017-05-14T00:00:00+01:00",
                  "forecastLocation": [ -0.1248, 51.5081 ],
                  "airPollutionIndex": 3,
                  "publishedAt": "2017-05-10T06:00:00+01:00"
                },
                {
                  "period": "PT24H",
                  "validFrom": "2017-05-14T00:00:00+01:00",
                  "validUntil": "2017-05-15T00:00:00+01:00",
                  "forecastLocation": [ -0.1248, 51.5081 ],
                  "airPollutionIndex": 3,
                  "publishedAt": "2017-05-10T06:00:00+01:00"
                }
              ]
            }
    

Pollen


Pollen forecast available only on United Kingdom. When you try querying outside UK, you are receive response with status code 400 Bad Request.

Available pollen forecast separated on 16 regions. The pollenForecastRegion and pollenForecastRegionName parameters refers on table, see below:

IdName
DGSW Scotland, Lothian Borders
EEEast of England
EMEast Midlands
GRGrampian
HEHighlands & Eilean Siar
NENorth East England
NINorthern Ireland
NWNorth West England
OSOrkney & Shetland
SELondon & South East England
STStrathclyde
SWSouth West England
TACentral, Tayside & Fife
WLWales
WMWest Midlands
YHYorkshire & Humber


The pollenIndex parameters can be one of the following levels: Low, Moderate, High, Veryhigh

A sample request using the Air Quality API for pollen looks like this:
https://air-quality-forecast.weather.mg/pollen/search?locatedAt=-0.11,51.51&fields=pollenForecastRegionName,issuedAt,pollenIndex

Returns polen forecasts for today + 4 days.


The returned data will be formatted in JSON, and will look like this:

    
            {
              "forecasts": [
                {
                  "period": "PT24H",
                  "validFrom": "2017-05-10T00:00:00+01:00",
                  "validUntil": "2017-05-11T00:00:00+01:00",
                  "pollenForecastRegion": "SE",
                  "pollenForecastRegionName": "London & South East England",
                  "pollenIndex": "Moderate",
                  "issuedAt": "2017-05-10T05:45:57+01:00"
                },
                {
                  "period": "PT24H",
                  "validFrom": "2017-05-11T00:00:00+01:00",
                  "validUntil": "2017-05-12T00:00:00+01:00",
                  "pollenForecastRegion": "SE",
                  "pollenForecastRegionName": "London & South East England",
                  "pollenIndex": "Moderate",
                  "issuedAt": "2017-05-10T05:45:57+01:00"
                },
                {
                  "period": "PT24H",
                  "validFrom": "2017-05-12T00:00:00+01:00",
                  "validUntil": "2017-05-13T00:00:00+01:00",
                  "pollenForecastRegion": "SE",
                  "pollenForecastRegionName": "London & South East England",
                  "pollenIndex": "Moderate",
                  "issuedAt": "2017-05-10T05:45:57+01:00"
                },
                {
                  "period": "PT24H",
                  "validFrom": "2017-05-13T00:00:00+01:00",
                  "validUntil": "2017-05-14T00:00:00+01:00",
                  "pollenForecastRegion": "SE",
                  "pollenForecastRegionName": "London & South East England",
                  "pollenIndex": "Moderate",
                  "issuedAt": "2017-05-10T05:45:57+01:00"
                },
                {
                  "period": "PT24H",
                  "validFrom": "2017-05-14T00:00:00+01:00",
                  "validUntil": "2017-05-15T00:00:00+01:00",
                  "pollenForecastRegion": "SE",
                  "pollenForecastRegionName": "London & South East England",
                  "pollenIndex": "Moderate",
                  "issuedAt": "2017-05-10T05:45:57+01:00"
                }
              ]
            }
    

Authentication


All endpoints are secured using OAuth2 authorization protocol with transmitting data over HTTPS. The authorization flows are described here: authorization flow

For detailed instructions on how to obtain the necessary authorization information, please refer to the technical documentation on GitHub.

Nitty-Gritty


For more detailed information on this API, check us out on GitHub.