RapidAPI logo

National Weather Service

FREE
By theapiguy
Updated 19 days ago
Weather
7.6/10
Popularity Score
580ms
Latency
75%
Success Rate

National Weather Service API Documentation

National Weather Service API (api.weather.gov) NOAA (National Oceanic and Atmospheric Administration) provides national weather data as well as past data.

View API Details
GET/products/types/{typeId}
GET/products/types/{typeId}/locations/{locationId}
GET/gridpoints/{wfo}/{x},{y}
GET/points/{point}/forecast/hourly
GET/alerts/active/zone/{zoneId}
GET/stations/{stationId}/observations
GET/products/{productId}
GET/products/types
GET/points/{point}/stations
GET/zones/{type}/{zoneId}/forecast
GET/alerts/{alertId}
GET/alerts/active/count
GET/alerts/active
GET/zones/{type}/{zoneId}
GET/products/locations
GET/alerts/active/area/{area}
GET/points/{point}/forecast
GET/products/locations/{locationId}/types
GET/stations
GET/stations/{stationId}/observations/{recordId}
GET/alerts?{parameters}
GET/alerts/active/region/{region}
GET/points/{point}
GET/stations/{stationId}
GET/products/types/{typeId}/locations
GET/stations/{stationId}/observations/current
GET/products/types/{typeId}

A list of products by type. Example: /products/types/AFD

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
typeIdSTRING
REQUIREDtypeId: an id of a valid product type
Code Snippet
unirest.get("https://national-weather-service.p.rapidapi.com/products/types/{typeId}")
.header("X-RapidAPI-Host", "national-weather-service.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://national-weather-service.p.rapidapi.com/products/types/{typeId}
Request Method: GET
Response Headers
Response Body
Log inSign up

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.get("https://national-weather-service.p.rapidapi.com/products/types/{typeId}")
.header("X-RapidAPI-Host", "national-weather-service.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication