OpenWeather alerts API
OpenWeather alerts API
OpenWeather Alerts service provides users with alerts about the occurrence of certain weather conditions and phenomena on a particular territory. Weather alerts can include both extreme weather events and non-extreme ones.
OpenWeather Alerts are based on our unique OpenWeather ML forecasting model which uses a number of data sources - radars, models from global meteorological agencies (e.g., Met Office, NOAA, ECMWF), weather satellites, and a vast network of weather stations.
Alert is a notification of the occurrence of specified weather conditions or phenomena in an area located or intersecting with the user’s location. The alert is generated based on OpenWeather data or data from the national weather agency.
For each forecasted weather condition and phenomenon, the product contents the following information:
OpenWeather provides a pull API method to allow clients to request alerts data as frequently as required.
Product update time: hourly
Data format: JSON
Product has global coverage.
The service provide users an opportunity to filter alerts by:
How it works
Initially, OpenWeather engineers and meteorologists team select weather parameters and phenomena and their values and establish tailored weather triggers based on critical weather parameters and phenomena relevant to the user's industry and specific circumstances.
Subsequently, the system generates prompt and readily accessible alerts containing forecasted weather information spanning up to 5 days in advance. Each forecasted day is segmented into 24 1-hour intervals, enabling the collection of active alert data for each hour. Consequently, this results in the creation of up to 5*24 hourly segments for the forthcoming 5 days. The system undergoes hourly updates to produce a fresh set of hourly segments for the next 5 days. The most recent set of hourly segments is actual. Forecast duration can be extended upon request.
The system undergoes hourly updates to produce a fresh set of hourly segments for the next 5 days. The most recent set of hourly segments is actual.
Users have the flexibility to customize their received alerts by specifying:
If the user's chosen area of interest intersects with the alert zone, they will receive notifications containing relevant geometrical data pertaining to forecasted or observed weather parameters and phenomena.
Read chapter below to find how to make an API call to get weather alerts.
How to make an API call
In this section you will find detailed information on how to make requests to the OpenWeather Alerts API, examples of API calls and API responses. If you need to make an API call to the location type Point please use the section "API call to the location type Point". If you need to make an API call to the location type Polygon please use the section "API call to the location type Polygon".
To get access to OpenWeather alerts to the location type Polygon please use this section of documentation. If you are interested in OpenWeather alerts to the location type Point please use the section "API call to the location type Point".
In this section you will find detailed information on how to make request to the OpenWeather Alerts API, examples of API call and API response.
https://api.openweathermap.org/alerts/1.0?location={"type":"Polygon","coordinates":[[[lon,lat]...]]}&appid={API key}Parameters | ||
|---|---|---|
location | required | Location of interest with a pair of coordinates: lon - longitude of the coordinates, decimal (-180; 180); lat - latitude of the coordinates, decimal (-90; 90). Location must correspond to the geometry field geojson |
source | optional | Source of alert. Available values: owm, government. To choose all possible sources of alerts leave this field empty |
industry | optional | Industry of interest. Please contact us to customize this parameter in accordance with your needs. |
start_date | optional | Date and time starting from which alerts will be returned in the ISO format. Current time is used if the parameter is not specified.Example: 2024-01-01T12:30:00+00:00 |
end_date | optional | Date and time in ISO format up to which need to get alerts. Next hour is used if the parameter is not specified.Example: 2024-01-01T12:30:00+00:00 |
tags | optional | One or more particular types of weather phenomenon to look for. Available values : coastal_event, extreme_low_temperature, extreme_high_temperature, wind, flood, sand_dust, rain, fire_warning, marine_event, avalanches, fog, air_quality, tornado, cyclone, snow_ice, thunderstorm, hail. To choose all possible tags leave this field empty.Weather phenomenon should be listed in the format: tags=parameter1,parameter2,...parameterNExample: tags=snow,ice,thunderstorm |
severity | optional | Severity of the alert. Available values: unknown, minor, moderate, severe, extreme. To choose all possible severity levels leave this field empty |
certainty | optional | Certainty of the alert. Available values: unknown, unlikely, possible, likely, observed. To choose all possible certainty levels leave this field empty |
urgency | optional | Urgency of the alert. Available values: unknown, future, expected, immediate. To choose all possible urgency levels leave this field empty |
show_location | optional | Displaying the location, specified in the API request, in the API response. Available values: false, true. If you do not use the |
https://api.openweathermap.org/alerts/1.0?location={"type":"Polygon","coordinates":[[[109.072266,-9.62148],[108.896484,-44.787594],[157.060547,-44.787594],[157.763672,-9.62148],[109.072266,-9.62148]]]}&appid={API key}To view the API response, expand the example by clicking the triangle.alert_ID - alert IDsource - source of alerttitle- title of the alertindustry- alerts industriesindustry_name - name of the industrydescription - description of the insight for the industryseverity - severity of the alert for the industrytag - One or more particular types of weather phenomenon to look forlocation - representation of the area, where the alert is forecastedtype - the type of geometry. Possible values: point; polygoncoordinates - List of the coordinates of the polygons verticescertainty - Certainty of the alert. May be one of Observed, Likely, Possible, Unlikely, Unknownurgency - urgency of the alert. May be one of Immediate, Expected, Future, UnknownTo get access to OpenWeather alerts to the location type Point please use this section of documentation. If you are interested in OpenWeather alerts to the location type Polygon please use the section "API call to the location type Polygon".
In this section you will find detailed information on how to make request to the OpenWether Alerts API, examples of API call and API response.
https://api.openweathermap.org/alerts/1.0?location={"type":"Point","coordinates":[lon,lat]}&appid={API key}Parameters | ||
|---|---|---|
location | required | Location of interest with a pair of coordinates: lon - longitude of the coordinates, decimal (-180; 180); lat - latitude of the coordinates, decimal (-90; 90). Location must correspond to the geometry field geojson |
source | optional | Source of alert. Available values: owm, government. To choose all possible sources of alerts leave this field empty |
industry | optional | Industry of interest. Please contact us to customize this parameter in accordance with your needs. |
start_date | optional | Date and time starting from which alerts will be returned in the ISO format. Current time is used if the parameter is not specified.Example: 2024-01-01T12:30:00+00:00 |
end_date | optional | Date and time in ISO format up to which need to get alerts. Next hour is used if the parameter is not specified.Example: 2024-01-01T12:30:00+00:00 |
tags | optional | One or more particular types of weather phenomenon to look for. Available values : coastal_event, extreme_low_temperature, extreme_high_temperature, wind, flood, sand_dust, rain, fire_warning, marine_event, avalanches, fog, air_quality, tornado, cyclone, snow_ice, thunderstorm, hail. To choose all possible tags leave this field empty.Weather phenomenon should be listed in the format: tags=parameter1,parameter2,...parameterNExample: tags=snow,ice,thunderstorm |
severity | optional | Severity of the alert. Available values: unknown, minor, moderate, severe, extreme. To choose all possible severity levels leave this field empty |
certainty | optional | Certainty of the alert. Available values: unknown, unlikely, possible, likely, observed. To choose all possible certainty levels leave this field empty |
urgency | optional | Urgency of the alert. Available values: unknown, future, expected, immediate. To choose all possible urgency levels leave this field empty |
show_location | optional | Displaying the location, specified in the API request, in the API response. Available values: false, true. If you do not use the |
https://api.openweathermap.org/alerts/1.0?&location={"type":"Point","coordinates":[125.850425,-28.464529]}&appid={API key}To view the API response, expand the example by clicking the triangle.count - Number of alerts matched with given filtersitemshour - number of hourdate - date in ISO formatalerts - alert related informationalert_ID - alert IDsource - source of alerttitle- title of the alertindustry- alerts industriesindustry_name - name of the industrydescription - description of the insight for the industryseverity - severity of the alert for the industrytag - One or more particular types of weather phenomenon to look forlocation - representation of the area, where the alert is forecastedtype - the type of geometry. Possible values: point; polygoncoordinates - List of the coordinates of the polygons verticescertainty - Certainty of the alert. May be one of Observed, Likely, Possible, Unlikely, Unknownurgency - urgency of the alert. May be one of Immediate, Expected, Future, UnknownSupporting information
Type of urgency | General description |
| Is calling for immediate attention means right now of or relating to the here and now occurring, acting, or accomplished without loss or interval of time |
| There is some time for preparation. is calling for attention to events expected in the nearest days |
| Is calling for future attention |
| Used for case where urgency is not specified |
Type of certainty | General description |
| For events which have been started in the past or started and continuing |
| Show high probability of event occurrence |
| Show medium probability of event occurrence |
| Show low probability of event occurrence |
| Used for case where certainty is not specified |
Type of severiry | General description |
| Used for case where severity is not specified |
| Probability of serious consequences is small |
| Probability of serious consequences is medium |
| Probability of serious consequences is high |
| Probability of serious consequences is very high |
Name of weather alert | Severity | Weather condition | Industry insight |
| Extreme | temp > 39 | Extreme high temperatures can strain power grids as demand peaks for cooling, potentially leading to grid outages due to increased load. |
| Extreme | temp<= -11 | Extreme low temperatures can significantly elevate heating energy demand, putting additional strain on the power grid and increasing the risk of grid outages. |
| Variable | YES | Coastal events, including storms and high winds, can lead to power grid outages due to damage to coastal infrastructure and power lines. |
API errors
In case of incorrected API call you will receive an API error response. Error response payload returned for all types of errors with the structure below.
{
"code":400,
"message":"Invalid parameter format",
"parameters": [
"lat"
]
}
code - Code of errormessage - Description of errorparameters(optional) - List of request parameters names that are related to this particular errorAPI calls return an error 400
API calls return an error 401
API calls return an error 404
API calls return an error 500