Hourly Forecast

Returns an hourly weather forecast for the specified latitude and longitude for up to 240 hours, with 1-kilometer resolution and global coverage.

The response includes weather condition, temperature, feels-like temperature, relative humidity, wind direction and speed, wind gust, precipitation amount and probability, mean sea-level pressure, visibility, dew point, cloud cover, UV index, and more.

Endpoint#

GET /weather/v1/hourly/{latitude}/{longitude}

Parameters#

Path parameters

  • latitude required
    number
    Latitude of the requested location in decimal degrees
  • longitude required
    number
    Longitude of the requested location in decimal degrees

Query parameters

  • hours
    integer
    Number of forecast hours. Value range: [1, 240]. Default: 24
  • localTime
    boolean

    Whether to return local time for the requested location

    Possible values: false UTC time (default), true location's local time

  • lang
    string
    Language setting. See Language for behavior, configuration, and data availability

Request example#

curl -X GET --compressed \
-H 'Authorization: Bearer your_token' \
'https://your-api-host/weather/v1/hourly/39.92/116.41'

Replace your_token and your_api_host with your JWT Authentication and API Host

Try it

Response#

{
  "metadata": {
    "tag": "dabb37d79f0ba4498d5b92c873d33c862921eb1cb688181b84b3948306ea66bc",
    "attributions": [
      "https://developer.qweather.com/attribution.html"
    ]
  },
  "hours": [
    {
      "forecastTime": "2024-05-31T03:00Z",
      "condition": {
        "text": "Overcast",
        "code": "104"
      },
      "temperature": {
        "value": 31.12,
        "unit": "°C"
      },
      "feelsLike": {
        "value": 34.31,
        "unit": "°C"
      },
      "humidity": 0.76,
      "wind": {
        "direction": {
          "degree": 215,
          "compass": "sw"
        },
        "speed": {
          "value": 3.42,
          "unit": "m/s"
        },
        "scale": 3
      },
      "windGust": {
        "value": 8.16,
        "unit": "m/s"
      },
      "precipitation": {
        "amount": {
          "value": 0.09,
          "unit": "mm"
        },
        "intensity": {
          "value": 0.09,
          "unit": "mm/h"
        },
        "probability": 0.31,
        "type": "rain"
      },
      "pressure": {
        "value": 1001.5,
        "unit": "hPa"
      },
      "visibility": {
        "value": 14780,
        "unit": "m"
      },
      "dewPoint": {
        "value": 26.44,
        "unit": "°C"
      },
      "cloudCover": 0.92,
      "uvIndex": 6
    },
    {
      "forecastTime": "2024-05-31T04:00Z",
      "condition": {
        "text": "Cloudy",
        "code": "101"
      },
      "temperature": {
        "value": 31.01,
        "unit": "°C"
      },
      "feelsLike": {
        "value": 34.34,
        "unit": "°C"
      },
      "humidity": 0.77,
      "wind": {
        "direction": {
          "degree": 217,
          "compass": "sw"
        },
        "speed": {
          "value": 3.28,
          "unit": "m/s"
        },
        "scale": 2
      },
      "windGust": {
        "value": 8.04,
        "unit": "m/s"
      },
      "precipitation": {
        "amount": {
          "value": 0.21,
          "unit": "mm"
        },
        "intensity": {
          "value": 0.21,
          "unit": "mm/h"
        },
        "probability": 0.3,
        "type": "rain"
      },
      "pressure": {
        "value": 1000.8,
        "unit": "hPa"
      },
      "visibility": {
        "value": 14630,
        "unit": "m"
      },
      "dewPoint": {
        "value": 26.58,
        "unit": "°C"
      },
      "cloudCover": 0.61,
      "uvIndex": 7
    }
  ]
}
  • metadata
    object
    Metadata for this response
    • tag
      string
      Unique data identifier
    • attributions
      array
      Data attribution or statements that must be displayed with the response data
  • hours
    array
    Hourly weather forecast list
    • forecastTime
      date-time
      Forecast time in ISO 8601 format
    • condition
      object
      • text
        string
        Localized weather-condition description
      • code
        string
        Weather condition code
    • temperature
      object
      Temperature data
      • value
        number
        Value
      • unit
        string
    • feelsLike
      object
      Feels like temperature
      • value
        number
        Value
      • unit
        string
    • humidity
      number
      Relative humidity. Value range: [0, 1]
    • wind
      object
      Wind object
      • direction
        object
        • degree
          number
          Wind direction in degrees, value range: [0, 365]
        • compass
          string

          Wind direction compass code

          Possibe values: n, nne, ne, ene, e, ese, se, sse, s, ssw, sw, wsw, w, wnw, nw, nnw, none, vrb

      • speed
        object
        Wind speed
        • value
          number
          Value
        • unit
          string
      • scale
        number
    • windGust
      object
      Wind gust speed
      • value
        number
        Value
      • unit
        string
    • precipitation
      object
      Precipitation data
      • amount
        object
        Accumulated precipitation amount for the data period
        • value
          number
          Value
        • unit
          string
      • intensity
        object
        Precipitation intensity
        • value
          number
          Value
        • unit
          string
      • type
        string

        Precipitation type

        Possible Values: rain, snow, ice, mixed, none, unknown

      • probability
        number
        Forecast precipitation probability. Value range: [0, 1]
    • pressure
      object
      Sea-level pressure
      • value
        number
        Value
      • unit
        string
    • visibility
      object
      Visibility
      • value
        number
        Value
      • unit
        string
    • dewPoint
      object
      Dew point temperature
      • value
        number
        Value
      • unit
        string
    • cloudCover
      number
      Cloud cover. Value range: [0, 1]
    • uvIndex
      number
      UV index. Value range: [0, 15]