Are you getting 403 Forbidden errors? Read the FAQ and check your User-Agent header!

 

NAME

MetAlerts - Weather alerts from the Norwegian Meteorological Institute

DESCRIPTION

Delivers weather alerts in CAP format plus an RSS 2.0 feed of such.

Documentation (in Norwegian) of the MetAlerts service and warnings in CAP format may be found in the MET report Samordning av farevarsler ved MET og NVE (20-2017).

The Farevarselplan (in Norwegian) describes the criteria for issuing alerts.

Also see the instructions on how to use the RSS feed (in Norwegian).

USAGE

Use the RSS feed to get a list of CAP warnings, optionally filtered by query parameters.

Do not download each CAP file more than once, and certainly not every time you download the RSS feed! (this is liable to getting you throttled). Once issued the CAP file never changes, so it should be downloaded only once and stored locally.

Parameters

none

Unless the cap parameter is given, we return an RSS 2.0 feed of alerts

cap

Retrieve CAP XML message with given guid (Note: From 1.0 this is the CAP identifier, not a date!)

lang

Output language, currently "no" or "en" for Norwegian and English, respectively

event

Filter by CAP eventType, legal values are: blowingSnow, forestFire, gale, ice, icing, lightning, polarLow, rain, rainFlood, snow, stormSurge, wind

You can find matching icons (SVG and PNG) for all events on the Yr warning icons repo.

incidentName

Filter by incident

geographicDomain

Filter by land or marine

county (fylke)

Filter by Norwegian county number where available (only land areas, not gale warnings etc). The county number is defined as always having 2 digits, so the counties Østfold to Aust-Agder must be zero prefixed. Currently one single county allowed per request.

Note that the list of counties is undergoing several changes in the period 2018-2020. For an updated list, please see this dataset from SSB.

lat, lon

Coordinates for geographical search (returns all alerts covered by the search location)

Note: This feature is experimental, and may be changed without prior notice!

period

This is used to get historical alerts from the archive, which is segmented by monthly intervals. Use the ISO format for months, on the form YYYY-MM. Periods outside the archive timespan will return error.

Legal values are: 2019-01, 2019-02, 2019-03, 2019-04, 2019-05, 2019-06, 2019-07, 2019-08, 2019-09, 2019-10, 2019-11, 2019-12, 2020-01, 2020-02, 2020-03, 2020-04, 2020-05, 2020-06, 2020-07, 2020-08, 2020-09, 2020-10, 2020-11, 2020-12, 2021-01.

Currently it only contains data for the period Jan 2019 to Jan 2021, but this is planned to be updated continously.

Note: This feature is experimental, and may be changed without prior notice!

show

Alerts to be listed, either "all" to include expired/updated alerts (up to one month past), or nothing to list only current alerts. If period is used, "all" is automatically enabled

sort

Sort RSS items on field (in ascending order). The following fields are available:

Example requests:

https://api.met.no/weatherapi/metalerts/1.1/
https://api.met.no/weatherapi/metalerts/1.1?lang=en
https://api.met.no/weatherapi/metalerts/1.1?show=all
https://api.met.no/weatherapi/metalerts/1.1/?county=42 (show alerts for Agder county)
https://api.met.no/weatherapi/metalerts/1.1/?cap=2.49.0.1.578.0.170912185028.1114 (non-functional example - check RSS feed above for working URLs)

Icons

You can download alerting icons in SVG format (which can be converted to PNG) from the Yr GitHub page:

https://github.com/nrkno/yr-warning-icons

Test warnings

Meteorologists sometimes want to test fictional CAP warnings to check that they work upstream. These can be accessed via RSS at the /test endpoint:

https://api.met.no/weatherapi/metalerts/1.1/test
https://api.met.no/weatherapi/metalerts/1.1/test?cap=...

Available

Available is implemented, but shows only CAP files, not RSS feed. Archive and test warnings are not supported.

https://api.met.no/weatherapi/metalerts/1.1/available
https://api.met.no/weatherapi/metalerts/1.1/available.json?period=2021-01

HEALTHCHECK

To check if any files that should be available are missing, please use https://api.met.no/weatherapi/metalerts/1.1/healthcheck . This is only available on servers on the internal MET network.

Change log

2021-02-10

Added lightning event type.

2021-02-10

Experimental alert archive implemented. Use the period parameter to enable. The RSS feed link has been removed from available, now only lists CAP files.

2019-11-01

The eventCode drivingConditions has now been replaced by the eventCodes ice and blowingSnow to better reflect actual causes instead of consequences

2018-06-19

Support for filter on incidentName

2018-03-08

Support for search by county number (for warnings issued after 2018-03-15)

2017-07-22

Experimental support for search by coordinates

1.1, 2017-05-20

New version of CAP format (1.0). MetAlerts 1.0 will expire 2017-12-01

1.0, 2016-09-01

More search parameters, improved stability

0.2, 2016-04-20

Format officially changed to RSS 2.0

RSS now validates, using RFC-822 date format and no duplicate items

0.1, 2016-03-02

Renamed to MetAlerts. Format claimed to be Atom, but is in fact RSS 2.0 (invalid)

0.1, 2016-01-19

New product for testing