Weather Daily Forecast

Platform: API iOS Android

Get weather daily forecasts for the next 3-15 days for cities around the world.

Interface code (Enum) Interface Class
INQUIRE_TYPE_WEATHER_3D 3-day forecast WeatherBaseClass
INQUIRE_TYPE_WEATHER_7D 7-day forecast WeatherBaseClass
INQUIRE_TYPE_WEATHER_10D 10-day forecast WeatherBaseClass
INQUIRE_TYPE_WEATHER_15D 15-day forecast WeatherBaseClass

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
  • appKey(required)API authentication key, please refer to How To Get Your Key. For example: appKey=12334567890ABC
  • langMulti-language setting, please see Language to find out how our multi-language works and how to set up.
  • unitSet weather data unit, the available value are unit=m for metric(default) and unit=i for imperial. See more about Unit.

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_3D WithSuccess:^(WeatherBaseClass *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.sunrise Sunrise time. Maybe null in high latitude area
  • daily.sunset Sunset time. Maybe null in high latitude area
  • daily.moonrise Moonrise time of current day. Maybe null
  • daily.moonset Moonset time of current day. Maybe null
  • daily.moonPhase Moon phase name
  • daily.moonPhaseIcon Icon code for moon phase. See also QWeather Icons
  • daily.tempMax The highest temperature of the day
  • daily.tempMin The lowest temperature of the day
  • daily.iconDay Icon code for daytime weather conditions. See also QWeather Icons
  • daily.textDay Weather conditions for daytime
  • daily.iconNight Icon code for night weather conditions. See also QWeather Icons
  • daily.textNight Weather conditions for night
  • daily.wind360Day Daytime wind direction in azimuth degree
  • daily.windDirDay Daytime wind direction
  • daily.windScaleDay Daytime wind scale
  • daily.windSpeedDay Daytime wind speed, KM/H
  • daily.wind360Night Nightly wind direction in azimuth degree
  • daily.windDirNight Nightly wind direction
  • daily.windScaleNight Nightly wind scale
  • daily.windSpeedNight Nightly wind speed, KM/H
  • daily.precip Estimated total precipitation for the day
  • daily.uvIndex UV index
  • daily.humidity Relative humidity in percent
  • daily.pressure Atmospheric pressure, hPa
  • daily.vis Visibility, KM
  • daily.cloud Cloud cover in percent, may be null
  • refer.sources Data source and other statements, may be null
  • refer.license Data license, may be null