Met Office NSWWS Public API

Issued

GET https://<api base path>/v1.0/objects/issued/<uuid for current latest>  

Retrieves a feature collection of latest warnings in a GeoJSON format.

For simplicity and accuracy you should use the URL supplied by the Atom Feed rather than composing the URL yourself. However, the URL pattern above is supplied for reassurance that you have the right link. This URL is in the feed section at the head of the Atom feed document. It is supplied in the link element which has the rel attribute related, in the href attribute. There is only ever one value for this link in the whole feed, but the URL changes every time the feed is updated.

GeoJSON is an IETF specification for encoding geographic information in JSON. A useful file-viewer is available at http://geojson.io/. NSWWS warnings GeoJSON makes use of the freedom allowed by the spec to put extra information inside the properties section of a GeoJSON feature. The geometry element of a NSWWS warning is always a MultiPolygon.

headers

x-api-key - the key for authenticating your API request.

response

200 with the feature collection containing the latest versions of all warnings issued for the next 7 days at a point when warnings were last issued. It will be in a GeoJSON format. This collection will not include EXPIRED and CANCELLED warnings. Results will be ordered primarily by Risk (Highest risk first) and then chronologically by validFromDate date. The risk order looks primarily at warningLevel (RED > AMBER > YELLOW) then by warningImpact and finally by warningLikelihood (i.e. the position in the Risk Matrix - see the guide to the National Severe Weather Warnings Service for more information).

403 authentication has failed, is your API key correct?

404 this information is either no longer available or the URL is incorrect. Make sure you’re getting the URL from the latest version of the atom feed.

429 you have made too many requests to the API within a short period of time and rate-limiting has been triggered

examples

Making a request

image

Successful response with some latest warnings
{
    "type": "FeatureCollection",
    "features": [
        {
            "type": "Feature",
            "properties": {
                "issuedDate": "2022-06-22T11:54:17Z",
                "weatherType": [
                    "THUNDERSTORM"
                ],
                "warningLikelihood": 4,
                "warningLevel": "YELLOW",
                "warningStatus": "ISSUED",
                "warningHeadline": "Thunderstorms may bring some disruption on Wednesday afternoon and evening",
                "whatToExpect": [
                    "Some flooding of a few homes and businesses, leading to some damage to buildings or structures",
                    "Some damage to a few buildings and structures from lightning strikes",
                    "Driving conditions will be affected by spray, standing water and/or hail, leading to longer journey times by car and bus",
                    "Delays to train services",
                    "Some short term loss of power and other services"
                ],
                "warningId": "79bb1df2-8983-4bbd-888a-66da9c099a1c",
                "warningVersion": "1.0",
                "warningFurtherDetails": "Thunderstorms are expected to develop across northern parts of Scotland during Wednesday afternoon then slowly die out during Wednesday evening.\n\nDespite many areas seeing some showers most sites will see only small amounts of rainfall. However, there is a chance of a few sites seeing 20 mm of rain in an hour and 30-40 mm in 3 hours as well as lightning and some hail.",
                "modifiedDate": "2022-06-22T11:54:17Z",
                "validFromDate": "2022-06-22T11:54:00Z",
                "affectedAreas": [
                    {
                        "regionName": "Highlands & Eilean Siar",
                        "regionCode": "HE",
                        "subRegions": [
                            "Highland"
                        ]
                    },
                    {
                        "regionName": "Orkney & Shetland",
                        "regionCode": "OS",
                        "subRegions": [
                            "Orkney Islands"
                        ]
                    }
                ],
                "warningImpact": 2,
                "validToDate": "2022-06-22T22:59:59Z"
            },
            "geometry": {
                "type": "MultiPolygon",
                "coordinates": [
                    [
                        [
                            [
                                -4.3726,
                                58.7226
                            ],
                            [
                                -4.8779,
                                58.7796
                            ],
                            [
                                -5.2734,
                                58.7796
                            ],
                            [
                                -5.8008,
                                58.1243
                            ],
                            [
                                -5.8447,
                                57.8915
                            ],
                            [
                                -5.647,
                                57.7745
                            ],
                            [
                                -4.5264,
                                57.7041
                            ],
                            [
                                -3.1421,
                                57.8214
                            ],
                            [
                                -2.7466,
                                57.9148
                            ],
                            [
                                -2.4609,
                                58.0895
                            ],
                            [
                                -2.2852,
                                58.4592
                            ],
                            [
                                -2.5049,
                                58.6312
                            ],
                            [
                                -2.8125,
                                58.6884
                            ],
                            [
                                -4.3726,
                                58.7226
                            ]
                        ]
                    ]
                ]
            }
        }
    ]
}
Successful response with no latest warnings
{"type":"FeatureCollection","features":[]}

What you could do next