https://api.apifreaks.com/v1.0/weather/air-quality
$ pip install requests
Click Test it to start the request and see the response here!
| Field | Type | Requirement | Description |
|---|---|---|---|
| location | Object | Mandatory | Location object. Can be with coordinates, IP, or location string depending on input. |
| current | Object | Optional | current aqi of the provided location or requester IP. |
| forecast[date].hourly[] | Array | Mandatory | An array of objects containing hourly air quality data for the specified date range |
"location" (when coordinates Provided) object contains the following fields.
| Field | Type | Requirement | Description |
|---|---|---|---|
| latitude | float | Mandatory | Geographic latitude of the given Coordinates |
| longitude | float | Mandatory | Geographic longitude of the given Coordinates |
| country_name | string | Mandatory | Country name by Coordinates |
| state_prov | string | Mandatory | State or province of given Coordinates |
| city | string | Mandatory | City of the given Coordinates |
| locality | string | Optional | Local area, neighborhood, or village name |
| elevation | float | Optional | Elevation above sea level (meters) |
| timezone | string | Mandatory | Timezone identifier (e.g., GMT, PST, etc.) |
| timezone_abbreviation | string | Mandatory | Abbreviation of timezone (e.g., GMT, IST, etc.) |
"location" (when IP Provided) object contains the following fields.
| Field | Type | Requirement | Description |
|---|---|---|---|
| continent_code | string | Mandatory | Two-letter code of the continent |
| continent_name | string | Mandatory | Full name of the continent |
| country_code2 | string | Mandatory | Two-letter ISO country code |
| country_code3 | string | Mandatory | Three-letter ISO country code |
| country_name | string | Mandatory | Country name of the location |
| country_name_official | string | Mandatory | Official long-form country name |
| is_eu | boolean | Optional | Indicates if the country is part of the European Union |
| state_prov | string | Mandatory | State or province of the location |
| state_code | string | Optional | ISO code for the state or province |
| district | string | Optional | District or administrative division |
| city | string | Mandatory | City of the location |
| zipcode | string | Optional | Postal or ZIP code |
| latitude | float | Mandatory | Geographic latitude of the location |
| longitude | float | Mandatory | Geographic longitude of the location |
| locality | string | Optional | Local area or neighborhood |
| elevation | float | Optional | Elevation above sea level (meters) |
| timezone | string | Mandatory | Timezone identifier |
| timezone_abbreviation | string | Mandatory | Abbreviation of timezone |
"location" (when location Provided) object contains the following fields.
| Field | Type | Requirement | Description |
|---|---|---|---|
| location_string | string | Mandatory | Full address or free-text location input |
| country_name | string | Mandatory | Country name of the location |
| state_prov | string | Mandatory | State or province of the location |
| city | string | Mandatory | City of the location |
| locality | string | Optional | Local area, neighborhood, or village name |
| latitude | float | Mandatory | Geographic latitude of the location |
| longitude | float | Mandatory | Geographic longitude of the location |
| elevation | float | Optional | Elevation above sea level (meters) |
| timezone | string | Mandatory | Timezone identifier |
| timezone_abbreviation | string | Mandatory | Abbreviation of timezone |
"current" object contains the following fields .
| Field | Type | Requirement | Description |
|---|---|---|---|
| timestamp | string | Mandatory | ISO 8601 formatted timestamp |
| european_aqi | integer | Mandatory | European Air Quality Index (AQI) calculated for different particulate matter and gases individually. The consolidated european_aqi returns the maximum of all individual indices. Ranges from 0-20 (good), 20-40 (fair), 40-60 (moderate), 60-80 (poor), 80-100 (very poor) and exceeds 100 for extremely poor conditions. |
| us_aqi | integer | Mandatory | United States Air Quality Index (AQI) calculated for different particulate matter and gases individually. The consolidated us_aqi returns the maximum of all individual indices. Ranges from 0-50 (good), 51-100 (moderate), 101-150 (unhealthy for sensitive groups), 151-200 (unhealthy), 201-300 (very unhealthy) and 301-500 (hazardous). |
| pm10 | float | Mandatory | Concentration of particulate matter <10 micrometers (10 meter above ground) |
| pm2_5 | float | Mandatory | Concentration of particulate matter <2.5 micrometers (10 meter above ground) |
| carbon_monoxide | float | Mandatory | Concentration of carbon monoxide in the air (10 meter above ground) |
| nitrogen_dioxide | float | Mandatory | Concentration of nitrogen dioxide in the air (10 meter above ground) |
| sulphur_dioxide | float | Mandatory | Concentration of sulphur dioxide in the air (10 meter above ground) |
| ozone | float | Mandatory | Concentration of ozone in the air (10 meter above ground) |
| dust | float | Mandatory | Concentration of dust particles in the air (10 meter above ground) |
| uv_index | float | Mandatory | Ultraviolet radiation index under current sky conditions |
| aerosol_optical_depth | float | Mandatory | Aerosol optical depth at 550 nm of the entire atmosphere to indicate haze. |
| uv_index_clear_sky | float | Mandatory | Ultraviolet radiation index under clear sky conditions |
The "forecast[date].hourly" Array contains objects having the following fields.
| Field | Type | Requirement | Description |
|---|---|---|---|
| timestamp | string | Mandatory | ISO 8601 formatted timestamp |
| pm10 | float | Mandatory | Concentration of particulate matter ≤10 micrometers |
| carbon_monoxide | float | Mandatory | Concentration of carbon monoxide in the air |
| pm2_5 | float | Mandatory | Concentration of particulate matter ≤2.5 micrometers |
| carbon_dioxide | float | Mandatory | Concentration of carbon dioxide in the air |
| nitrogen_dioxide | float | Mandatory | Concentration of nitrogen dioxide in the air |
| sulphur_dioxide | float | Mandatory | Concentration of sulphur dioxide in the air |
| ozone | float | Mandatory | Concentration of ozone in the air |
| dust | float | Mandatory | Concentration of dust particles in the air |
| uv_index | float | Mandatory | Ultraviolet radiation index under current sky conditions |
| aerosol_optical_depth | float | Mandatory | Measure of aerosol concentration affecting light transmission in the atmosphere |
| uv_index_clear_sky | float | Mandatory | Ultraviolet radiation index under clear sky conditions |