Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Weather.gov Alerts API

The Alerts API from Weather.gov — 8 operation(s) for alerts.

Weather.gov Alerts API is one of 13 APIs that Weather.gov publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include Alerts. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, and an API reference.

This API exposes 8 operations across 8 paths, and defines 32 schemas. It is described by OpenAPI 3.1.2, at version 3.8.1.

Requests are made against a single base URL, https://api.weather.gov.

8 operations 8 paths 32 schemas 8 GET

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.1.2
API Version
3.8.1
Base URL
https://api.weather.gov
Authentication
API Key, API Key
Resource Areas
1

Authentication & Security 2

Weather.gov Alerts API declares 2 security schemes for authenticating requests. An API key is passed in the header as User-Agent (userAgent). An API key is passed in the header as API-Key (apiKeyAuth). By default, every request must be authenticated.

  • userAgent — We require that all consumers of the API include a User-Agent header in requests. This is due to a high number of scripts exhibiting abusive behavior (intentio…
  • apiKeyAuth — We are testing including a more traditional API Key system on certain endpoints. This is due to a large change in the weather.gov site. The API remains open an…

Paths & Operations 8

Across 8 paths, the API surfaces 8 operations — 8 GET. Each is listed below with its method, path, parameters, and response codes.

Alerts 8
GET
/alerts
Weather.gov Returns All Alerts
alerts_query 17 params → 200301default
GET
/alerts/active
Weather.gov Returns All Currently Active Alerts
alerts_active 12 params → 200301default
GET
/alerts/active/count
Weather.gov Returns Info on the Number of Active Alerts
alerts_active_count → 200default
GET
/alerts/active/zone/{zoneId}
Weather.gov Returns Active Alerts for the Given NWS Public Zone or County
alerts_active_zone 1 param → 200default
GET
/alerts/active/area/{area}
Weather.gov Returns Active Alerts for the Given Area (state or Marine Area)
alerts_active_area 1 param → 200default
GET
/alerts/active/region/{region}
Weather.gov Returns Active Alerts for the Given Marine Region
alerts_active_region 1 param → 200default
GET
/alerts/types
Weather.gov Returns a List of Alert Types
alerts_types → 200default
GET
/alerts/{id}
Weather.gov Returns a Specific Alert
alerts_single 1 param → 200default

Schemas 32

The contract defines 32 schemas that model the data the API accepts and returns. The most detailed are Alert (30 properties), AlertAtomEntry (19 properties), AlertAtomFeed (6 properties), ProblemDetail (6 properties). Each schema is shown below with its type and property counts.

AlertJsonLd
object
1 property
GeoJsonFeature
object
A GeoJSON feature. Please refer to IETF RFC 7946 for information on the GeoJSON format.
5 properties 3 required
ProblemDetail
object
Detail about an error. This document conforms to RFC 7807 (Problem Details for HTTP APIs).
6 properties 6 required
AlertXMLParameter
object
2 properties
Alert
object
An object representing a public alert message. Unless otherwise noted, the fields in this object correspond to the National Weather Service CAP v1.2 specificat…
30 properties
AlertCollection
object
3 properties
AlertUrgency
string
GeoJsonGeometry
A GeoJSON geometry object. Please refer to IETF RFC 7946 for information on the GeoJSON format.
AlertSeverity
string
AlertId
string
The identifier of the alert message.
AlertAtomFeed
object
An alert feed in Atom format
6 properties
NWSZoneID
string
UGC identifier for a NWS forecast zone or county. The first two letters will correspond to either a state code or marine area code (see /components/schemas/Sta…
GeoJsonFeatureCollection
object
A GeoJSON feature collection. Please refer to IETF RFC 7946 for information on the GeoJSON format.
3 properties 2 required
AlertGeoJson
StateTerritoryCode
string
PointString
string
GeoJsonCoordinate
array
A GeoJSON coordinate. Please refer to IETF RFC 7946 for information on the GeoJSON format.
GeoJsonBoundingBox
array
A GeoJSON bounding box. Please refer to IETF RFC 7946 for information on the GeoJSON format.
AreaCode
State/territory codes and marine area codes
AlertCollectionGeoJson
MarineAreaCode
string
Marine area code as defined in NWS Directive 10-302: AM: Western North Atlantic Ocean and along U.S. East Coast south of Currituck Beach Light NC following the…
AlertCap
object
AlertCertainty
string
AlertStatus
string
AlertCollectionJsonLd
MarineRegionCode
string
Marine region code. These are groups of marine areas combined. AL: Alaska waters (PK) AT: Atlantic Ocean (AM, AN) GL: Great Lakes (LC, LE, LH, LM, LO, LS, SL)…
PaginationInfo
object
Links for retrieving more data from paged data sets
1 property 1 required
GeoJsonLineString
array
A GeoJSON line string. Please refer to IETF RFC 7946 for information on the GeoJSON format.
AlertMessageType
string
GeoJsonPolygon
array
A GeoJSON polygon. Please refer to IETF RFC 7946 for information on the GeoJSON format.
AlertAtomEntry
object
An alert entry in an Atom feed
19 properties
JsonLdContext

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

weather-gov-alerts-api-openapi.yml Raw ↑

Other APIs Weather.gov publishes across the network.

Weather.gov Aviation API
Weather.gov Glossary API
Weather.gov Gridpoints API
Weather.gov Icons API
Weather.gov Offices API
Weather.gov Points API
Weather.gov Products API
Weather.gov Radar API
Weather.gov Radio API
Weather.gov Stations API
Weather.gov Thumbnails API
Weather.gov Zones API