Loading
Loading
Retrieve real-time and forecast air quality data for any location worldwide. Supports lookup by city name or address, GPS coordinates, or IP address. Each response includes AQI values for both US and European standards, along with key pollutant concentrations and UV index measurements.
The Air Quality API delivers current AQI readings including PM₂.₅, PM₁₀, carbon monoxide, nitrogen dioxide, sulphur dioxide, ozone, dust, UV index, and aerosol optical depth. When a date range is provided via startDate and endDate, the API switches to forecast mode returning hourly data for up to 6 days. When no parameter is supplied the API auto-detects the requesting IP address.
Pass your API key as the apiKey parameter in every request.
This is version v1.0 of the API.
All parameters are optional query string parameters. Pass location, lat/long, or ipto specify a target. If none are provided the API resolves air quality data for the calling machine's IP address. Use startDate and endDate to fetch forecast data; omit them to get current air quality. Use timezone to override the default timezone of the resolved location.
startDateoptionalstringStarting date to fetch Air Quality forecast data. Must follow YYYY-MM-DD format (e.g., 2025-08-25). Forecast dates must be current or future dates only. Past dates are not allowed for forecast data.
endDateoptionalstringEnd date to fetch Air Quality forecast data. Must follow YYYY-MM-DD format (e.g., 2025-08-25). Forecast dates must be current or future dates only. Past dates are not allowed for forecast data.
locationoptionalstringSpecifies the target location. It can be a city name, place name, or a complete address (e.g., "Lahore", "Paris, France", "1600 Amphitheatre Parkway, Mountain View, CA").
latoptionalfloatLatitude of the target location. Must be used together with "long".
longoptionalfloatLongitude of the target location. Must be used together with "lat".
ipoptionalstringIPv4 or IPv6 address used to infer location. Defaults to the requester’s public IP if not provided.
timezoneoptionalstringSpecifies the timezone for returned results. Defaults to the resolved location’s timezone.
A successful request returns a 200 OK response with a JSON object. The top-level object always contains location and current. See the response preview on the right for the full JSON structure.
locationLocation information including coordinates, timezone, and geographic details.
currentCurrent air quality data including AQI values, pollutant concentrations, UV index, and aerosol measurements.
The location object contains geographic details for the resolved location:
location_stringOriginal location query string as submitted, including full address or place name.
country_nameResolved country name derived from the geocoded location query.
state_provState, province, or primary administrative division identified from the location.
cityCity or municipal area name extracted from the geocoded location.
localitySpecific locality, neighborhood, suburb, or village within the geocoded area.
latitudeGeocoded latitude coordinate in decimal degrees, ranging from -90 to +90.
longitudeGeocoded longitude coordinate in decimal degrees, ranging from -180 to +180.
elevationElevation above mean sea level in meters at the geocoded coordinates.
timezoneIANA timezone database identifier for the geocoded location (e.g., Europe/London, America/Los_Angeles).
timezone_abbreviationCurrent timezone abbreviation for the location based on local offset (e.g., GMT+1, EST).
The current object contains real-time air quality measurements:
timestampISO 8601 formatted timestamp (iso8601)
european_aqiConsolidated European Air Quality Index representing the highest value among individual pollutant indices. Ranges: 0-20 (good), 20-40 (fair), 40-60 (moderate), 60-80 (poor), 80-100 (very poor), >100 (extremely poor).
us_aqiConsolidated U.S. Air Quality Index representing the highest value among individual pollutant indices. Ranges: 0-50 (good), 51-100 (moderate), 101-150 (unhealthy for sensitive groups), 151-200 (unhealthy), 201-300 (very unhealthy), 301-500 (hazardous).
pm10Particulate matter with diameter less than 10 micrometers (μg/m³) measured at 10 meters above ground.
pm2_5Particulate matter with diameter less than 2.5 micrometers (μg/m³) measured at 10 meters above ground.
carbon_monoxideAtmospheric carbon monoxide gas concentration (μg/m³) at 10 meters above ground.
nitrogen_dioxideAtmospheric nitrogen dioxide gas concentration (μg/m³) at 10 meters above ground.
sulphur_dioxideAtmospheric sulphur dioxide gas concentration (μg/m³) at 10 meters above ground.
ozoneAtmospheric ozone gas concentration (μg/m³) at 10 meters above ground.
dustSaharan dust particle concentration (μg/m³) at 10 meters above ground.
uv_indexUltraviolet radiation intensity index accounting for cloud coverage.
aerosol_optical_depthAerosol optical depth at 550 nm wavelength indicating atmospheric haze levels.
uv_index_clear_skyUltraviolet radiation intensity index assuming cloud-free conditions.
The API uses standard HTTP status codes to indicate the success or failure of requests. For common status codes like 429 (Too Many Requests), refer to the general API documentation.
Invalid latitude or longitude values. Latitude must be between -90 and 90, and longitude must be between -180 and 180
Forecast date range must be within 2026-06-04 to 2026-06-09
Check whether your input value is correct; timezone = NotATimezone
Location not found