---
title: "Alerts"
method: GET
path: "/alerts"
---

# Alerts

`GET /alerts`

Returns a list of weather alerts for the given location, or all weather
alerts if no location given.

If you supply either `warn_cell_id` or both `lat` and `lon`, Bright Sky
will return additional information on that cell in the `location` field.
Warn cell IDs are municipality (_Gemeinde_) cell IDs.

### Notes

* The DWD divides Germany's area into roughly 11,000 "cells" based on
  municipalities (_Gemeinden_), and issues warnings for each of these
  cells. Most warnings apply to many cells.
* Bright Sky will supply information on the cell that a given lat/lon
  belongs to in the `location` field.
* There is also a set of roughly 400 cells based on districts
  (_Landkreise_) that is not supported by Bright Sky.
* The complete list of cells can be found on the DWD GeoServer (see below).

### Additional resources

* [Live demo of a simple interactive alerts map](https://brightsky.dev/demo/alerts/)
* [Source for alerts map demo](https://github.com/jdemaeyer/brightsky/blob/master/docs/demo/alerts/index.html)
* [Map view of all current alerts by the DWD](https://www.dwd.de/DE/wetter/warnungen_gemeinden/warnWetter_node.html)
* [List of municipality cells](https://maps.dwd.de/geoserver/wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=Warngebiete_Gemeinden&OUTPUTFORMAT=json)
* [List of district cells (*not used by Bright Sky!*)](https://maps.dwd.de/geoserver/wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=Warngebiete_Kreise&OUTPUTFORMAT=json)
* [Raw data on the Open Data Server](https://opendata.dwd.de/weather/alerts/cap/COMMUNEUNION_DWD_STAT/)
* [DWD Documentation on alert fields and their allowed contents (English)](https://www.dwd.de/DE/leistungen/opendata/help/warnungen/cap_dwd_profile_en_pdf_2_1_13.pdf?__blob=publicationFile&v=3)
* [DWD Documentation on alert fields and their allowed contents (German)](https://www.dwd.de/DE/leistungen/opendata/help/warnungen/cap_dwd_profile_de_pdf_2_1_13.pdf?__blob=publicationFile&v=3)

## Query parameters

- `lat` number — Latitude in decimal degrees.
- `lon` number — Longitude in decimal degrees.
- `warn_cell_id` integer — Municipality warn cell ID.
- `tz` string — Timezone in which record timestamps will be presented, as <a href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones">tz database name</a>. Will also be used as timezone when parsing `date` and `last_date`, unless these have explicit UTC offsets. If omitted but `date` has an explicit UTC offset, that offset will be used as timezone. Otherwise will default to UTC.

## Response `200`

Successful Response

- AlertsResponse
  - `alerts` Alert[]
    - `id` integer — Bright Sky-internal ID for this alert
    - `alert_id` string — Unique CAP message identifier
    - `status` 'actual' | 'test' — Alert status
    - `effective` string, date-time — Alert issue time
    - `onset` string, date-time — Expected event begin time
    - `expires` string, date-time, nullable — Expected event end time
    - `category` 'met' | 'health', nullable — Alert category, meteorological message (`met`) or public health related message (`health`)
    - `response_type` 'prepare' | 'allclear' | 'none' | 'monitor', nullable — Code denoting type of action recommended for target audience
    - `urgency` 'immediate' | 'future', nullable — Alert time frame
    - `severity` 'minor' | 'moderate' | 'severe' | 'extreme', nullable — Alert severity
    - `certainty` 'observed' | 'likely', nullable — Alert certainty
    - `event_code` integer, nullable — DWD event code
    - `event_en` string, nullable — Label for DWD event code (English)
    - `event_de` string, nullable — Label for DWD event code (German)
    - `headline_en` string — Alert headline (English)
    - `headline_de` string — Alert headline (German)
    - `description_en` string — Alert description (English)
    - `description_de` string — Alert description (German)
    - `instruction_en` string, nullable — Additional instructions and safety advice (English)
    - `instruction_de` string, nullable — Additional instructions and safety advice (German)
  - `location` Location
    - `warn_cell_id` integer — Municipality warn cell ID of given location
    - `name` string — Municipality name
    - `name_short` string — Shortened municipality name
    - `district` string — District name
    - `state` string — Federal state name
    - `state_short` string — Shortened federal state name

## Other responses

- `404` — Not Found
- `422` — Validation Error

---

[API](https://skmtc.dev/brightsky/apis/bright-sky.md) · [All operations](https://skmtc.dev/brightsky/apis/bright-sky/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/brightsky/bright-sky/revisions/d9d6acc7794a/schema)
