Weather Warning

Platform: API iOS Android

Get officially issued real-time severe weather warning data around the world.

Hint: For the implementation of weather warnings, see Warning Info in advance.

Request URL

https://api.qweather.com/v7/warning/now?[params]

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.

  • langMulti-language settings, only support Chinese and English for this data. The available value are lang=zh and lang=en

Request Example

Weather warning message for Xiamen

curl -L -X GET --compressed 'https://api.qweather.com/v7/warning/now?location=101230201&lang=en&key=YOUR_KEY'

Response

The response is in JSON format and is Gzip compressed, all fields are Strings.

{
  "code": "200",
  "updateTime": "2021-10-10T12:20+08:00",
  "fxLink": "http://hfx.link/2ax5",
  "warning": [
    {
      "id": "10101010020211009154607668935939",
      "sender": "北京市气象局",
      "pubTime": "2021-10-09T15:46+08:00",
      "title": "北京市气象台2021年10月09日15时40分发布大风蓝色预警信号",
      "startTime": "2021-10-09T15:40+08:00",
      "endTime": "2021-10-10T15:40+08:00",
      "status": "active",
      "level": "蓝色",
      "type": "11B06",
      "typeName": "大风",
      "text": "市气象台2021年10月9日15时40分发布大风蓝色预警信号:预计,9日22时至10日19时,本市大部分地区有4级左右偏北风,阵风6、7级,山区阵风可达8级左右,请注意防范。",
      "related": ""
    }
  ],
  "refer": {
    "sources": [
      "12379"
    ],
    "license": [
      "commercial license"
    ]
  }
}

Note: If there is no warning information in the queried location, the warning field is empty.

  • code API status code, please refer to 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), this field is deprecated and uses severity and severityColor 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 is cancel or update. May be null
  • refer.sources Data source and other statements, may be null
  • refer.license Data license, may be null