Description

The National Weather Service (National Weather Service) issues weather alerts

Returns National Weather Service Alerts based on query location.

Alerts are updated every five minutes.

Endpoint

The National Weather Service alerts endpoint is: nwsalertsintersectionlatlng

Returns all National Weather Service alerts whose "target areas" include the lat/lng point used in the query and whose expiration time is later than the current time of the query.

Query fields

Field Description
lat latitude of query point
lng longitude of query point

Primary response fields

Field Description
results an array of results

Result fields

Field Description
areadesc text names of the Public Forecast Zones affected, e.g. "West Slopes North Central Cascades and Passes
category "Met"
certainty e.g. Likely, Possible, Observed
effective effective timestamp with time zone
event e.g. High Wind Warning. See https://www.weather.gov/lwx/WarningsDefined for a full list of events and descriptions.
expires timestamp with time zone
fips6 list of affected counties by FIPS code
geojson polygon in geojson format when alert has a polygon region rather than Public Forecast Zones
id id of the alert
link link to source posting at NWS.
msgtyp Alert
published timestamp with time zone
samecodes list of regions affected by Specific Area Message Encoding numbers
severity Minor, Moderate, Severe
status e.g. Actual
summary text summary
target_areas text names of the affected areas
title text
ugc zone numbers for Public Zones
updated timestamp with time zone
urgency Expected, Futurem Immediate
vtec valid time event code

Example request and response in python

import requests

headers = {'x-api-key':'your_key'}

payload = {
           'lat':48.621',
           'lng':'-121.442'   
           }
r = requests.get('https://api.giraffegeo.com/nwsalertsintersectionlatlng',headers=headers,params=payload)
r = r.json()


{
  "results": [
  {
  "ugc": ["WAZ567","WAZ568","WAZ569"],
  "msgtype": "Alert",
  "id": "https://alerts.weather.gov/cap/wwacapget.php?x=WA12587350EAA0.SpecialWeatherStatement.12587352D3B0WA.SEWSPSSEW.677c8756734c6b7753d47d2ccc8132b9",
  "category": "Met",
  "severity": "Minor",
  "title": "Special Weather Statement issued November 01 at 3:48AM PDT by NWS",
  "event": "Special Weather Statement",
  "current": "2017-11-01 22:14:39 UTC",
  "areadesc": "West Slopes North Cascades and Passes; West Slopes North Central Cascades and Passes; West Slopes South Central Cascades and Passes",
  "status": "Actual",
  "updated": "2017-11-01 10:48:00 UTC",
  "fips6": ["053033","053041","053053","053057","053061","053073"],
  "expires": "2017-11-01 23:00:00 UTC",
  "vtec": null,
  "link": "",
  "effective": "2017-11-01 10:48:00 UTC",
  "target_areas": [
    "\"West Slopes North Cascades and Passes\"",
    "\"West Slopes North Central Cascades and Passes\"",
    "\"West Slopes South Central Cascades and Passes\""
  ],
  "certainty": "Observed",
  "summary": "...COOL AND WET WEATHER RETURNS TO THE CASCADES THIS WEEK... A change in the weather pattern will bring cool and wet weather back to the west slopes of the Cascades starting on Wednesday and continuing into this weekend. Snow showers may make travel across the Cascades more difficult through this weekend. A cool upper level low will move over the region late Wednesday",
  "published": "2017-11-01 10:48:00 UTC",
  "samecodes": ["053033","053041","053053","053057","053061","053073"],
  "urgency": "Expected"
},
{
  "ugc": ["WAZ567","WAZ568","WAZ569"],
  "msgtype": "Alert",
  "id": "https://alerts.weather.gov/cap/wwacapget.php?x=WA125873528DC4.SpecialWeatherStatement.125873606840WA.SEWSPSSEW.677c8756734c6b7753d47d2ccc8132b9",
  "category": "Met",
  "severity": "Minor",
  "title": "Special Weather Statement issued November 01 at 2:21PM PDT by NWS",
  "event": "Special Weather Statement",
  "current": "2017-11-01 22:14:39 UTC",
  "areadesc": "West Slopes North Cascades and Passes; West Slopes North Central Cascades and Passes; West Slopes South Central Cascades and Passes",
  "status": "Actual",
  "updated": "2017-11-01 21:21:00 UTC",
  "fips6": ["053033","053041","053053","053057","053061","053073"],
  "expires": "2017-11-02 12:00:00 UTC",
  "vtec": null,
  "link": "",
  "effective": "2017-11-01 21:21:00 UTC",
  "target_areas": [
    "\"West Slopes North Cascades and Passes\"",
    "\"West Slopes North Central Cascades and Passes\"",
    "\"West Slopes South Central Cascades and Passes\""
  ],
  "certainty": "Observed",
  "summary": "...The snow level will plummet Thursday and Thursday night... A cool upper level low will move over Washington on Thursday. The snow level will fall below pass level. Up to a foot of snow is likely to fall in the passes from this weather system. Even the lower elevation foothills could see a couple inches of snow by daybreak Friday. Be prepared for winter driving conditions.",
  "published": "2017-11-01 21:21:00 UTC",
  "samecodes": ["053033","053041","053053","053057","053061","053073"],
  "urgency": "Expected"
}
]
}