Alerts
https://phrases.api.xweather.com/alerts/
The Alerts endpoint provides a concise summary of any and all active government issued alerts for a specified location. It allows for quick retrieval of severe weather information, offering filtered insights at a glance. This includes the type of weather alert, the severity, and the duration for which the alert is valid.
This endpoint utilizes data from the classic Alerts (opens in a new tab) endpoint. Please refer to the linked documentation for more details on the upstream sources as well as the full list of available alert types.
Requests
The request URL should be in the following format:
https://phrases.api.xweather.com/alerts/?client_id={client_id}&client_secret={client_secret}&{params}
Supported Parameters
The following parameters are optional unless otherwise noted:
Parameter | Description | Format |
---|---|---|
stream | Type: stringWhether to stream the results in real-time. The default value is false . | stream=:boolean |
units | Type: stringThe units to use for the results. The default value is both . Valid values are: both , imperial , metric . | units=:string |
personality | Type: stringThe personality to use for the results. The default value is default , which is a helpful meteorologist. Valid values are: default , meteorologist , on_air_met , radio_host , shock_jock . | personality=:string |
language | Type: stringThe desired output language of the results. The default value is en . Refer to the list of Supported Languages for the full range of values. | language=:string |
Response
The following is an example of what each object in the response will consist of. Depending on your requested action, the response may contain multiple instances of this object within an array.
Properties
response (string)
The object containing the text summary output.
{
"response": "A cold weather advisory is currently in effect for Pella, IA, due to dangerously low wind chills expected to reach as low as 20 to 30 degrees below zero Fahrenheit (-29 to -34.4 degrees Celsius). This advisory is applicable to much of northern, central, and southern Iowa, and will remain in effect from 9 PM CST this evening until 9 AM CST Thursday. The severe wind chills can cause frostbite on exposed skin in as little as 10 minutes, and prolonged exposure can lead to hypothermia. It is crucial to take precautions to protect against these extreme temperatures."
}