RapidAPI logo

IP Address Geolocation

FREE
By chrislim
Updated 6 months ago
Location
8/10
Popularity Score
2112ms
Latency
100%
Success Rate

IP Address Geolocation API Documentation

This API returns the location of an IP address (country, region, city, zipcode, latitude and longitude) and the associated timezone in JSON or XML format.

View API Details
GETGetIPLocation
GETGetIPLocation

Returns the location of an IP address (country, region, city, zipcode, latitude and longitude) and the associated timezone in JSON or XML format.

Authorization:

Please Signup or Login at http://www.ipinfodb.com to get your Api Key. It's free!

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
formatSTRING
REQUIREDIt supports json and xml response format.
ipSTRING
REQUIREDIP Address. It supports both IPv4 and IPv6 address format.
keyQUERY
REQUIREDThe Api key.
Code Snippet
unirest.get("https://chrislim2888-ip-address-geolocation.p.rapidapi.com/?format=json%2C+xml")
.header("X-RapidAPI-Host", "chrislim2888-ip-address-geolocation.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://chrislim2888-ip-address-geolocation.p.rapidapi.com/
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://chrislim2888-ip-address-geolocation.p.rapidapi.com/?format=json%2C+xml")
.header("X-RapidAPI-Host", "chrislim2888-ip-address-geolocation.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