格点实时天气
基于数值模式的天气预报数据,提供全球指定坐标的实时天气,分辨率3-5公里。
提示: 格点天气预报是基于数值预报模型生成,不适宜与观测站数据对比。如需基于观测站的城市天气,请使用城市实时天气API。格点天气采用UTC 0时区表示时间。
请求路径#
GET /v7/grid-weather/now参数#
查询参数
-
location(必选) 需要查询地区的以英文逗号分隔的经度,纬度坐标(十进制,最多支持小数点后两位)。例如location=116.41,39.92 -
lang多语言设置,请阅读多语言文档,了解我们的多语言是如何工作、如何设置以及数据是否支持多语言。 -
unit数据单位,可选m(公制,默认)或i(英制)。
请求示例#
curl -X GET --compressed \
-H 'Authorization: Bearer your_token' \
'https://your-api-host/v7/grid-weather/now?location=116.41%2C39.92&lang=zh&unit=m'
请将your_token替换为你的JWT身份认证,将your_api_host替换为你的API Host
返回数据#
{
"code": "200",
"updateTime": "2021-12-16T18:25+08:00",
"fxLink": "https://www.qweather.com",
"now": {
"obsTime": "2021-12-16T10:00+00:00",
"temp": "-1",
"icon": "150",
"text": "晴",
"wind360": "287",
"windDir": "西北风",
"windScale": "2",
"windSpeed": "10",
"humidity": "27",
"precip": "0.0",
"pressure": "1021",
"cloud": "0",
"dew": "-17"
},
"refer": {
"sources": [
"https://developer.qweather.com/attribution.html"
],
"license": [
"QWeather Developers License"
]
}
}
-
fxLinkuri 当前数据的响应式页面,便于嵌入网站或应用 -
nowobject 天气实况数据-
obsTimedate-time 观测时间 -
tempstring 温度,默认单位:摄氏度 -
textstring 天气状况的文字描述,包括阴晴雨雪等天气状态的描述 -
humiditystring 相对湿度,百分比数值 -
precipstring 降水量,默认单位:毫米 -
pressurestring 站点气压,默认单位:百帕 -
cloudstring 云量,百分比数值 -
dewstring 露点温度
-
-
referobject 数据来源和许可信息-
sourcesarray 原始数据来源,或数据源说明,可能为空 -
licensearray 数据许可或版权声明,可能为空
-