Weather Warning City List
Get a list of cities for the specified country or region where weather warnings are currently in effect.
See also Weather warning API to get warning details.
Note: Weather Warning City List only supports China (including Hong Kong, Macao and China Taiwan) now. For other countries and regions, please use Weather Warning.
Tips: For more warning description, see Resource - Warning Info.
Request URL
https://api.qweather.com/v7/warning/list?{QueryParams}
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.
-
range
(required)Set country or region, ISO 3166 format, example:range=cn
orrange=hk
. Currently this function only supports city list in China (including Hong Kong, Macao and China Taiwan), for other countries and regions please use Weather Warning to get it separately. -
key
(required)API authentication key, please refer to How To Get Your Key. Support Signature Authentication. Example:key=12334567890ABC
Request Example
Response
The response is in JSON format and is Gzip compressed.
{
"code": "200",
"updateTime": "2020-06-21T05:39+00:00",
"warningLocList": [
{
"locationId": "101010800"
},
{
"locationId": "101011200"
},
{
"locationId": "101011400"
},
{
"locationId": "101020700"
},
{
"locationId": "101040400"
},
{
"locationId": "101041900"
},
{
"locationId": "101043400"
},
{
"locationId": "101043600"
},
{
"locationId": "101050106"
},
{
"locationId": "101050107"
},
{
"locationId": "101050301"
},
{
"locationId": "101050302"
},
{
"locationId": "101050303"
},
{
"locationId": "101130103"
},
{
"locationId": "101130109"
},
{
"locationId": "101130114"
},
{
"locationId": "101130302"
},
{
"locationId": "101130303"
},
{
"locationId": "101130409"
},
{
"locationId": "101130610"
},
{
"locationId": "101130611"
},
{
"locationId": "101130613"
},
{
"locationId": "101130614"
},
{
"locationId": "101131920"
},
{
"locationId": "101221008"
},
{
"locationId": "101230507"
},
{
"locationId": "101132101"
},
{
"locationId": "101132201"
},
{
"locationId": "101132301"
}
],
"refer": {
"sources": [
"12379",
"QWeather"
],
"license": [
"QWeather Developers License"
]
}
}
-
code
See Status Code -
updateTime
API last update time -
warningLocList.locationId
List of Location ID for warning -
refer.sources
Data source and other statements, may be null -
refer.license
Data license, may be null