RapidAPI logo

DB-IP IP Geolocation

FREE
By six.dfx
Updated 6 months ago
Location
-/10
Popularity Score
-
Latency
-
Success Rate

DB-IP IP Geolocation API Documentation

Lookup geographical location data like country code, state and city by IPv4 or IPv6 address.

View API Details
GETLookup IP Address
GETKey Information
GETLookup IP Address
Authorization:

Obtain a free API key at https://db-ip.com/api/

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
addrSTRING
REQUIREDIP address to look up
api_keyQUERY
REQUIREDAPI key
Code Snippet
unirest.get("https://dbip.p.rapidapi.com/addrinfo?addr=1.2.3.4")
.header("X-RapidAPI-Host", "dbip.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://dbip.p.rapidapi.com/addrinfo
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://dbip.p.rapidapi.com/addrinfo?addr=1.2.3.4")
.header("X-RapidAPI-Host", "dbip.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