Current Air Quality (new)

Platform: API iOS Android

The current air quality (AQI) API provides real-time air quality data for specified locations, data resolution is 1x1 km.

  • AQI, category, color and primary pollutant based on local standards for each country or region
  • Generic QWeather AQI
  • Pollutant concentration values and their sub-index.
  • Health effects and advice
  • Associated monitoring station information

We recommend to read Air Quality Info to learn about the AQIs, pollutants, supported regions and more.

Interface code Interface Class
airCurrent Current Air Quality (new) AirV1CurrentResponse

Parameters

AirV1Parameter

  • latitude(required)The latitude of the desired location. Decimal format, up to 2 decimal places. For example 39.92
  • longitude(required)The longitude of the desired location. Decimal format, up to 2 decimal places. For example 116.41
  • langMulti-language setting, please see Language to find out how our multi-language works and how to set up.

Sample code

public void airCurrent(AirV1Parameter parameter, Callback<AirV1CurrentResponse> callback);

Response

AirV1CurrentResponse

  • metadata.tag Unique tag for this data
  • indexes.code Code of air quality index
  • indexes.name Name of air quality index
  • indexes.aqi Value of air quality index
  • indexes.aqiDisplay Display name of the AQI value
  • indexes.level Level of air quality index
  • indexes.category Category of air quality index
  • indexes.color.red Red in RGBA color for AQI
  • indexes.color.green Green in RGBA color for AQI
  • indexes.color.blue Blue in RGBA color for AQI
  • indexes.color.alpha Alpha in RGBA color for AQI
  • indexes.primaryPollutant.code The primary pollutant code, maybe NULL.
  • indexes.primaryPollutant.name Name of primary pollutant, maybe NULL.
  • indexes.primaryPollutant.fullName Full name of primary pollutant, maybe NULL.
  • indexes.health.effect Health effects of air quality, maybe NULL.
  • indexes.health.advice.generalPopulation Health advice for general population, maybe NULL.
  • indexes.health.advice.sensitivePopulation Health advice for sensitive population, maybe NULL.
  • pollutants.code The pollutant code.
  • pollutants.name Name of pollutant.
  • pollutants.fullName Full name of pollutant.
  • pollutants.concentration.value Concentration values of pollutants.
  • pollutants.concentration.unit Units for concentration values of pollutants.
  • pollutants.subIndexes.code Code of air quality sub-index, maybe NULL.
  • pollutants.subIndexes.aqi Sub-index value for pollutant, maybe NULL.
  • pollutants.subIndexes.aqiDisplay Sub-index for display, maybe NULL.
  • stations.id Location ID of the monitoring station for this AQI reference, maybe NULL.
  • stations.name Name of the monitoring station for this AQI reference, maybe NULL.