Weather Hourly Forecast

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

Endpoint#

GET /v7/weather/{hours}

Parameters#

Path parameters

  • hours (required) Forecast hours, supports up to 168 hours, available value: 24h, 72h, 168h

Query parameters

  • 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
  • lang Multi-language setting, please see Language to find out how our multi-language works and how to set up.

Request example#

curl -X GET --compressed \
-H 'Authorization: Bearer your_token' \
'https://your-api-host/v7/weather/24h?location=116.41%2C39.92&lang=en'

Replace your_token and your_api_host with your JWT Authentication and API Host

Try it

Response#

{
  "code": "200",
  "updateTime": "2023-04-12T18:32+08:00",
  "fxLink": "https://www.qweather.com/en/weather/beijing-101010100.html",
  "hourly": [
    {
      "fxTime": "2023-04-12T19:00+08:00",
      "temp": "24",
      "icon": "101",
      "text": "Cloudy",
      "wind360": "159",
      "windDir": "S",
      "windScale": "1-3",
      "windSpeed": "3",
      "humidity": "74",
      "pop": "45",
      "precip": "0.0",
      "pressure": "1002",
      "cloud": "80",
      "dew": "22",
      "uvIndex": "0"
    },
    {
      "fxTime": "2023-04-12T20:00+08:00",
      "temp": "25",
      "icon": "302",
      "text": "Thundershower",
      "wind360": "180",
      "windDir": "S",
      "windScale": "1-3",
      "windSpeed": "14",
      "humidity": "78",
      "pop": "55",
      "precip": "0.35",
      "pressure": "1003",
      "cloud": "85",
      "dew": "21",
      "uvIndex": "0"
    },
    {
      "fxTime": "2023-04-12T21:00+08:00",
      "temp": "24",
      "icon": "151",
      "text": "Cloudy",
      "wind360": "127",
      "windDir": "SE",
      "windScale": "1-3",
      "windSpeed": "14",
      "humidity": "81",
      "pop": "40",
      "precip": "0.0",
      "pressure": "1003",
      "cloud": "87",
      "dew": "21",
      "uvIndex": "0"
    }
  ],
  "refer": {
    "sources": [
      "https://developer.qweather.com/attribution.html"
    ],
    "license": [
      "QWeather Developers License"
    ]
  }
}
  • code string Status code
  • updateTime date-time API latest update time
  • fxLink uri Responsive web page of this data, for embedded in website or APP
  • hourly object Hourly data
    • fxTime date-time Forecast time in ISO 8601 format
    • temp string Temperature, default unit: Celsius
    • icon string Icon code for weather conditions. See also QWeather Icons
    • text string Weather condition description
    • wind360 string Wind direction in azimuth degree
    • windDir string Wind direction
    • windScale string Wind scale
    • windSpeed string Wind speed, km/h
    • humidity string Relative humidity in percent
    • precip string Precipitation, default unit: millimeters
    • pressure string Station pressure, default unit: hPa
    • cloud string Cloud cover in percent
    • dew string Dew point temperature
    • pop string Precipitation probability in percent, may be null
  • refer object Data sources and licensing information
    • sources array Data source and other statements, may be null
    • license array Data license, may be null