Loading
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 coordinate in decimal degrees, ranging from -90 (South Pole) to +90 (North Pole). |
| longitude | float | Mandatory | Geographic longitude coordinate in decimal degrees, ranging from -180 (West) to +180 (East). |
| country_name | string | Mandatory | Full name of the country corresponding to the provided coordinates. |
| state_prov | string | Mandatory | State, province, or primary administrative division name for the location. |
| city | string | Mandatory | City or municipal area name associated with the coordinate location. |
| locality | string | Optional | Specific locality, neighborhood, district, or village name within the broader area. |
| elevation | float | Optional | Height above mean sea level in meters for the specified coordinates. |
| timezone | string | Mandatory | IANA timezone database identifier for the location (e.g., America/New_York, Europe/London). |
| timezone_abbreviation | string | Mandatory | Abbreviated timezone representation based on current offset (e.g., EST, GMT, PST). |
"location" (when IP Provided) object contains the following fields.
| Field | Type | Requirement | Description |
|---|---|---|---|
| continent_code | string | Mandatory | Two-letter continent code (e.g., NA for North America, EU for Europe, AS for Asia). |
| continent_name | string | Mandatory | Full name of the continent where the IP address is registered. |
| country_code2 | string | Mandatory | ISO 3166-1 alpha-2 two-letter country code (e.g., US, GB, FR). |
| country_code3 | string | Mandatory | ISO 3166-1 alpha-3 three-letter country code (e.g., USA, GBR, FRA). |
| country_name | string | Mandatory | Common name of the country associated with the IP address. |
| country_name_official | string | Mandatory | Official long-form country name as recognized internationally (e.g., United States of America). |
| is_eu | boolean | Optional | Boolean flag indicating whether the country is a member state of the European Union. |
| state_prov | string | Mandatory | State, province, or primary administrative division associated with the IP location. |
| state_code | string | Optional | ISO 3166-2 subdivision code for the state or province (e.g., CA for California). |
| district | string | Optional | District, county, or secondary administrative division within the region. |
| city | string | Mandatory | City or urban area name where the IP address is geographically registered. |
| zipcode | string | Optional | Postal code or ZIP code for the approximate location of the IP address. |
| latitude | float | Mandatory | Geographic latitude in decimal degrees for the IP geolocation, ranging from -90 to +90. |
| longitude | float | Mandatory | Geographic longitude in decimal degrees for the IP geolocation, ranging from -180 to +180. |
| locality | string | Optional | Specific locality, neighborhood, or small area designation within the city. |
| elevation | float | Optional | Elevation above mean sea level in meters for the IP geolocation. |
| timezone | string | Mandatory | IANA timezone database identifier for the IP location (e.g., America/Chicago, Asia/Tokyo). |
| timezone_abbreviation | string | Mandatory | Current timezone abbreviation based on local offset (e.g., CST, JST, UTC). |
"location" (when location Provided) object contains the following fields.
| Field | Type | Requirement | Description |
|---|---|---|---|
| location_string | string | Mandatory | Original location query string as submitted, including full address or place name. |
| country_name | string | Mandatory | Resolved country name derived from the geocoded location query. |
| state_prov | string | Mandatory | State, province, or primary administrative division identified from the location. |
| city | string | Mandatory | City or municipal area name extracted from the geocoded location. |
| locality | string | Optional | Specific locality, neighborhood, suburb, or village within the geocoded area. |
| latitude | float | Mandatory | Geocoded latitude coordinate in decimal degrees, ranging from -90 to +90. |
| longitude | float | Mandatory | Geocoded longitude coordinate in decimal degrees, ranging from -180 to +180. |
| elevation | float | Optional | Elevation above mean sea level in meters at the geocoded coordinates. |
| timezone | string | Mandatory | IANA timezone database identifier for the geocoded location (e.g., America/Los_Angeles). |
| timezone_abbreviation | string | Mandatory | Current timezone abbreviation for the location based on local offset (e.g., PDT, CET). |
"current" object contains the following fields .
| Field | Type | Requirement | Description |
|---|---|---|---|
| timestamp | string | Mandatory | ISO 8601 formatted timestamp (iso8601) |
| european_aqi | integer | Mandatory | Consolidated 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_aqi | integer | Mandatory | Consolidated 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). |
| pm10 | float | Mandatory | Particulate matter with diameter less than 10 micrometers (μg/m³) measured at 10 meters above ground. |
| pm2_5 | float | Mandatory | Particulate matter with diameter less than 2.5 micrometers (μg/m³) measured at 10 meters above ground. |
| carbon_monoxide | float | Mandatory | Atmospheric carbon monoxide gas concentration (μg/m³) at 10 meters above ground. |
| nitrogen_dioxide | float | Mandatory | Atmospheric nitrogen dioxide gas concentration (μg/m³) at 10 meters above ground. |
| sulphur_dioxide | float | Mandatory | Atmospheric sulphur dioxide gas concentration (μg/m³) at 10 meters above ground. |
| ozone | float | Mandatory | Atmospheric ozone gas concentration (μg/m³) at 10 meters above ground. |
| dust | float | Mandatory | Saharan dust particle concentration (μg/m³) at 10 meters above ground. |
| uv_index | float | Mandatory | Ultraviolet radiation intensity index accounting for cloud coverage. |
| aerosol_optical_depth | float | Mandatory | Aerosol optical depth at 550 nm wavelength indicating atmospheric haze levels. |
| uv_index_clear_sky | float | Mandatory | Ultraviolet radiation intensity index assuming cloud-free conditions. |
The "forecast[date].hourly" Array contains objects having the following fields.
| Field | Type | Requirement | Description |
|---|---|---|---|
| timestamp | string | Mandatory | ISO 8601 formatted timestamp (iso8601) |
| pm10 | float | Mandatory | Particulate matter with diameter less than 10 micrometers (μg/m³) measured at 10 meters above ground. |
| carbon_monoxide | float | Mandatory | Atmospheric carbon monoxide gas concentration (μg/m³) at 10 meters above ground. |
| pm2_5 | float | Mandatory | Particulate matter with diameter less than 2.5 micrometers (μg/m³) measured at 10 meters above ground. |
| carbon_dioxide | float | Mandatory | Atmospheric carbon dioxide concentration (ppm) at 10 meters above ground. |
| nitrogen_dioxide | float | Mandatory | Atmospheric nitrogen dioxide gas concentration (μg/m³) at 10 meters above ground. |
| sulphur_dioxide | float | Mandatory | Atmospheric sulphur dioxide gas concentration (μg/m³) at 10 meters above ground. |
| ozone | float | Mandatory | Atmospheric ozone gas concentration (μg/m³) at 10 meters above ground. |
| dust | float | Mandatory | Saharan dust particle concentration (μg/m³) at 10 meters above ground. |
| uv_index | float | Mandatory | Ultraviolet radiation intensity index accounting for cloud coverage. |
| aerosol_optical_depth | float | Mandatory | Aerosol optical depth at 550 nm wavelength indicating atmospheric haze levels. |
| uv_index_clear_sky | float | Mandatory | Ultraviolet radiation intensity index assuming cloud-free conditions. |