Maxmind GeoIP2

FREE
By maxmind
Updated 5 months ago
Tools
0.8/10
Popularity Score
88ms
Latency
-
Success Rate

Maxmind GeoIP2 API Documentation

Determine the geographical location of website visitors based on the IP addresses for applications such as fraud detection, content localization, geo-targeted …

View API Details
GETCity (Precision)
GETOmni (Precision)
GETCountry
GETCity/ISP/Org (Precision)
GETCity (Precision)
Authorization:

The HTTP Authorization header is required for authorization. The username is your MaxMind user ID. The password is your MaxMind license key. (https://www.maxmind.com/en/my_license_key)

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
AuthorizationBASIC
REQUIREDThe HTTP Authorization header is required for authorization. The username is your MaxMind user ID. The password is your MaxMind license key. (https://www.maxmind.com/en/my_license_key)
Required Parameters
ip_addressSTRING
REQUIRED
Code Snippet
unirest.get("https://community-maxmind-geoip2.p.rapidapi.com/city/{ip_address}")
.header("X-RapidAPI-Host", "community-maxmind-geoip2.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://community-maxmind-geoip2.p.rapidapi.com/city/{ip_address}
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://community-maxmind-geoip2.p.rapidapi.com/city/{ip_address}")
.header("X-RapidAPI-Host", "community-maxmind-geoip2.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