Weather Hourly Forecast

Platform: API iOS Android

Get hourly weather forecasts for cities around the world for the next 24-168 hours.

Interface Code Interface Class
getWeather24H 24-hour forecast weather data WeatherHourlyBean
getWeather72H 72-hour forecast weather data WeatherHourlyBean
getWeather168H 168-hour forecast weather data WeatherHourlyBean

Parameter

  • 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.
  • unitSet weather data unit, the available value are unit=m for metric(default) and unit=i for imperial. See more about Unit.

Sample Code

/**
 *  24-hour forecast data
 */
QWeather.getWeather24Hourly(Context context, String location, Lang lang, Unit unit, QWeather.OnResultWeatherHourlyListener listener);

QWeather.getWeather24Hourly(Context context, String location, QWeather.OnResultWeatherHourlyListener listener);

/**
 *  72-hour forecast data
 */
QWeather.getWeather72Hourly(Context context, String location, Lang lang, Unit unit, QWeather.OnResultWeatherHourlyListener listener);

QWeather.getWeather72Hourly(Context context, String location, QWeather.OnResultWeatherHourlyListener listener);

/**
 *  168 hours forecast data
 */
QWeather.getWeather168Hourly(Context context, String location, Lang lang, Unit unit, QWeather.OnResultWeatherHourlyListener listener);

QWeather.getWeather168Hourly(Context context, String location, QWeather.OnResultWeatherHourlyListener listener);

Properties

Properties of WeatherHourlyBean

Property Description Example
getCode See Status Code 200
getHourly HourlyBean Hourly Weather List<HourlyBean>
getRefer Reference data, includes data source, statements and license Refer
getBasic Basic Information Basic

Refer

Property Description Example
getSourcesList Data source and other statements QWeather
getLicenseList Data license QWeather Developers License

Basic

Property Description Example
getUpdateTime Last updated time 2017-10-25T04:34+08:00
getFxLink Responsive web page of this location, easy to embed in your website or APP https://www.qweather.com/weather/beijing-101010100.html

HourlyBean Hourly Weather

Property Description Example
getFxTime Forecast time 2013-12-30T13:00+08:00
getTemp Temperature 2
getIcon Icon code for weather conditions. See also QWeather Icons 101
getText Weather conditions Cloudy
getWind360 Wind direction in azimuth degree 290
getWindDir Wind direction NW
getWindScale Wind scale 3-4
getWindSpeed ​​ Wind speed, km/h 15
getHumidity Relative humidity in percent 30
getPop Probability of precipitation, in percent, may be null 5
getPrecip Precipitation 1.2
getPressure Atmospheric pressure 1030
getCloud Cloud cover in percent 15
getDew Dew point temperature 5