Weather

FREEMIUM
By fyhao
Updated a month ago
Data
9.3/10
Popularity Score
731ms
Latency
100%
Success Rate

Weather API Documentation

Display Weather forecast data by latitude and longitude. Get raw weather data OR simple label description of weather forecast of some places.

View API Details
GETweather
GETweatherdata
GETaqi
GETweather

weather forecast in short label

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
latSTRING
REQUIREDLatitude
lngSTRING
REQUIREDLongtitude
Code Snippet
unirest.get("https://simple-weather.p.rapidapi.com/weather?lat=1.0&lng=1.0")
.header("X-RapidAPI-Host", "simple-weather.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://simple-weather.p.rapidapi.com/weather
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://simple-weather.p.rapidapi.com/weather?lat=1.0&lng=1.0")
.header("X-RapidAPI-Host", "simple-weather.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