RapidAPI logo

Weather

FREEMIUM
By Weather2020
Updated 5 months ago
Weather
7.2/10
Popularity Score
231ms
Latency
41%
Success Rate

Weather API Documentation

Weather2020 is the most popular long range weather forecast API available! Used by popular mobile apps like 1Weather, and already serving over 10 million forecasts a day, the Weather2020 long range weather forecasts give you something new and unique for your weather, travel or outdoor applications. Created by famed meteorologist Gary Lezak, our forecasts are powered by the most accurate long range weather model known as the LRC. For the first time ever, give your users a reliable and accurate long range weather forecast!

View API Details
GET12 Week Forecast Request by Latitude and Longitude
GET12 Week Forecast Request by Zip Code
GET12 Week Forecast Request by City and State
GET12 Week Forecast Request by Latitude and Longitude

Using Latitude and Longitude this returns an array of 12 weekly forecast objects

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
latitudeSTRING
REQUIRED
longitudeSTRING
REQUIRED
Code Snippet
unirest.get("https://weather2020-weather-v1.p.rapidapi.com/e8ecee8ff60c478f8a36280fea0524fe/39.0997,94.5783")
.header("X-RapidAPI-Host", "weather2020-weather-v1.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://weather2020-weather-v1.p.rapidapi.com/e8ecee8ff60c478f8a36280fea0524fe/{latitude},{longitude}
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://weather2020-weather-v1.p.rapidapi.com/e8ecee8ff60c478f8a36280fea0524fe/39.0997,94.5783")
.header("X-RapidAPI-Host", "weather2020-weather-v1.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