Overview

The National Weather Service (NWS) API allows developers access to critical forecasts, alerts, and observations, along with other weather data. The API was designed with a cache-friendly approach that expires content based upon the information life cycle. The API is based upon of JSON-LD to prommote machine data discovery.

The API is located at: https://api.weather.gov

Operational issues should be reported to nco.ops@noaa.gov.

General use questions can be asked on the API github site.

Content Negotiation

The new API will use headers to modify the version and format of the response. Every request, either by browser or application, sends header information every time you visit any website. For example, a commonly used header called "UserAgent" tells a website what type of device you are using so it can tailor the best experience for you. No private information is shared in a header, and this is a standard practice for all government and private sites. Developers can override these headers for specific purposes (see the "API Specifications" tab for more information). You can get full details by visiting the header field definitions page at the World Wide Web Consortium site.

Authentication

Format the response

Request new features

Authentication

A User Agent is required to identify your application. This string can be anything, and the more unique to your application the less likely it will be affected by a security event. If you include contact information (website or email), we can contact you if your string is associated to a security event. This will be replaced with an API key in the future.

User-Agent: (myweatherapp.com, contact@myweatherapp.com)

Formats

Endpoints typically have a GeoJSON default format, given the inclusion of geometry data. See the Specification tab for details on each endpoint. Below are common formats available by the API.

GeoJSON: application/geo+json

application/geo+json JSON-LD: application/ld+json

application/ld+json DWML: application/vnd.noaa.dwml+xml

application/vnd.noaa.dwml+xml OXML: application/vnd.noaa.obs+xml

application/vnd.noaa.obs+xml CAP: application/cap+xml

application/cap+xml ATOM: application/atom+xml

Accept: application/cap+xml

Features

The API will use feature flags to make new features available to consumers. The available feature flags will be noted on the "Updates" tab on this page. The feature flag will be communicated through a Service Change Notice (SCN) allowing developers a period to adopt the flag if the change impacts their applications. Once the adoption window expires, the feature will be made default. Developers can then remove the flag at their convenience.

Feature-Flag: forecast_temperature_qv

Outage Information

Information on outages is generally communicated through Administrative messages sent by National Center of Environmental Prediction's (NCEP's) Senior Duty Meteorologist (SDM). These are sent via WMO id NOUS42 KWNO and product identifier ADMNFD. On 30 April 2020, these will be sent via a new product id, ADANFD. Please see SCN 20-39 at the below link for more information.

https://www.weather.gov/media/notification/scn20-39sdm_admin_messages.pdf