Weather Warning
Get officially issued real-time severe weather warning data around the world.
Hint: For the implementation of weather warnings, see Resource - Warning Info in advance.
Request URL
https://api.qweather.com/v7/warning/now
For Free subscription, change the API Host to devapi.qweather.com
. See data available for Free subscription.
Request Parameters
All parameters are separated by &
. If no optional parameters are set, the default value will be used.
-
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
orlocation=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
Replace your_token
with your JWT or learn more about Authentication
Response
The response is in JSON format and is Gzip compressed.
{
"code": "200",
"updateTime": "2023-04-03T14:20+08:00",
"fxLink": "https://www.qweather.com/severe-weather/shanghai-101020100.html",
"warning": [
{
"id": "10102010020230403103000500681616",
"sender": "上海中心气象台",
"pubTime": "2023-04-03T10:30+08:00",
"title": "上海中心气象台发布大风蓝色预警[Ⅳ级/一般]",
"startTime": "2023-04-03T10:30+08:00",
"endTime": "2023-04-04T10:30+08:00",
"status": "active",
"level": "",
"severity": "Minor",
"severityColor": "Blue",
"type": "1006",
"typeName": "大风",
"urgency": "",
"certainty": "",
"text": "上海中心气象台2023年04月03日10时30分发布大风蓝色预警[Ⅳ级/一般]:受江淮气旋影响,预计明天傍晚以前本市大部地区将出现6级阵风7-8级的东南大风,沿江沿海地区7级阵风8-9级,请注意防范大风对高空作业、交通出行、设施农业等的不利影响。",
"related": ""
}
],
"refer": {
"sources": [
"12379"
],
"license": [
"QWeather Developers License"
]
}
}
Note: If there is no warning information in the queried location, the
warning
field is empty.
-
code
See Status Code -
updateTime
API last update time -
fxLink
Responsive web page of this data, for embedded in website or APP -
warning.id
The unique ID of this warning, which can be used to determine whether this warning already exists. -
warning.sender
Warning issuing unit, may be null -
warning.pubTime
Warning release time -
warning.title
Title of warning -
warning.startTime
Warning start time, may be null -
warning.endTime
End time of warning, may be null -
warning.status
Warning status -
warning.level
Warning level (deprecated), Do not usewarning.level
anymore, this field is deprecated and the value will be null or out of date. Please usesseverity
andseverityColor
instead -
warning.severity
Warning severity -
warning.severityColor
Preferred color for severity, may be null -
warning.type
Warning type ID -
warning.typeName
Warning type name -
warning.urgency
The urgency of the warning message, may be null -
warning.certainty
The certainty of the warning message, may be null -
warning.text
Description of the warning -
warning.related
The warning ID associated with this warning, returned when the warning status iscancel
orupdate
. May be null -
refer.sources
Data source and other statements, may be null -
refer.license
Data license, may be null