Weather Warning
Weather Warning API for getting real-time local severe weather warning.
Only China data is supported
Request URL #
-
Pro
https://api.qweather.com/v7/warning/now?[params]
-
Dev
https://devapi.qweather.com/v7/warning/now?[params]
Request Parameters #
All parameters are separated by &
. If no optional parameters are set, the default value will be used.
key
API authentication key, please refer to How To Get Your Key. Support Signature Authentication.
For example: key=12334567890ABC
location
The location to be queried, support LocationID or comma-separated longitude and latitude, LocationID can be obtained by GeoAPI.
For example: location=101010100
or location=116.41,39.92
lang
Multi-language settings, only support Chinese and English for this data.
zh
Chinese, defaulten
English
Response #
If there is no warning information in the queried location, the
warning
field is empty.
// Yulong's weather warning
// Pro API: https://api.qweather.com/v7/warning/now?location=101291406&lang=en&key=YOUR_KEY
// Dev API: https://devapi.qweather.com/v7/warning/now?location=101291406&lang=en&key=YOUR_KEY
{
"code": "200",
"updateTime": "2021-03-17T11:44+08:00",
"fxLink": "http://hfx.link/1u1q5",
"warning": [
{
"id": "10129140620210317112916622833999",
"sender": "Yulong_Naxi_Autonomous_County_meteorological_station",
"pubTime": "2021-03-17T11:29+08:00",
"title": "Yulong Naxi Autonomous County meteorological station issued gale blue warning [grade IV / general]",
"startTime": "2021-03-17T11:29+08:00",
"endTime": "2021-03-17T16:29+08:00",
"status": "active",
"level": "Blue",
"type": "11B06",
"typeName": "Gale",
"text": "Yulong county meteorological station issued a strong wind blue warning signal at 11:30 on March 17: it is estimated that the average wind force in most areas of our county today is 4-5, and the local gust can reach 7 or above, which may cause strong wind disaster. Please strengthen prevention.",
"related": ""
}
],
"refer": {
"sources": [
"12379",
"Weather China"
],
"license": [
"commercial license"
]
}
}
Parameters | Description |
---|---|
code |
API status code, please refer to Status Code |
updateTime |
|
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, may be null |
warning.level |
Warning level |
warning.type |
Warning type ID |
warning.typeName |
Warning type name |
warning.text |
Description of the warning |
warning.related |
The warning ID associated with this warning, returned when the warning status is |
refer.sources |
Data source and other statements, may be null |
refer.license |
Data license, may be null |