Time Machine for Weather

Platform: API iOS Android

Get the last 10 days of weather history data.

Let’s say, today is December 30, you can get historical data from Dec. 20 to Dec. 29.

QWeather also provides historical reanalysis weather data from 2000 to present. If you need more historical weather data data, please provide the following information to sales@qweather.com.

  • Company name
  • Contact information
  • City or coordinates
  • Date range
Interface code (Enum) Interface Class
INQUIRE_TYPE_HISTORICAL_WEATHER Historical weather WeatherHistoricalBaseClass

Request Parameters

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

  • location(required)The location to be queried, only support LocationID and LocationID can be obtained by GeoAPI. For example: location=101010100
  • date(required)Set the date, up to the most recent 10 days. The date format is yyyyMMdd. Example: date=20200531
  • 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.date = @"20200425";
    [QWeatherConfigInstance weatherWithInquireType:INQUIRE_TYPE_HISTORICAL_WEATHER WithSuccess:^(WeatherHistoricalBaseClass *responseObject) {
        NSLog(@"Description->%@",[responseObject description]);
    } faileureForError:^(NSError *error) {


  • code See Status Code
  • fxLink Responsive web page of this data, for embedded in website or APP
  • weatherDaily.date Date
  • weatherDaily.sunrise Sunrise time. Maybe null in high latitude area
  • weatherDaily.sunset Sunset time. Maybe null in high latitude area
  • weatherDaily.moonrise Moonrise time of current day. Maybe null
  • weatherDaily.moonset Moonset time of current day. Maybe null
  • weatherDaily.moonPhase Moon phase name
  • weatherDaily.tempMax The highest temperature of the day
  • weatherDaily.tempMin The lowest temperature of the day
  • weatherDaily.precip Estimated total precipitation for the day
  • weatherDaily.pressure Atmospheric pressure, hPa
  • weatherDaily.humidity Hourly relative humidity in percent
  • weatherHourly.time Time of the day
  • weatherHourly.temp Hourly temperature
  • weatherHourly.icon Icon code for hourly weather conditions of the day. See also QWeather Icons
  • weatherHourly.text Hourly weather condition
  • weatherHourly.wind360 Hourly wind direction in azimuth degree
  • weatherHourly.windDir Hourly wind direction
  • weatherHourly.windScale Hourly wind scale
  • weatherHourly.windSpeed Hourly wind speed, KM/H
  • weatherHourly.humidity Hourly relative humidity in percent
  • weatherHourly.precip Hourly accumulated precipitation
  • weatherHourly.pressure Atmospheric pressure, hPa
  • refer.sources Data source and other statements, may be null
  • refer.license Data license, may be null