RapidAPI logo

Weather By IP

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

Weather By IP API Documentation

The Weather By IP API allows you to find weather information such as Weather condition, Current Temperature, Max Temperature, Min Temperature, Pressure, Sea Level, Humidity, Wind Speed & Degree of any given IP address. The API can also return results in many different formats such as JSON, XML, CSV, YAML, PHP, Serialized PHP and Text.

View API Details
GETJSON
GETCSV
GETNew Line
GETPHP
GETSerialized
GETXML
GETYAML
GETJSON

To receive the response in JSON format

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
ipSTRING
REQUIREDIP address you wish to gather information
Optional Parameters
callbackSTRING
OPTIONALoptional callback function name
Code Snippet
unirest.get("https://wea2ip.p.rapidapi.com/json")
.header("X-RapidAPI-Host", "wea2ip.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://wea2ip.p.rapidapi.com/json
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://wea2ip.p.rapidapi.com/json")
.header("X-RapidAPI-Host", "wea2ip.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