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.
Endpoint
/v7/warning/list
Parameters
Query parameters
-
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.
Request example
curl -X GET --compressed \
-H 'Authorization: Bearer your_token' \
'https://your_api_host/v7/warning/list?range=cn'
Replace your_token
and your_api_host
with your JWT Authentication and API Host
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