Storm Glass

FREEMIUM
By ManniskaMaskin
Updated 4 months ago
-/10
Popularity Score
-
Latency
-
Success Rate

Storm Glass API Documentation

The Storm Glass API gives developers access to global marine weather data from multiple sources using a single REST API.

The API returns marine weather forecasts for the next 7 days in hourly resolution. Forecasts include swell height, swell direction, swell period, wave height, wave direction, wave period, wind speed, wind direction, and air temperature.

View API Details
GET/forecast
GET/forecast

Single endpoint

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
latNUMBER
REQUIREDLatitude of the position that you want to get a forecast for
lngNUMBER
REQUIREDLongitude of the position that you want to get a forecast for
Code Snippet
unirest.get("https://stormglass.p.rapidapi.com/forecast")
.header("X-RapidAPI-Host", "stormglass.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://stormglass.p.rapidapi.com/forecast
Request Method: GET
Response Headers
Response Body

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://stormglass.p.rapidapi.com/forecast")
.header("X-RapidAPI-Host", "stormglass.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