Air Quality Daily Forecast

Platform: API iOS Android

Air Quality Daily Forecast API for Chinese cities, including AQI, air quality levels, primary pollutants.

Interface code (Enum) Interface Class
INQUIRE_TYPE_WEATHER_AIR_5D Air quality 5-day forecast ​​ AirBaseClass

Request Parameters

If no optional parameters are set, the default value will be used.

  • location(required)The location to be queried, support LocationID or comma-separated longitude and latitude (decimal, up to 2 decimal places), LocationID can be obtained by GeoAPI. Example: location=101010100 or location=116.41,39.92
  • langMulti-language setting, please see Language to find out how our multi-language works and how to set up.

Sample Code

    QWeatherConfigInstance.publicID = @"publicID";
    QWeatherConfigInstance.appKey = @"key";
    QWeatherConfigInstance.appType = APP_TYPE_BIZ;
    QWeatherConfigInstance.location = @"101010100";
    QWeatherConfigInstance.lang = @"";
    QWeatherConfigInstance.unit = @"";
    [QWeatherConfigInstance weatherWithInquireType:INQUIRE_TYPE_WEATHER_AIR_5D WithSuccess:^(AirBaseClass *responseObject) {
        
        NSLog(@"Description->%@",[responseObject description]);
        
    } faileureForError:^(NSError *error) {
        NSLog(@"error->%@",error);
        
    }];

Response

  • code See Status Code
  • updateTime API last update time
  • fxLink Responsive web page of this data, for embedded in website or APP
  • daily.fxDate Forecast date
  • daily.aqi Air Quality Index
  • daily.level AQI level
  • daily.category AQI category
  • daily.primary The main pollutant. If level=1, return NA
  • refer.sources Data source and other statements, may be null
  • refer.license Data license, may be null

Air Quality Index Level

See Air Quality Info.