IP Geolocation by ipgeolocation.io

FREEMIUM
By ejaz1
Updated 4 months ago
2.5/10
Popularity Score
946ms
Latency
-
Success Rate

IP Geolocation by ipgeolocation.io API Documentation

IP Geolocation API allows developers to get geolocation information for a given IP address. Data points returned by this GeoIP API include city, state, province, country, continent, latitude, longitude, region, timezone, current time, organization, ISP, local currency, and country flags. This IP Location API can be used for content personalization, geotargeting, geofencing, ad targeting, digital rights management, form auto-completion, etc. With the free plan, you can make 15,000 IP lookup API calls per month. Paid plans are starting from $15 per month.

View API Details
GETGet IP Geolocation
GETGet Client IP
POSTBulk IP Geolocation
GETGet IP Geolocation

This endpoint returns geolocation and other useful points from an IP Address. If IP address is provided as query parameter, geolocation is performed on that IP address. If IP address is left empty, geolocation data of client IP is returned.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Optional Parameters
ipSTRING
OPTIONALProvide the IP address to geolocate. If set blank, API will use client IP.
fieldsSTRING
OPTIONALSpecify the fields to retrieve in response. Field names can be comma separated. Possible values are city, currency, geo and everything which appears in json response. To speed up the response time, its better to provide the fields which are needed rather than pulling everything.
excludesSTRING
OPTIONALYou can also filter the API response by specifying the name of fields/objects that you want to remove from the API response. This is also comma separated.
Code Snippet
unirest.get("https://ejaz1-ip-geolocation-v1.p.rapidapi.com/ipgeo")
.header("X-RapidAPI-Host", "ejaz1-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://ejaz1-ip-geolocation-v1.p.rapidapi.com/ipgeo
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://ejaz1-ip-geolocation-v1.p.rapidapi.com/ipgeo")
.header("X-RapidAPI-Host", "ejaz1-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