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.
formatoptionalStringdefault: jsonResponse format: 'json'.
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.
precisionoptionalStringForecast data granularity. Only 'hourly' is available.
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 always contains location. When no date range is given, current holds real-time AQI readings. When startDate/endDate are provided, forecast holds hourly data keyed by date. See the response preview for the full JSON structure.
date (Object)
Address Lookup (Object), Coordinates Lookup (Object), IP Lookup (Object)
timestamp (String), european_aqi (Integer), us_aqi (Integer), pm10 (Float), pm2_5 (Float), …
See the HTTP Status Codes documentation for a complete reference of common API errors and HTTP status codes.
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