Loading
Loading
Monitor and forecast air quality anywhere in the world with APIFreaks’ Air Quality API. This API provides real-time and hourly forecasted AQI data, delivering key pollutants — PM₂.₅, PM₁₀, CO₂, NO₂, SO₂, dust, as well as UV index and regional AQI standards (US & EU) — in a comprehensive response for any city, coordinates, or IP-based location.
By default, the API returns current Air Quality, and when a date range is provided, it switches to forecast mode for up to 6 days, enabling developers to build predictive monitoring and alert systems.
Designed for environmental apps, health advisories, and smart home dashboards, the Air Quality API gives fast, reliable, and actionable air pollution intelligence for developers and data-driven platforms.
Fetch AQI and pollution data for any city, coordinate, or IP address worldwide — real-time or forecasted.
Instantly get current AQI readings or forecast air pollution data for up to 6 days, with hourly precision.
Access key air quality parameters including PM₁₀, PM₂.₅, CO₂, NO₂, SO₂, dust levels, and more.
Includes both UV Index and Air Quality Index (AQI) standards, supporting US and EU AQI scales.
Each response includes complete geographic context with continent, country, state/province, district, city, locality, postal code, precise coordinates, elevation data, and timezone information.
$ pip install requestsimport requests
url = "https://api.apifreaks.com/v1.0/weather/air-quality"
payload = {}
headers = {
'X-apiKey': 'API-KEY'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
To fetch the current Air Quality data, simply call the endpoint with a location name, coordinates, or IP address.
Use the location parameter to look up Air Quality weather by any location — city name, address etc.
# Response { "location": { "location_string": "Tokyo,Japan", "country_name": "Japan", "state_prov": "", "city": "Tokyo", "locality": "", "latitude": "35.68219", "longitude": "139.76222", "elevation": "0", "timezone": "Asia/Tokyo", "timezone_abbreviation": "GMT+9" }, "current": { "timestamp": "2025-11-11T00:00", "european_aqi": 67, "us_aqi": 96, "pm10": 23.5, "pm2_5": 22.9, "carbon_monoxide": 178, "nitrogen_dioxide": 47.6, "sulphur_dioxide": 19.7, "ozone": 19, "dust": 0, "uv_index": 0, "aerosol_optical_depth": 0.09, "uv_index_clear_sky": 0 } }curl -X 'GET' 'https://api.apifreaks.com/v1.0/weather/air-quality?location=Tokyo,Japan&apiKey=API-KEY'
Use the lat and long parameters to retrieve Air Quality conditions for any point on Earth.
# Response { "location": { "latitude": "34.05220", "longitude": "-118.24370", "country_name": "", "state_prov": "California", "city": "Los Angeles", "locality": "", "elevation": "89", "timezone": "America/Los_Angeles", "timezone_abbreviation": "GMT-8" }, "current": { "timestamp": "2025-11-10T07:00", "european_aqi": 58, "us_aqi": 77, "pm10": 21, "pm2_5": 20.9, "carbon_monoxide": 508, "nitrogen_dioxide": 45.3, "sulphur_dioxide": 8.7, "ozone": 3, "dust": 0, "uv_index": 0.2, "aerosol_optical_depth": 0.07, "uv_index_clear_sky": 0.2 } }curl -X 'GET' 'https://api.apifreaks.com/v1.0/weather/air-quality?lat=34.0522&long=-118.2437&apiKey=API-KEY'
Use the ip parameter to display Air Quality information at specific network locations.
# Response { "location": { "continent_code": "NA", "continent_name": "North America", "country_code2": "US", "country_code3": "USA", "country_name": "United States", "country_name_official": "United States of America", "is_eu": false, "state_prov": "California", "state_code": "US-CA", "district": "Santa Clara", "city": "Mountain View", "zipcode": "94043-1351", "latitude": "37.42240", "longitude": "-122.08421", "locality": "Charleston Terrace", "elevation": "3", "timezone": "America/Los_Angeles", "timezone_abbreviation": "GMT-8" }, "current": { "timestamp": "2025-11-10T07:00", "european_aqi": 32, "us_aqi": 58, "pm10": 18.9, "pm2_5": 18.5, "carbon_monoxide": 318, "nitrogen_dioxide": 43.2, "sulphur_dioxide": 3.3, "ozone": 9, "dust": 1, "uv_index": 0.05, "aerosol_optical_depth": 0.06, "uv_index_clear_sky": 0.05 } }curl -X 'GET' https://api.apifreaks.com/v1.0/weather/air-quality?ip=8.8.8.8&apiKey=API-KEY'
If no location parameters are provided, the API defaults to returning real-time AQI data for the user’s detected IP.
# Response { "location": { "continent_code": "AS", "continent_name": "Asia", "country_code2": "PK", "country_code3": "PAK", "country_name": "Pakistan", "country_name_official": "Islamic Republic of Pakistan", "is_eu": false, "state_prov": "Punjab", "state_code": "PK-PB", "district": "Lahore", "city": "Lahore", "zipcode": "54000", "latitude": "31.52037", "longitude": "74.35875", "locality": "Gulberg", "elevation": "", "timezone": "Asia/Karachi", "timezone_abbreviation": "GMT+5" }, "current": { "timestamp": "2025-11-10T20:00", "european_aqi": 99, "us_aqi": 159, "pm10": 91.7, "pm2_5": 90.6, "carbon_monoxide": 6361, "nitrogen_dioxide": 101, "sulphur_dioxide": 20.9, "ozone": 24, "dust": 2, "uv_index": 0, "aerosol_optical_depth": 0.31, "uv_index_clear_sky": 0 } }curl -X 'GET' 'https://api.apifreaks.com/v1.0/weather/air-quality?apiKey=API-KEY'
When you include a date range using startDate and endDate , the API switches to forecast mode and provides hourly air pollution forecasts.
To get the air quality forecast, provide the location along with startDate and endDate. The date range must not exceed 6 days.
# Response { "location": { "location_string": "Paris, France", "country_name": "France", "state_prov": "Ile-de-France", "city": "Paris", "locality": "", "latitude": "48.85889", "longitude": "2.32004", "elevation": "0", "timezone": "Europe/Paris", "timezone_abbreviation": "GMT+1" }, "forecast": { "2025-11-10": { "hourly": [ { "timestamp": "2025-11-10T00:00", "pm10": 13.7, "carbon_monoxide": 213, "pm2_5": 10.5, "carbon_dioxide": 474, "nitrogen_dioxide": 27.6, "sulphur_dioxide": 1.7, "ozone": 40, "dust": 0, "uv_index": 0, "aerosol_optical_depth": 0.11, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-10T01:00", "pm10": 14, "carbon_monoxide": 195, "pm2_5": 11.4, "carbon_dioxide": 467, "nitrogen_dioxide": 21, "sulphur_dioxide": 1.4, "ozone": 35, "dust": 0, "uv_index": 0, "aerosol_optical_depth": 0.12, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-10T02:00", "pm10": 12.8, "carbon_monoxide": 182, "pm2_5": 9.6, "carbon_dioxide": 464, "nitrogen_dioxide": 16.6, "sulphur_dioxide": 1.5, "ozone": 42, "dust": 0, "uv_index": 0, "aerosol_optical_depth": 0.14, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-10T03:00", "pm10": 12.2, "carbon_monoxide": 179, "pm2_5": 10.1, "carbon_dioxide": 462, "nitrogen_dioxide": 13.8, "sulphur_dioxide": 1.5, "ozone": 42, "dust": 0, "uv_index": 0, "aerosol_optical_depth": 0.16, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-10T04:00", "pm10": 12.3, "carbon_monoxide": 180, "pm2_5": 10.9, "carbon_dioxide": 461, "nitrogen_dioxide": 12.1, "sulphur_dioxide": 1.3, "ozone": 43, "dust": 0, "uv_index": 0, "aerosol_optical_depth": 0.17, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-10T05:00", "pm10": 12.3, "carbon_monoxide": 177, "pm2_5": 10.2, "carbon_dioxide": 462, "nitrogen_dioxide": 13.9, "sulphur_dioxide": 1.3, "ozone": 42, "dust": 0, "uv_index": 0, "aerosol_optical_depth": 0.14, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-10T06:00", "pm10": 11.6, "carbon_monoxide": 175, "pm2_5": 10, "carbon_dioxide": 463, "nitrogen_dioxide": 17.2, "sulphur_dioxide": 1.9, "ozone": 30, "dust": 0, "uv_index": 0, "aerosol_optical_depth": 0.1, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-10T07:00", "pm10": 12, "carbon_monoxide": 214, "pm2_5": 10.3, "carbon_dioxide": 465, "nitrogen_dioxide": 30.6, "sulphur_dioxide": 3.3, "ozone": 19, "dust": 0, "uv_index": 0, "aerosol_optical_depth": 0.09, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-10T08:00", "pm10": 12.5, "carbon_monoxide": 262, "pm2_5": 10.5, "carbon_dioxide": 467, "nitrogen_dioxide": 41.1, "sulphur_dioxide": 3.8, "ozone": 7, "dust": 0, "uv_index": 0, "aerosol_optical_depth": 0.1, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-10T09:00", "pm10": 12.1, "carbon_monoxide": 259, "pm2_5": 10.3, "carbon_dioxide": 469, "nitrogen_dioxide": 41.4, "sulphur_dioxide": 4.5, "ozone": 11, "dust": 0, "uv_index": 0.25, "aerosol_optical_depth": 0.12, "uv_index_clear_sky": 0.25 }, { "timestamp": "2025-11-10T10:00", "pm10": 12.3, "carbon_monoxide": 252, "pm2_5": 9.8, "carbon_dioxide": 470, "nitrogen_dioxide": 34, "sulphur_dioxide": 3.5, "ozone": 20, "dust": 0, "uv_index": 0.6, "aerosol_optical_depth": 0.12, "uv_index_clear_sky": 0.7 }, { "timestamp": "2025-11-10T11:00", "pm10": 11.8, "carbon_monoxide": 229, "pm2_5": 8.7, "carbon_dioxide": 468, "nitrogen_dioxide": 26.7, "sulphur_dioxide": 2.8, "ozone": 32, "dust": 0, "uv_index": 0.95, "aerosol_optical_depth": 0.12, "uv_index_clear_sky": 1.15 }, { "timestamp": "2025-11-10T12:00", "pm10": 10.5, "carbon_monoxide": 213, "pm2_5": 8.2, "carbon_dioxide": 464, "nitrogen_dioxide": 23, "sulphur_dioxide": 2.3, "ozone": 40, "dust": 0, "uv_index": 1.1, "aerosol_optical_depth": 0.13, "uv_index_clear_sky": 1.45 }, { "timestamp": "2025-11-10T13:00", "pm10": 9.3, "carbon_monoxide": 209, "pm2_5": 7, "carbon_dioxide": 460, "nitrogen_dioxide": 22, "sulphur_dioxide": 1.9, "ozone": 47, "dust": 0, "uv_index": 0.95, "aerosol_optical_depth": 0.13, "uv_index_clear_sky": 1.45 }, { "timestamp": "2025-11-10T14:00", "pm10": 9.3, "carbon_monoxide": 194, "pm2_5": 6.8, "carbon_dioxide": 457, "nitrogen_dioxide": 22.5, "sulphur_dioxide": 1.9, "ozone": 47, "dust": 0, "uv_index": 0.6, "aerosol_optical_depth": 0.1, "uv_index_clear_sky": 1.1 }, { "timestamp": "2025-11-10T15:00", "pm10": 10.1, "carbon_monoxide": 193, "pm2_5": 6.4, "carbon_dioxide": 454, "nitrogen_dioxide": 20.3, "sulphur_dioxide": 1.8, "ozone": 49, "dust": 0, "uv_index": 0.3, "aerosol_optical_depth": 0.09, "uv_index_clear_sky": 0.6 }, { "timestamp": "2025-11-10T16:00", "pm10": 9.1, "carbon_monoxide": 198, "pm2_5": 6.4, "carbon_dioxide": 453, "nitrogen_dioxide": 23.3, "sulphur_dioxide": 1.5, "ozone": 46, "dust": 0, "uv_index": 0.1, "aerosol_optical_depth": 0.1, "uv_index_clear_sky": 0.2 }, { "timestamp": "2025-11-10T17:00", "pm10": 7.5, "carbon_monoxide": 207, "pm2_5": 6.7, "carbon_dioxide": 454, "nitrogen_dioxide": 26.2, "sulphur_dioxide": 1.4, "ozone": 45, "dust": 0, "uv_index": 0, "aerosol_optical_depth": 0.1, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-10T18:00", "pm10": 8.1, "carbon_monoxide": 217, "pm2_5": 7.4, "carbon_dioxide": 457, "nitrogen_dioxide": 34.6, "sulphur_dioxide": 1.5, "ozone": 36, "dust": 0, "uv_index": 0, "aerosol_optical_depth": 0.07, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-10T19:00", "pm10": 9.4, "carbon_monoxide": 223, "pm2_5": 7.3, "carbon_dioxide": 460, "nitrogen_dioxide": 38.2, "sulphur_dioxide": 1.9, "ozone": 36, "dust": 0, "uv_index": 0, "aerosol_optical_depth": 0.07, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-10T20:00", "pm10": 9.2, "carbon_monoxide": 193, "pm2_5": 7.7, "carbon_dioxide": 462, "nitrogen_dioxide": 35.2, "sulphur_dioxide": 2.4, "ozone": 33, "dust": 0, "uv_index": 0, "aerosol_optical_depth": 0.07, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-10T21:00", "pm10": 9.2, "carbon_monoxide": 191, "pm2_5": 8.4, "carbon_dioxide": 463, "nitrogen_dioxide": 31.4, "sulphur_dioxide": 2.7, "ozone": 36, "dust": 0, "uv_index": 0, "aerosol_optical_depth": 0.07, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-10T22:00", "pm10": 9.5, "carbon_monoxide": 182, "pm2_5": 7.2, "carbon_dioxide": 463, "nitrogen_dioxide": 27.5, "sulphur_dioxide": 2.5, "ozone": 44, "dust": 0, "uv_index": 0, "aerosol_optical_depth": 0.07, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-10T23:00", "pm10": 9.4, "carbon_monoxide": 177, "pm2_5": 7.7, "carbon_dioxide": 460, "nitrogen_dioxide": 22.2, "sulphur_dioxide": 2, "ozone": 50, "dust": 0, "uv_index": 0, "aerosol_optical_depth": 0.07, "uv_index_clear_sky": 0 } ] }, "2025-11-11": { "hourly": [ { "timestamp": "2025-11-11T00:00", "pm10": 8.6, "carbon_monoxide": 169, "pm2_5": 7.1, "carbon_dioxide": 455, "nitrogen_dioxide": 15.7, "sulphur_dioxide": 1.3, "ozone": 48, "dust": 0, "uv_index": 0, "aerosol_optical_depth": 0.07, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-11T01:00", "pm10": 8.9, "carbon_monoxide": 158, "pm2_5": 5.9, "carbon_dioxide": 452, "nitrogen_dioxide": 12, "sulphur_dioxide": 1.2, "ozone": 49, "dust": 0, "uv_index": 0, "aerosol_optical_depth": 0.07, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-11T02:00", "pm10": 8.8, "carbon_monoxide": 149, "pm2_5": 5.8, "carbon_dioxide": 451, "nitrogen_dioxide": 8.9, "sulphur_dioxide": 1.1, "ozone": 53, "dust": 0, "uv_index": 0, "aerosol_optical_depth": 0.08, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-11T03:00", "pm10": 9.1, "carbon_monoxide": 149, "pm2_5": 5.7, "carbon_dioxide": 451, "nitrogen_dioxide": 8.1, "sulphur_dioxide": 1.1, "ozone": 52, "dust": 0, "uv_index": 0, "aerosol_optical_depth": 0.09, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-11T04:00", "pm10": 9.1, "carbon_monoxide": 149, "pm2_5": 5.9, "carbon_dioxide": 452, "nitrogen_dioxide": 8, "sulphur_dioxide": 1, "ozone": 47, "dust": 0, "uv_index": 0, "aerosol_optical_depth": 0.11, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-11T05:00", "pm10": 9.2, "carbon_monoxide": 152, "pm2_5": 6.3, "carbon_dioxide": 454, "nitrogen_dioxide": 10, "sulphur_dioxide": 0.8, "ozone": 44, "dust": 0, "uv_index": 0, "aerosol_optical_depth": 0.12, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-11T06:00", "pm10": 10.7, "carbon_monoxide": 152, "pm2_5": 7.5, "carbon_dioxide": 457, "nitrogen_dioxide": 13, "sulphur_dioxide": 1.1, "ozone": 39, "dust": 0, "uv_index": 0, "aerosol_optical_depth": 0.12, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-11T07:00", "pm10": 11.5, "carbon_monoxide": 187, "pm2_5": 8.5, "carbon_dioxide": 459, "nitrogen_dioxide": 22.8, "sulphur_dioxide": 1.8, "ozone": 27, "dust": 0, "uv_index": 0, "aerosol_optical_depth": 0.13, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-11T08:00", "pm10": 13.2, "carbon_monoxide": 230, "pm2_5": 9.2, "carbon_dioxide": 459, "nitrogen_dioxide": 40.1, "sulphur_dioxide": 2.4, "ozone": 17, "dust": 0, "uv_index": 0, "aerosol_optical_depth": 0.13, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-11T09:00", "pm10": 12.2, "carbon_monoxide": 223, "pm2_5": 8.6, "carbon_dioxide": 459, "nitrogen_dioxide": 45.8, "sulphur_dioxide": 2.8, "ozone": 19, "dust": 0, "uv_index": 0.1, "aerosol_optical_depth": 0.12, "uv_index_clear_sky": 0.25 }, { "timestamp": "2025-11-11T10:00", "pm10": 12, "carbon_monoxide": 218, "pm2_5": 8, "carbon_dioxide": 457, "nitrogen_dioxide": 35.4, "sulphur_dioxide": 2.7, "ozone": 31, "dust": 0, "uv_index": 0.3, "aerosol_optical_depth": 0.12, "uv_index_clear_sky": 0.6 }, { "timestamp": "2025-11-11T11:00", "pm10": 10.5, "carbon_monoxide": 197, "pm2_5": 7.3, "carbon_dioxide": 454, "nitrogen_dioxide": 25, "sulphur_dioxide": 2.1, "ozone": 42, "dust": 0, "uv_index": 0.55, "aerosol_optical_depth": 0.12, "uv_index_clear_sky": 1.05 }, { "timestamp": "2025-11-11T12:00", "pm10": 9.8, "carbon_monoxide": 189, "pm2_5": 6.9, "carbon_dioxide": 450, "nitrogen_dioxide": 21.7, "sulphur_dioxide": 1.8, "ozone": 45, "dust": 0, "uv_index": 0.8, "aerosol_optical_depth": 0.12, "uv_index_clear_sky": 1.35 }, { "timestamp": "2025-11-11T13:00", "pm10": 10.1, "carbon_monoxide": 182, "pm2_5": 6.7, "carbon_dioxide": 448, "nitrogen_dioxide": 19, "sulphur_dioxide": 1.6, "ozone": 52, "dust": 0, "uv_index": 0.95, "aerosol_optical_depth": 0.12, "uv_index_clear_sky": 1.3 }, { "timestamp": "2025-11-11T14:00", "pm10": 10, "carbon_monoxide": 177, "pm2_5": 6.3, "carbon_dioxide": 449, "nitrogen_dioxide": 15, "sulphur_dioxide": 1.6, "ozone": 59, "dust": 0, "uv_index": 0.9, "aerosol_optical_depth": 0.1, "uv_index_clear_sky": 1 }, { "timestamp": "2025-11-11T15:00", "pm10": 9.4, "carbon_monoxide": 174, "pm2_5": 6.8, "carbon_dioxide": 452, "nitrogen_dioxide": 16, "sulphur_dioxide": 1.6, "ozone": 60, "dust": 0, "uv_index": 0.6, "aerosol_optical_depth": 0.08, "uv_index_clear_sky": 0.6 }, { "timestamp": "2025-11-11T16:00", "pm10": 10.5, "carbon_monoxide": 182, "pm2_5": 7, "carbon_dioxide": 455, "nitrogen_dioxide": 19.7, "sulphur_dioxide": 1.7, "ozone": 56, "dust": 0, "uv_index": 0.2, "aerosol_optical_depth": 0.07, "uv_index_clear_sky": 0.2 }, { "timestamp": "2025-11-11T17:00", "pm10": 12.1, "carbon_monoxide": 217, "pm2_5": 8.1, "carbon_dioxide": 459, "nitrogen_dioxide": 31, "sulphur_dioxide": 2.2, "ozone": 44, "dust": 0, "uv_index": 0, "aerosol_optical_depth": 0.07, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-11T18:00", "pm10": 13.6, "carbon_monoxide": 240, "pm2_5": 10.1, "carbon_dioxide": 463, "nitrogen_dioxide": 48.3, "sulphur_dioxide": 2.8, "ozone": 33, "dust": 0, "uv_index": 0, "aerosol_optical_depth": 0.07, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-11T19:00", "pm10": 14.8, "carbon_monoxide": 261, "pm2_5": 11.6, "carbon_dioxide": 466, "nitrogen_dioxide": 50.9, "sulphur_dioxide": 3.1, "ozone": 30, "dust": 0, "uv_index": 0, "aerosol_optical_depth": 0.07, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-11T20:00", "pm10": 14.6, "carbon_monoxide": 223, "pm2_5": 11.4, "carbon_dioxide": 465, "nitrogen_dioxide": 43.5, "sulphur_dioxide": 3, "ozone": 29, "dust": 0, "uv_index": 0, "aerosol_optical_depth": 0.07, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-11T21:00", "pm10": 13, "carbon_monoxide": 212, "pm2_5": 9.8, "carbon_dioxide": 463, "nitrogen_dioxide": 36.4, "sulphur_dioxide": 3, "ozone": 37, "dust": 0, "uv_index": 0, "aerosol_optical_depth": 0.07, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-11T22:00", "pm10": 11.7, "carbon_monoxide": 203, "pm2_5": 9.7, "carbon_dioxide": 460, "nitrogen_dioxide": 33, "sulphur_dioxide": 3.7, "ozone": 32, "dust": 0, "uv_index": 0, "aerosol_optical_depth": 0.07, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-11T23:00", "pm10": 10.8, "carbon_monoxide": 198, "pm2_5": 9.9, "carbon_dioxide": 457, "nitrogen_dioxide": 28.1, "sulphur_dioxide": 3.4, "ozone": 32, "dust": 0, "uv_index": 0, "aerosol_optical_depth": 0.07, "uv_index_clear_sky": 0 } ] } } }curl -s -X GET "https://api.apifreaks.com/v1.0/weather/air-quality?location=Paris,%20France&startDate=2025-11-10&endDate=2025-11-11&apiKey=API-KEY"'
If no location parameters are provided, the API defaults to returning Air Quality Forecast Data for the user’s detected IP.
# Response { "location": { "continent_code": "AS", "continent_name": "Asia", "country_code2": "PK", "country_code3": "PAK", "country_name": "Pakistan", "country_name_official": "Islamic Republic of Pakistan", "is_eu": false, "state_prov": "Punjab", "state_code": "PK-PB", "district": "Lahore", "city": "Lahore", "zipcode": "54000", "latitude": "31.52037", "longitude": "74.35875", "locality": "Gulberg", "elevation": "", "timezone": "Asia/Karachi", "timezone_abbreviation": "GMT+5" }, "forecast": { "2025-11-10": { "hourly": [ { "timestamp": "2025-11-10T00:00", "pm10": 90.6, "carbon_monoxide": 3765, "pm2_5": 89.6, "carbon_dioxide": 483, "nitrogen_dioxide": 86.8, "sulphur_dioxide": 15, "ozone": 16, "dust": 1, "uv_index": 0, "aerosol_optical_depth": 0.25, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-10T01:00", "pm10": 91.7, "carbon_monoxide": 3595, "pm2_5": 90.8, "carbon_dioxide": 486, "nitrogen_dioxide": 78.6, "sulphur_dioxide": 14, "ozone": 19, "dust": 2, "uv_index": 0, "aerosol_optical_depth": 0.25, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-10T02:00", "pm10": 92, "carbon_monoxide": 3341, "pm2_5": 90.8, "carbon_dioxide": 486, "nitrogen_dioxide": 70.7, "sulphur_dioxide": 13.2, "ozone": 22, "dust": 2, "uv_index": 0, "aerosol_optical_depth": 0.25, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-10T03:00", "pm10": 92.2, "carbon_monoxide": 2791, "pm2_5": 91, "carbon_dioxide": 481, "nitrogen_dioxide": 62.7, "sulphur_dioxide": 12.6, "ozone": 24, "dust": 2, "uv_index": 0, "aerosol_optical_depth": 0.25, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-10T04:00", "pm10": 91.5, "carbon_monoxide": 2158, "pm2_5": 90.3, "carbon_dioxide": 474, "nitrogen_dioxide": 54.8, "sulphur_dioxide": 12.2, "ozone": 26, "dust": 2, "uv_index": 0, "aerosol_optical_depth": 0.26, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-10T05:00", "pm10": 96.9, "carbon_monoxide": 2079, "pm2_5": 95.9, "carbon_dioxide": 472, "nitrogen_dioxide": 57.9, "sulphur_dioxide": 12.2, "ozone": 17, "dust": 2, "uv_index": 0, "aerosol_optical_depth": 0.29, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-10T06:00", "pm10": 100.1, "carbon_monoxide": 3231, "pm2_5": 99, "carbon_dioxide": 483, "nitrogen_dioxide": 62.6, "sulphur_dioxide": 13, "ozone": 12, "dust": 2, "uv_index": 0, "aerosol_optical_depth": 0.29, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-10T07:00", "pm10": 109.9, "carbon_monoxide": 4936, "pm2_5": 108.7, "carbon_dioxide": 499, "nitrogen_dioxide": 68.4, "sulphur_dioxide": 14.1, "ozone": 8, "dust": 2, "uv_index": 0.15, "aerosol_optical_depth": 0.28, "uv_index_clear_sky": 0.15 }, { "timestamp": "2025-11-10T08:00", "pm10": 115.3, "carbon_monoxide": 5803, "pm2_5": 114.1, "carbon_dioxide": 506, "nitrogen_dioxide": 67.3, "sulphur_dioxide": 15.7, "ozone": 18, "dust": 2, "uv_index": 0.75, "aerosol_optical_depth": 0.27, "uv_index_clear_sky": 0.75 }, { "timestamp": "2025-11-10T09:00", "pm10": 97.8, "carbon_monoxide": 4991, "pm2_5": 96.9, "carbon_dioxide": 495, "nitrogen_dioxide": 52.9, "sulphur_dioxide": 18.1, "ozone": 57, "dust": 2, "uv_index": 1.85, "aerosol_optical_depth": 0.26, "uv_index_clear_sky": 1.85 }, { "timestamp": "2025-11-10T10:00", "pm10": 73.8, "carbon_monoxide": 3339, "pm2_5": 72.6, "carbon_dioxide": 476, "nitrogen_dioxide": 31.7, "sulphur_dioxide": 21, "ozone": 110, "dust": 2, "uv_index": 3.1, "aerosol_optical_depth": 0.27, "uv_index_clear_sky": 3.1 }, { "timestamp": "2025-11-10T11:00", "pm10": 47, "carbon_monoxide": 1978, "pm2_5": 45.8, "carbon_dioxide": 460, "nitrogen_dioxide": 15.4, "sulphur_dioxide": 22.7, "ozone": 152, "dust": 2, "uv_index": 3.95, "aerosol_optical_depth": 0.28, "uv_index_clear_sky": 3.95 }, { "timestamp": "2025-11-10T12:00", "pm10": 38.6, "carbon_monoxide": 1262, "pm2_5": 37.5, "carbon_dioxide": 452, "nitrogen_dioxide": 7.1, "sulphur_dioxide": 22.4, "ozone": 173, "dust": 2, "uv_index": 4, "aerosol_optical_depth": 0.29, "uv_index_clear_sky": 4 }, { "timestamp": "2025-11-10T13:00", "pm10": 35.3, "carbon_monoxide": 837, "pm2_5": 34.1, "carbon_dioxide": 447, "nitrogen_dioxide": 3.7, "sulphur_dioxide": 20.9, "ozone": 181, "dust": 2, "uv_index": 3.3, "aerosol_optical_depth": 0.31, "uv_index_clear_sky": 3.3 }, { "timestamp": "2025-11-10T14:00", "pm10": 34.6, "carbon_monoxide": 763, "pm2_5": 33.3, "carbon_dioxide": 446, "nitrogen_dioxide": 7.4, "sulphur_dioxide": 19.7, "ozone": 178, "dust": 2, "uv_index": 2.1, "aerosol_optical_depth": 0.31, "uv_index_clear_sky": 2.1 }, { "timestamp": "2025-11-10T15:00", "pm10": 34.1, "carbon_monoxide": 1116, "pm2_5": 32.8, "carbon_dioxide": 449, "nitrogen_dioxide": 22.1, "sulphur_dioxide": 19, "ozone": 158, "dust": 2, "uv_index": 0.95, "aerosol_optical_depth": 0.31, "uv_index_clear_sky": 0.95 }, { "timestamp": "2025-11-10T16:00", "pm10": 34.9, "carbon_monoxide": 1822, "pm2_5": 33.9, "carbon_dioxide": 455, "nitrogen_dioxide": 44, "sulphur_dioxide": 18.6, "ozone": 125, "dust": 2, "uv_index": 0.25, "aerosol_optical_depth": 0.31, "uv_index_clear_sky": 0.25 }, { "timestamp": "2025-11-10T17:00", "pm10": 46.1, "carbon_monoxide": 2715, "pm2_5": 45.1, "carbon_dioxide": 465, "nitrogen_dioxide": 63.8, "sulphur_dioxide": 18.5, "ozone": 94, "dust": 2, "uv_index": 0, "aerosol_optical_depth": 0.3, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-10T18:00", "pm10": 65, "carbon_monoxide": 3960, "pm2_5": 63.8, "carbon_dioxide": 480, "nitrogen_dioxide": 79.3, "sulphur_dioxide": 19.1, "ozone": 67, "dust": 2, "uv_index": 0, "aerosol_optical_depth": 0.3, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-10T19:00", "pm10": 80.1, "carbon_monoxide": 5393, "pm2_5": 78.9, "carbon_dioxide": 499, "nitrogen_dioxide": 92.6, "sulphur_dioxide": 20.1, "ozone": 42, "dust": 2, "uv_index": 0, "aerosol_optical_depth": 0.3, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-10T20:00", "pm10": 91.7, "carbon_monoxide": 6361, "pm2_5": 90.6, "carbon_dioxide": 512, "nitrogen_dioxide": 101, "sulphur_dioxide": 20.9, "ozone": 24, "dust": 2, "uv_index": 0, "aerosol_optical_depth": 0.31, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-10T21:00", "pm10": 101, "carbon_monoxide": 6606, "pm2_5": 99.9, "carbon_dioxide": 517, "nitrogen_dioxide": 102.1, "sulphur_dioxide": 21.2, "ozone": 16, "dust": 2, "uv_index": 0, "aerosol_optical_depth": 0.31, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-10T22:00", "pm10": 109.2, "carbon_monoxide": 6387, "pm2_5": 107.8, "carbon_dioxide": 518, "nitrogen_dioxide": 98.1, "sulphur_dioxide": 21.3, "ozone": 15, "dust": 2, "uv_index": 0, "aerosol_optical_depth": 0.3, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-10T23:00", "pm10": 113.6, "carbon_monoxide": 5824, "pm2_5": 112.5, "carbon_dioxide": 513, "nitrogen_dioxide": 93.4, "sulphur_dioxide": 20.9, "ozone": 15, "dust": 2, "uv_index": 0, "aerosol_optical_depth": 0.3, "uv_index_clear_sky": 0 } ] }, "2025-11-11": { "hourly": [ { "timestamp": "2025-11-11T00:00", "pm10": 113.9, "carbon_monoxide": 4759, "pm2_5": 112.5, "carbon_dioxide": 500, "nitrogen_dioxide": 88.9, "sulphur_dioxide": 19.8, "ozone": 14, "dust": 2, "uv_index": 0, "aerosol_optical_depth": 0.29, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-11T01:00", "pm10": 112, "carbon_monoxide": 3352, "pm2_5": 110.8, "carbon_dioxide": 482, "nitrogen_dioxide": 83.6, "sulphur_dioxide": 18.3, "ozone": 13, "dust": 2, "uv_index": 0, "aerosol_optical_depth": 0.3, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-11T02:00", "pm10": 109.9, "carbon_monoxide": 2200, "pm2_5": 108.7, "carbon_dioxide": 467, "nitrogen_dioxide": 78.3, "sulphur_dioxide": 16.8, "ozone": 12, "dust": 2, "uv_index": 0, "aerosol_optical_depth": 0.3, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-11T03:00", "pm10": 106.9, "carbon_monoxide": 1418, "pm2_5": 105.7, "carbon_dioxide": 457, "nitrogen_dioxide": 72.9, "sulphur_dioxide": 15.3, "ozone": 10, "dust": 2, "uv_index": 0, "aerosol_optical_depth": 0.31, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-11T04:00", "pm10": 102.7, "carbon_monoxide": 893, "pm2_5": 101.5, "carbon_dioxide": 449, "nitrogen_dioxide": 67.4, "sulphur_dioxide": 13.8, "ozone": 9, "dust": 1, "uv_index": 0, "aerosol_optical_depth": 0.31, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-11T05:00", "pm10": 97.8, "carbon_monoxide": 881, "pm2_5": 96.9, "carbon_dioxide": 447, "nitrogen_dioxide": 63.6, "sulphur_dioxide": 13, "ozone": 9, "dust": 1, "uv_index": 0, "aerosol_optical_depth": 0.31, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-11T06:00", "pm10": 96.6, "carbon_monoxide": 1855, "pm2_5": 95.7, "carbon_dioxide": 455, "nitrogen_dioxide": 64, "sulphur_dioxide": 12.9, "ozone": 8, "dust": 1, "uv_index": 0, "aerosol_optical_depth": 0.3, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-11T07:00", "pm10": 103.6, "carbon_monoxide": 3342, "pm2_5": 102.7, "carbon_dioxide": 468, "nitrogen_dioxide": 65.9, "sulphur_dioxide": 13.4, "ozone": 8, "dust": 1, "uv_index": 0.15, "aerosol_optical_depth": 0.29, "uv_index_clear_sky": 0.15 }, { "timestamp": "2025-11-11T08:00", "pm10": 106.2, "carbon_monoxide": 4186, "pm2_5": 105.5, "carbon_dioxide": 476, "nitrogen_dioxide": 62.9, "sulphur_dioxide": 14.7, "ozone": 24, "dust": 1, "uv_index": 0.7, "aerosol_optical_depth": 0.29, "uv_index_clear_sky": 0.7 }, { "timestamp": "2025-11-11T09:00", "pm10": 92.4, "carbon_monoxide": 3724, "pm2_5": 92, "carbon_dioxide": 472, "nitrogen_dioxide": 50.1, "sulphur_dioxide": 17.8, "ozone": 70, "dust": 2, "uv_index": 1.75, "aerosol_optical_depth": 0.29, "uv_index_clear_sky": 1.75 }, { "timestamp": "2025-11-11T10:00", "pm10": 74.5, "carbon_monoxide": 2618, "pm2_5": 73.3, "carbon_dioxide": 463, "nitrogen_dioxide": 32.4, "sulphur_dioxide": 21.8, "ozone": 131, "dust": 2, "uv_index": 2.95, "aerosol_optical_depth": 0.29, "uv_index_clear_sky": 2.95 }, { "timestamp": "2025-11-11T11:00", "pm10": 56.1, "carbon_monoxide": 1695, "pm2_5": 54.5, "carbon_dioxide": 456, "nitrogen_dioxide": 18.4, "sulphur_dioxide": 24.1, "ozone": 176, "dust": 3, "uv_index": 3.8, "aerosol_optical_depth": 0.3, "uv_index_clear_sky": 3.8 }, { "timestamp": "2025-11-11T12:00", "pm10": 43.7, "carbon_monoxide": 1204, "pm2_5": 42.1, "carbon_dioxide": 453, "nitrogen_dioxide": 9.9, "sulphur_dioxide": 23.1, "ozone": 193, "dust": 3, "uv_index": 3.95, "aerosol_optical_depth": 0.3, "uv_index_clear_sky": 3.95 }, { "timestamp": "2025-11-11T13:00", "pm10": 36.7, "carbon_monoxide": 896, "pm2_5": 35.3, "carbon_dioxide": 451, "nitrogen_dioxide": 5.2, "sulphur_dioxide": 20.4, "ozone": 193, "dust": 2, "uv_index": 3.25, "aerosol_optical_depth": 0.3, "uv_index_clear_sky": 3.25 }, { "timestamp": "2025-11-11T14:00", "pm10": 33.6, "carbon_monoxide": 849, "pm2_5": 32.2, "carbon_dioxide": 451, "nitrogen_dioxide": 7.1, "sulphur_dioxide": 18.2, "ozone": 184, "dust": 2, "uv_index": 2.1, "aerosol_optical_depth": 0.3, "uv_index_clear_sky": 2.1 }, { "timestamp": "2025-11-11T15:00", "pm10": 32.2, "carbon_monoxide": 1158, "pm2_5": 31, "carbon_dioxide": 453, "nitrogen_dioxide": 19.4, "sulphur_dioxide": 17.3, "ozone": 162, "dust": 2, "uv_index": 0.95, "aerosol_optical_depth": 0.29, "uv_index_clear_sky": 0.95 }, { "timestamp": "2025-11-11T16:00", "pm10": 32.6, "carbon_monoxide": 1729, "pm2_5": 31.3, "carbon_dioxide": 457, "nitrogen_dioxide": 38.3, "sulphur_dioxide": 16.8, "ozone": 131, "dust": 2, "uv_index": 0.25, "aerosol_optical_depth": 0.29, "uv_index_clear_sky": 0.25 }, { "timestamp": "2025-11-11T17:00", "pm10": 41.6, "carbon_monoxide": 2357, "pm2_5": 40.5, "carbon_dioxide": 463, "nitrogen_dioxide": 55.9, "sulphur_dioxide": 16.6, "ozone": 101, "dust": 2, "uv_index": 0, "aerosol_optical_depth": 0.28, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-11T18:00", "pm10": 54.6, "carbon_monoxide": 3096, "pm2_5": 53.6, "carbon_dioxide": 472, "nitrogen_dioxide": 70.4, "sulphur_dioxide": 16.6, "ozone": 77, "dust": 2, "uv_index": 0, "aerosol_optical_depth": 0.27, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-11T19:00", "pm10": 63.8, "carbon_monoxide": 3892, "pm2_5": 62.9, "carbon_dioxide": 484, "nitrogen_dioxide": 83.5, "sulphur_dioxide": 16.9, "ozone": 55, "dust": 2, "uv_index": 0, "aerosol_optical_depth": 0.26, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-11T20:00", "pm10": 70.8, "carbon_monoxide": 4386, "pm2_5": 69.8, "carbon_dioxide": 491, "nitrogen_dioxide": 92.3, "sulphur_dioxide": 17.1, "ozone": 38, "dust": 2, "uv_index": 0, "aerosol_optical_depth": 0.25, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-11T21:00", "pm10": 78, "carbon_monoxide": 4392, "pm2_5": 77.1, "carbon_dioxide": 492, "nitrogen_dioxide": 95.4, "sulphur_dioxide": 17.1, "ozone": 29, "dust": 2, "uv_index": 0, "aerosol_optical_depth": 0.25, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-11T22:00", "pm10": 85.9, "carbon_monoxide": 4095, "pm2_5": 84.8, "carbon_dioxide": 490, "nitrogen_dioxide": 94.2, "sulphur_dioxide": 17.1, "ozone": 25, "dust": 2, "uv_index": 0, "aerosol_optical_depth": 0.24, "uv_index_clear_sky": 0 }, { "timestamp": "2025-11-11T23:00", "pm10": 91.5, "carbon_monoxide": 3694, "pm2_5": 90.6, "carbon_dioxide": 486, "nitrogen_dioxide": 90.1, "sulphur_dioxide": 16.7, "ozone": 24, "dust": 2, "uv_index": 0, "aerosol_optical_depth": 0.24, "uv_index_clear_sky": 0 } ] } } }curl -X 'GET' 'https://api.apifreaks.com/v1.0/weather/air-quality?startDate=2025-11-10&endDate=2025-11-11&apiKey=API-KEY'
To use the Air Quality, API credits are required. Charges apply only for successful queries, defined by a 2xx status code. If a request results in a 4xx or 5xx status code, no credits will be deducted, and any credits already charged will be refunded.
For each successful request, 2 credit will be charged. Utilize the Credits Usage API to efficiently monitor your recent consumption of both one-off and subscription credits. This API provides a streamlined way to track and manage your credit usage, ensuring you stay informed about your remaining balance and can optimize your resource allocation effectively.