Air Quality Data for Integrators
… data and APIs to make applications eco-sensitive
… data and APIs to make applications eco-sensitive
The Realtime API offers an estimate of air pollution values for any location within Germany. There is one endpoint for each type of pollution. Currently requests for single points are supported (see Requests, below) with support for more complex geometries (e.g. polygons) coming soon. Details on how to test requests to the API are also detailed below under Requests.
Returns Nitrogen Dioxide value at the geometry specified in the request, returning a decimal value in the standard response format.
Returns realtime Ozone value at the geometry specified in the request, returning a decimal value in the standard response format.
Returns realtime Particulate Matter (<10μm) value at the geometry specified in the request, returning a decimal value in the standard response format.
Returns realtime Particulate Matter (<2.5μm) value at the geometry specified in the request, returning a decimal value in the standard response format.
Requests are HTTP POST requests using Content-Type of application/json in the header and an Authorization header of your allotted API key. The JSON body should look like this for a single point request:
{ "latitude": 53.4, "longitude": -6.2 }
Otherwise the JSON body should be a standard GeoJSON feature (excluding Multi* features). An example request using the curl command (note that you will need supply your own API key and use the prefix URL provided to you instead of api.svc.hawadawa.com):
curl --header "Content-Type: application/json" --header "Authorization: eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee" --request POST --data '{"latitude":48.1, "longitude":11.5}' https://api.svc.hawadawa.com/realtime/no2
The response is also in JSON and provides the value and unit at the requested location together with attribution information, e.g.:
{ "value": 37.42, "attribution": "Uses data from this source, 2020", "unit": "μg/m³" }