格点逐小时天气预报

获取中国境内任意1公里范围内的高精度逐小时天气预报,包括:温度、湿度、大气压、天气状况、风力、风向等。

本数据仅支持中国境内地区数据。

请求URL #

  • 商业版https://api.qweather.com/v7/grid-weather/24h?[请求参数]

请求参数 #

请求参数包括必选和可选参数,如不填写可选参数将使用其默认值,参数之间使用&进行分隔。

key

用户认证key,请参考如何获取你的KEY。支持数字签名方式进行认证。例如 key=123456789ABC

location

需要查询地区的以英文逗号分隔的经度,纬度坐标(十进制)。例如 location=116.41,39.92

lang

多语言设置,默认中文,当数据不匹配你设置的语言时,将返回英文或其本地语言结果。

unit

度量衡单位参数选择,例如温度选摄氏度或华氏度、公里或英里。默认公制单位

  • m 公制单位,默认
  • i 英制单位

返回数据 #

// 坐标116.41,39.92 24小时逐小时预报
// 商业版: https://api.qweather.com/v7/grid-weather/24h?location=116.41,39.92&key=你的KEY

{
  "code": "200",
  "updateTime": "2021-03-12T17:55+08:00",
  "fxLink": "http://hfx.link/1",
  "hourly": [
    {
      "fxTime": "2021-03-12T20:00+00:00",
      "temp": "8",
      "icon": "154",
      "text": "阴",
      "windDir": "北风",
      "windScale": "1-2",
      "precip": "0.0"
    },
    {
      "fxTime": "2021-03-12T21:00+00:00",
      "temp": "8",
      "icon": "154",
      "text": "阴",
      "windDir": "北风",
      "windScale": "1-2",
      "precip": "0.0"
    },
    {
      "fxTime": "2021-03-12T22:00+00:00",
      "temp": "7",
      "icon": "154",
      "text": "阴",
      "windDir": "北风",
      "windScale": "1-2",
      "precip": "0.0"
    },
    {
      "fxTime": "2021-03-12T23:00+00:00",
      "temp": "7",
      "icon": "154",
      "text": "阴",
      "windDir": "北风",
      "windScale": "1-2",
      "precip": "0.0"
    },
    {
      "fxTime": "2021-03-13T00:00+00:00",
      "temp": "7",
      "icon": "101",
      "text": "多云",
      "windDir": "北风",
      "windScale": "1-2",
      "precip": "0.0"
    },
    {
      "fxTime": "2021-03-13T01:00+00:00",
      "temp": "7",
      "icon": "101",
      "text": "多云",
      "windDir": "北风",
      "windScale": "1-2",
      "precip": "0.0"
    },
    {
      "fxTime": "2021-03-13T02:00+00:00",
      "temp": "7",
      "icon": "101",
      "text": "多云",
      "windDir": "北风",
      "windScale": "1-2",
      "precip": "0.0"
    },
    {
      "fxTime": "2021-03-13T03:00+00:00",
      "temp": "7",
      "icon": "101",
      "text": "多云",
      "windDir": "北风",
      "windScale": "1-2",
      "precip": "0.0"
    },
    {
      "fxTime": "2021-03-13T04:00+00:00",
      "temp": "7",
      "icon": "101",
      "text": "多云",
      "windDir": "北风",
      "windScale": "1-2",
      "precip": "0.0"
    },
    {
      "fxTime": "2021-03-13T05:00+00:00",
      "temp": "7",
      "icon": "101",
      "text": "多云",
      "windDir": "西北风",
      "windScale": "1-2",
      "precip": "0.0"
    },
    {
      "fxTime": "2021-03-13T06:00+00:00",
      "temp": "7",
      "icon": "101",
      "text": "多云",
      "windDir": "西风",
      "windScale": "1-2",
      "precip": "0.0"
    },
    {
      "fxTime": "2021-03-13T07:00+00:00",
      "temp": "8",
      "icon": "101",
      "text": "多云",
      "windDir": "西风",
      "windScale": "1-2",
      "precip": "0.0"
    },
    {
      "fxTime": "2021-03-13T08:00+00:00",
      "temp": "8",
      "icon": "101",
      "text": "多云",
      "windDir": "西风",
      "windScale": "1-2",
      "precip": "0.0"
    },
    {
      "fxTime": "2021-03-13T09:00+00:00",
      "temp": "10",
      "icon": "101",
      "text": "多云",
      "windDir": "西风",
      "windScale": "1-2",
      "precip": "0.0"
    },
    {
      "fxTime": "2021-03-13T10:00+00:00",
      "temp": "12",
      "icon": "101",
      "text": "多云",
      "windDir": "西风",
      "windScale": "1-2",
      "precip": "0.0"
    },
    {
      "fxTime": "2021-03-13T11:00+00:00",
      "temp": "12",
      "icon": "101",
      "text": "多云",
      "windDir": "北风",
      "windScale": "1-2",
      "precip": "0.0"
    },
    {
      "fxTime": "2021-03-13T12:00+00:00",
      "temp": "13",
      "icon": "101",
      "text": "多云",
      "windDir": "北风",
      "windScale": "1-2",
      "precip": "0.0"
    },
    {
      "fxTime": "2021-03-13T13:00+00:00",
      "temp": "14",
      "icon": "154",
      "text": "阴",
      "windDir": "北风",
      "windScale": "1-2",
      "precip": "0.0"
    },
    {
      "fxTime": "2021-03-13T14:00+00:00",
      "temp": "14",
      "icon": "101",
      "text": "多云",
      "windDir": "北风",
      "windScale": "1-2",
      "precip": "0.0"
    },
    {
      "fxTime": "2021-03-13T15:00+00:00",
      "temp": "15",
      "icon": "101",
      "text": "多云",
      "windDir": "东北风",
      "windScale": "1-2",
      "precip": "0.0"
    },
    {
      "fxTime": "2021-03-13T16:00+00:00",
      "temp": "15",
      "icon": "101",
      "text": "多云",
      "windDir": "东北风",
      "windScale": "1-2",
      "precip": "0.0"
    },
    {
      "fxTime": "2021-03-13T17:00+00:00",
      "temp": "14",
      "icon": "101",
      "text": "多云",
      "windDir": "东北风",
      "windScale": "1-2",
      "precip": "0.0"
    },
    {
      "fxTime": "2021-03-13T18:00+00:00",
      "temp": "12",
      "icon": "101",
      "text": "多云",
      "windDir": "东北风",
      "windScale": "1-2",
      "precip": "0.0"
    },
    {
      "fxTime": "2021-03-13T19:00+00:00",
      "temp": "11",
      "icon": "101",
      "text": "多云",
      "windDir": "东风",
      "windScale": "1-2",
      "precip": "0.0"
    }
  ],
  "refer": {
    "sources": [
      "Weather China"
    ],
    "license": [
      "commercial license"
    ]
  }
}
参数 描述
code

API状态码,具体含义请参考状态码

updateTime

当前API的最近更新时间

fxLink

当前数据的响应式页面,便于嵌入网站或应用

hourly.fxTime

预报时间

hourly.temp

温度,默认单位:摄氏度

hourly.icon

天气状况和图标的代码,图标可通过天气状况和图标下载

hourly.text

天气状况的文字描述,包括阴晴雨雪等天气状态的描述

hourly.windDir

风向

hourly.windScale

风力等级

hourly.precip

当前小时累计降水量,默认单位:毫米

refer.sources

原始数据来源,或数据源说明,可能为空

refer.license

数据许可或版权声明,可能为空