Air Pollution API Documentaion

Air Pollution API is simple, fast and free for developers. To get access to Air Pollution API you need an API key whatever account you choose from Free to Enterprise.

How to get API key

Sign up to get unique API key.

How to use API key

General Information


The AirPollution API provides subscribers access to location based air pollution data via a simple RESTful web interface.

Access to the AirPollution API requires an API key. Please Sign up to get unique API key.

Do not send requests more then 1 time per 30 minutes from one device/one API key. Normally the AirPollution data is not changing so frequently.

Use the name of the server as api.airpollutionapi.com. Please never use the IP address of the server.

The AirPollution API provides subscribers access to location based air pollution data, User can use latitude and longitude to access air pollution data.

Request Parameters

Example of API call:
http://api.airpollutionapi.com/1.0/aqi?lat=28.7040590&lon=77.10249&APPID=1111111111
Description of API call:

http://api.airpollutionapi.com/1.0/aqi?lat={LATITUDE}&lon={LONGITUDE}&APPID={APIKEY}

APPID {APIKEY} is your unique API key
lat {LATITUDE} is the latitude of location
lon {LONGITUDE} is the longitude of location

Response Parameters

Example of API Response:

{
					  "status": "success",
					  "msg": null,
					  "data": {
					    "text": "Moderate",
					    "alert": "Moderate air quality index in this location. It may cause breathing discomfort to people with lung disease such as asthma, and discomfort to people with heart disease, children and older adults.",
					    "color": "#FFCF00;",
					    "value": 172,
					    "updated": "Sun Mar 18 12:30:07 +0000 2018",
					    "temp": "30",
					    "content": null,
					    "country": "India",
					    "clouds": "description = haze, image = http://airpollutionapi.com/images/icons/50d.png",
					    "coordinates": {
					      "latitude": 28.704059,
					      "longitude": 77.10249
					    },
					    "source": {
					      "name": "Bitspi, Pitampura Delhi",
					      "coordinates": {
					        "latitude": 28.69899839999999,
					        "longitude": 77.1384174
					      }
					    },
					    "accuracy": "3.55 Km",
					    "aqiParams": [
					      {
					        "name": "O3",
					        "value": "AQI 49",
					        "aqi": 49,
					        "color": "#79bc6a;",
					        "text": "Good"
					      },
					      {
					        "name": "PM2.5",
					        "value": "AQI 172",
					        "aqi": 172,
					        "color": "red",
					        "text": "Very poor"
					      },
					      {
					        "name": "PM10",
					        "value": "AQI 155",
					        "aqi": 155,
					        "color": "#FFCF00;",
					        "text": "Moderate"
					      },
					      {
					        "name": "Humidity",
					        "value": "19.0 %",
					        "aqi": null,
					        "color": null,
					        "text": null
					      },
					      {
					        "name": "Barometric Pressure",
					        "value": "1011.0 hPa",
					        "aqi": null,
					        "color": null,
					        "text": null
					      },
					      {
					        "name": "Wind Speed",
					        "value": " 11.41 m/s",
					        "aqi": null,
					        "color": null,
					        "text": null
					      },
					      {
					        "name": "Wind Direction",
					        "value": "300.0 degrees",
					        "aqi": null,
					        "color": null,
					        "text": null
					      },
					      {
					        "name": "Sun Rise",
					        "value": "06:27:38 AM",
					        "aqi": null,
					        "color": null,
					        "text": null
					      },
					      {
					        "name": "Sun Set",
					        "value": "06:31:53 PM",
					        "aqi": null,
					        "color": null,
					        "text": null
					      }
					    ]
					  }
					}
					

Description of Response:

Field

Description

Example Value

status The status of response. success or error
msg The error message Invalid APPID
text The AQI Level Severe, Very poor, Poor, Moderate or Good
alert The alert message Moderate air quality index in this location. It may cause breathing discomfort to people with lung disease such as asthma, and discomfort to people with heart disease, children and older adults.
color Hex Color Code or color name for levels of AQI #FFCF00; or red etc
value Air quality Index 172
updated Utc date time of measurement Sun Mar 18 12:30:07 +0000 2018
temp Temperature (℃) 30
content NA NA
country Country India
clouds Current Weather Info and image description = haze, image = http://airpollutionapi.com/images/icons/50d.png
accuracy Distance of location from station in Km. Minimum accuracy can be configured from "User Setting" to restrict low accuracy data. 3.55 Km
coordinates.latitude Latitude 28.704059
coordinates.longitude Longitude 77.10249
source.name Source station of data Bitspi, Pitampura Delhi
aqiParams.name Name of the parameter for AQI calculation PM2.5, PM10, O3, NO, NO2, Co etc
aqiParams.value Measured value of the parameter with unit 155.5 ug/m3 , AQI 172, 19%, 1011.0 hPa, 11.41 ms etc