IP to Country Geolocation

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

IP to Country Geolocation API Documentation

This API returns detailed information about the country identified by geolocating the provided IPv4 IP address. This includes ISO defined names, languages, currencies, United Nations and Word Bank defined region names and income levels. Powered by patent pending Next Generation IP Geolocation Technology.

View API Details
GETIP to Country
GETIP to Country

Quickly and accurately resolve where your website visitors are actually coming from

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
ipSTRING
REQUIREDIP address to lookup in string or decimal format e.g. 8.8.8.8 or 134744072
Code Snippet
unirest.get("https://bigdatacloud-ip-geolocation-v1.p.rapidapi.com/data/country-by-ip?ip=8.8.8.8")
.header("X-RapidAPI-Host", "bigdatacloud-ip-geolocation-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://bigdatacloud-ip-geolocation-v1.p.rapidapi.com/data/country-by-ip
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://bigdatacloud-ip-geolocation-v1.p.rapidapi.com/data/country-by-ip?ip=8.8.8.8")
.header("X-RapidAPI-Host", "bigdatacloud-ip-geolocation-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