Air Quality Hourly Forecast (new)
The air quality hourly forecast API provides air quality forecast data for each hour of the next 24 hours, including AQI, pollutants concentration, sub-indexes, health effects and advice.
We recommend to read Air Quality Info to learn about the AQIs, pollutants, supported regions and more.
Interface code | Interface | Class |
---|---|---|
airHourly | Air quality hourly forecast (new) | AirV1HourlyResponse |
Parameters
AirV1Parameter
-
latitude
(required)The latitude of the desired location. Decimal format, up to 2 decimal places. For example39.92
-
longitude
(required)The longitude of the desired location. Decimal format, up to 2 decimal places. For example116.41
-
lang
Multi-language setting, please see Language to find out how our multi-language works and how to set up.
Sample code
public void airHourly(AirV1Parameter parameter, Callback<AirV1HourlyResponse> callback);
Response
AirV1HourlyResponse
-
metadata.tag
Unique tag for this data -
hours.forecastTime
Forecast time, ISO8601 format -
hours.indexes.code
Code of air quality index -
hours.indexes.name
Name of air quality index -
hours.indexes.aqi
Value of air quality index -
hours.indexes.aqiDisplay
Display name of the AQI value -
hours.indexes.level
Level of air quality index -
hours.indexes.category
Category of air quality index -
hours.indexes.color.red
Red in RGBA color for AQI -
hours.indexes.color.green
Green in RGBA color for AQI -
hours.indexes.color.blue
Blue in RGBA color for AQI -
hours.indexes.color.alpha
Alpha in RGBA color for AQI -
hours.indexes.primaryPollutant.code
The primary pollutant code, maybe NULL. -
hours.indexes.primaryPollutant.name
Name of primary pollutant, maybe NULL. -
hours.indexes.primaryPollutant.fullName
Full name of primary pollutant, maybe NULL. -
hours.indexes.health.effect
Health effects of air quality, maybe NULL. -
hours.indexes.health.advice.generalPopulation
Health advice for general population, maybe NULL. -
hours.indexes.health.advice.sensitivePopulation
Health advice for sensitive population, maybe NULL. -
hours.pollutants.code
The pollutant code. -
hours.pollutants.name
Name of pollutant. -
hours.pollutants.fullName
Full name of pollutant. -
hours.pollutants.concentration.value
Concentration values of pollutants. -
hours.pollutants.concentration.unit
Units for concentration values of pollutants. -
hours.pollutants.subIndexes.code
Code of air quality sub-index, maybe NULL. -
hours.pollutants.subIndexes.aqi
Sub-index value for pollutant, maybe NULL. -
hours.pollutants.subIndexes.aqiDisplay
Sub-index for display, maybe NULL.