{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"23f06c05-2811-4fd9-8fc7-26115d85b8b9","name":"AirVisual API","description":"Interested in using AirVisual's most comprehensive global air quality data for your own application? You are at the right place! Let's get you started.\n\nFirst of all, please refer to the [air quality API page on our website](https://www.iqair.com/commercial/air-quality-monitors/airvisual-platform/api), in order to get familiar with our plans and features.\n\nAt any moment, feel free to [contact us](https://www.iqair.com/support/contact-us) if you have any questions, would like to trial a particular plan, or any other inquiries. We are always happy to hear from you!\n\n# Get started\n\nThe only thing you need to start using our service is an API key, to obtain one for free please go to [this page](https://www.iqair.com/dashboard/api).\n\nOnce you have it, you need to put it everywhere you see the `{{YOUR_API_KEY}}` string, either directly throught Postman (recommended) using global variables, in your browser or any other system/language you may use.\n\n# HTTPS support\n\nAirVisual API now supports HTTPS! In order to enable this feature, just prefix your request with `https://...` instead of `http://...`\n\n# Important notes\n\n- Stations around the world have update cycles that are all different from each other.\n    \n- Stations are updated only once per hour.\n    \n- The API returns calculated AQI for each pollutant and for the station (main pollutant).\n    \n- The API returns 2 types of AQI: US AQI (EPA) and Chinese AQI.\n    \n- Stations may occasionally have updated information. For example, their GPS coordinates may be adjusted or their name changed. Make sure your system or apps support the station info updates.\n    \n- If a station doesn’t return pollution values, it means the data wasn’t published for that particular hour.\n    \n- Pollutants do not always have the same concentration units. Sometimes CO is reported in µg/m3 and sometimes in ppm. However, PM2.5 and PM10 are always reported in µg/m3.\n    \n\n# Return codes\n\nBelow are a few example of return codes you may get. This list is not exhaustive.\n\n- `success`: returned when JSON file was generated successfully.\n    \n- `call_limit_reached`: returned when minute/monthly limit is reached.\n    \n- `api_key_expired`: returned when API key is expired.\n    \n- `incorrect_api_key`: returned when using wrong API key.\n    \n- `ip_location_failed`: returned when service is unable to locate IP address of request.\n    \n- `no_nearest_station`: returned when there is no nearest station within specified radius.\n    \n- `feature_not_available`: returned when call requests a feature that is not available in chosen subscription plan.\n    \n- `too_many_requests`: returned when more than 10 calls per second are made.\n    \n\n# Detailed response example\n\n```\n{\n  \"status\": \"success\",\n  \"data\": {\n    \"name\": \"Eilat Harbor\",\n    \"city\": \"Eilat\",\n    \"state\": \"South District\",\n    \"country\": \"Israel\",\n    \"location\": {\n      \"type\": \"Point\",\n      \"coordinates\": [\n        34.939443,\n        29.531814\n      ]\n    },\n    \"forecasts\": [ //object containing forecast information\n      {\n        \"ts\": \"2017-02-01T03:00:00.000Z\", //timestamp\n        \"aqius\": 21, //AQI value based on US EPA standard\n        \"aqicn\": 7, //AQI value based on China MEP standard\n        \"tp\": 33, //temperature in Celsius\n        \"tp_min\": 33, //minimum temperature in Celsius\n        \"pr\": 976, //atmospheric pressure in hPa\n        \"hu\": 62, //humidity %\n        \"ws\": 3, //wind speed (m/s)\n        \"wd\": 313, //wind direction, as an angle of 360° (N=0, E=90, S=180, W=270)\n        \"ic\": \"10n\" //weather icon code, see below for icon index\n        \"pop\": 0, // probability of precipitation %\n        \"pm10\": 183.05,\n        \"pm25\": 66.96\n        \"conc\": 45.71, // concentration for pm25,we keep 2 decimals\n        \"heatIndex\": 40 // apparent temperature in Celsius, calculated from temperature and relative humidity, following https://www.wpc.ncep.noaa.gov/html/heatindex_equation.shtml \n      }, \n    … // contains more forecast data for upcoming 76 hours\n    ],\n    \"current\": {\n      \"weather\": {\n        \"ts\": \"2017-02-01T01:00:00.000Z\", //timestamp\n        \"tp\": 36, //temperature in Celsius\n        \"pr\": 1020, //atmospheric pressure in hPa\n        \"hu\": 38, //humidity %\n        \"ws\": 2, //wind speed (m/s)\n        \"wd\": 320, //wind direction, as an angle of 360° (N=0, E=90, S=180, W=270)\n        \"ic\": \"01n\", //weather icon code, see below for icon index\n        \"heatIndex\": 38 // apparent temperature in Celsius, calculated from temperature and relative humidity, following https://www.wpc.ncep.noaa.gov/html/heatindex_equation.shtml \n      },\n      \"pollution\": {\n        \"ts\": \"2017-02-01T01:15:00.000Z\", //timestamp\n        \"aqius\": 18, //AQI value based on US EPA standard\n        \"mainus\": \"p1\", //main pollutant for US AQI\n        \"aqicn\": 20, //AQI value based on China MEP standard\n        \"maincn\": \"p1\", //main pollutant for Chinese AQI\n        \"p1\": { //pollutant details, concentration and appropriate AQIs\n          \"conc\": 20,\n          \"aqius\": 18,\n          \"aqicn\": 20\n        }\n      }\n    },\n    \"forecasts_daily\": [\n      {\n        \"ts\": \"2025-08-06T00:00:00.000Z\",\n        \"tp\": 36,\n        \"tp_min\": 25,\n        \"pr\": 1002,\n        \"hu\": 47,\n        \"ws\": 2,\n        \"wd\": 347,\n        \"pop\": 80,\n        \"ic\": \"03d\",\n        \"heatIndex\": 41,\n        \"aqius\": 126,\n        \"aqicn\": 70\n      },\n      ... // contains more daily forecast data for next 7 days\n    ],\n    \"history\": { //object containing weather and pollution history information\n      \"weather\": [\n        {\n          \"ts\": \"2017-02-01T01:00:00.000Z\",\n          \"tp\": 12,\n          \"pr\": 1020,\n          \"hu\": 62,\n          \"ws\": 2,\n          \"wd\": 320,\n          \"ic\": \"01n\"\n        },\n        … // contains more weather historical data for past 48 hours\n      ]\n      \"pollution\": [\n        {\n          \"ts\": \"2017-02-01T01:15:00.000Z\",\n          \"aqius\": 18,\n          \"mainus\": \"p1\",\n          \"aqicn\": 20,\n          \"maincn\": \"p1\",\n          \"p1\": {\n            \"conc\": 20,\n            \"aqius\": 18,\n            \"aqicn\": 20\n          }\n        },\n      … // contains more pollution historical data for past 48 hours\n      ]\n    },\n    \"units\": { //object containing units information\n      \"p2\": \"ugm3\", //pm2.5\n      \"p1\": \"ugm3\", //pm10\n      \"o3\": \"ppb\", //Ozone O3\n      \"n2\": \"ppb\", //Nitrogen dioxide NO2 \n      \"s2\": \"ppb\", //Sulfur dioxide SO2 \n      \"co\": \"ppm\" //Carbon monoxide CO \n    }\n  }\n}\n\n ```\n\n**Weather icon index**\n\n| Description | Name | Icon |\n| --- | --- | --- |\n| clear sky (day) | 01d.png | <img src=\"https://airvisual.com/images/01d.png\" alt=\"\"> |\n| clear sky (night) | 01n.png | <img src=\"https://airvisual.com/images/01n.png\" alt=\"\"> |\n| few clouds (day) | 02d.png | <img src=\"https://airvisual.com/images/02d.png\" alt=\"\"> |\n| few clouds (night) | 02n.png | <img src=\"https://airvisual.com/images/02n.png\" alt=\"\"> |\n| scattered clouds | 03d.png | <img src=\"https://airvisual.com/images/03d.png\" alt=\"\"> |\n| broken clouds | 04d.png | <img src=\"https://airvisual.com/images/04d.png\" alt=\"\"> |\n| shower rain | 09d.png | <img src=\"https://airvisual.com/images/09d.png\" alt=\"\"> |\n| rain (day time) | 10d.png | <img src=\"https://airvisual.com/images/10d.png\" alt=\"\"> |\n| rain (night time) | 10n.png | <img src=\"https://airvisual.com/images/10n.png\" alt=\"\"> |\n| thunderstorm | 11d.png | <img src=\"https://airvisual.com/images/11d.png\" alt=\"\"> |\n| snow | 13d.png | <img src=\"https://airvisual.com/images/13d.png\" alt=\"\"> |\n| mist | 50d.png | <img src=\"https://airvisual.com/images/50d.png\" alt=\"\"> |\n\n# Changelog\n\n### Version 2.1.3 `08/09/2025`\n\n- Rename heat_index to heatIndex\n    \n\n### Version 2.1.2 `06/08/2025`\n\n- Now support heat index as a “felt temperature” for stations/cities as field “heatIndex”, calculated from temperature and relative humidity, following the definition from NOAA (U.S. National Oceanic and Atmospheric Administration).\n    \n\n### Version 2.1.1 `27/09/2017`\n\n- Now dynamically hides states/countries which have no active stations\n    \n- Deprecated `local_name` field.\n    \n\n### Version 2.1 `15/09/2017`\n\n- Moved documentation onto **Postman Docs** system.\n    \n- Added HTTPS support.\n    \n- Create new endpoint `countries`.\n    \n- Create new endpoint `states`.\n    \n- Create new endpoint`cities`.\n    \n- Create new endpoint`stations`.\n    \n- Create new endpoint`station` (startup api plan and above).\n    \n- Improve `city_ranking` endpoint.\n    \n\n### Version 2.0 `06/02/2017`\n\nConsolidates multiple API calls and provides better structure to API response.\n\nStructure is controlled by the subscription plan.\n\n- Create changelog\n    \n- Create new endpoint `nearest_city`.\n    \n- Create new endpoint `city`.\n    \n- Create new endpoint `nearest_station` (startup api plan and above).\n    \n- Create new endpoint `city_ranking` (enterprise only).","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"6466593","team":14158,"collectionId":"23f06c05-2811-4fd9-8fc7-26115d85b8b9","publishedId":"T1DmDyYs","public":true,"publicUrl":"https://api-docs.iqair.com","privateUrl":"https://go.postman.co/documentation/6466593-23f06c05-2811-4fd9-8fc7-26115d85b8b9","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.11.2","publishDate":"2020-12-16T08:25:56.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[{"name":"BusinessAPI Doc","id":"dbd5afa0-5bd3-4580-91c2-721dea772122","owner":"4420356","values":[{"key":"urlExternalAPI","value":"http://api.airvisual.com/","description":"","enabled":true}],"published":true}],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/768118b36f06c94b0306958b980558e6915839447e859fe16906e29d683976f0","favicon":"https://iqair.com/favicon.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"},{"label":"BusinessAPI Doc","value":"4420356-dbd5afa0-5bd3-4580-91c2-721dea772122"}],"canonicalUrl":"https://api-docs.iqair.com/view/metadata/T1DmDyYs"}