{
"success": true,
"data": {
"1.1.1.1": {
"ip": {
"address": "1.1.1.1",
"version": 4,
"numeric": 16843009,
"bogon": false
},
"geo": {
"continent": "Oceania",
"continent_code": "OC",
"country": "Australia",
"country_code": "AU",
"city": "Sydney"
}
},
"8.8.8.8": {
"ip": {
"address": "8.8.8.8",
"version": 4,
"numeric": 134744072,
"bogon": false
},
"geo": {
"continent": "North America",
"continent_code": "NA",
"country": "United States",
"country_code": "US",
"city": "Mountain View"
}
}
},
"execution_ms": 2
}
{
"success": false,
"code": 101,
"type": "invalid_key",
"description": "The API Key is missing or invalid."
}
Bulk IP lookup
curl --request GET \
--url https://v2.greipapi.com/geo/ip/bulk \
--header 'Authorization: Bearer <token>'import requests
url = "https://v2.greipapi.com/geo/ip/bulk"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://v2.greipapi.com/geo/ip/bulk', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://v2.greipapi.com/geo/ip/bulk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://v2.greipapi.com/geo/ip/bulk"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://v2.greipapi.com/geo/ip/bulk")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://v2.greipapi.com/geo/ip/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body
{
"success": true,
"data": {
"1.1.1.1": {
"ip": {
"address": "1.1.1.1",
"version": 4,
"numeric": 16843009,
"bogon": false
},
"geo": {
"continent": "Oceania",
"continent_code": "OC",
"country": "Australia",
"country_code": "AU",
"city": "Sydney"
}
},
"8.8.8.8": {
"ip": {
"address": "8.8.8.8",
"version": 4,
"numeric": 134744072,
"bogon": false
},
"geo": {
"continent": "North America",
"continent_code": "NA",
"country": "United States",
"country_code": "US",
"city": "Mountain View"
}
}
},
"execution_ms": 2
}
{
"success": false,
"code": 101,
"type": "invalid_key",
"description": "The API Key is missing or invalid."
}
Data Lookup
Bulk IP Lookup
This API enables you to retrieve information for multiple IP addresses in a single request.
By using the /lookup/ip/bulk method, you can efficiently gather data such as location, ISP, and risk factors for a batch of IPs, saving time and streamlining your workflow for large-scale analysis.
{
"success": true,
"data": {
"1.1.1.1": {
"ip": {
"address": "1.1.1.1",
"version": 4,
"numeric": 16843009,
"bogon": false
},
"geo": {
"continent": "Oceania",
"continent_code": "OC",
"country": "Australia",
"country_code": "AU",
"city": "Sydney"
}
},
"8.8.8.8": {
"ip": {
"address": "8.8.8.8",
"version": 4,
"numeric": 134744072,
"bogon": false
},
"geo": {
"continent": "North America",
"continent_code": "NA",
"country": "United States",
"country_code": "US",
"city": "Mountain View"
}
}
},
"execution_ms": 2
}
{
"success": false,
"code": 101,
"type": "invalid_key",
"description": "The API Key is missing or invalid."
}
GET
/
geo
/
ip
/
bulk
Bulk IP lookup
curl --request GET \
--url https://v2.greipapi.com/geo/ip/bulk \
--header 'Authorization: Bearer <token>'import requests
url = "https://v2.greipapi.com/geo/ip/bulk"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://v2.greipapi.com/geo/ip/bulk', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://v2.greipapi.com/geo/ip/bulk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://v2.greipapi.com/geo/ip/bulk"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://v2.greipapi.com/geo/ip/bulk")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://v2.greipapi.com/geo/ip/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body
{
"success": true,
"data": {
"1.1.1.1": {
"ip": {
"address": "1.1.1.1",
"version": 4,
"numeric": 16843009,
"bogon": false
},
"geo": {
"continent": "Oceania",
"continent_code": "OC",
"country": "Australia",
"country_code": "AU",
"city": "Sydney"
}
},
"8.8.8.8": {
"ip": {
"address": "8.8.8.8",
"version": 4,
"numeric": 134744072,
"bogon": false
},
"geo": {
"continent": "North America",
"continent_code": "NA",
"country": "United States",
"country_code": "US",
"city": "Mountain View"
}
}
},
"execution_ms": 2
}
{
"success": false,
"code": 101,
"type": "invalid_key",
"description": "The API Key is missing or invalid."
}
Authentication
Include your API key in theAuthorization header:
Authorization: Bearer <api_key>
Query parameters
string
required
The ips command is used to specify the IP addresses you want to look up.Expected values: comma separated IP addresses (IPv4 or IPv6)Sample value:
1.1.1.1,2.2.2.2string
The params command can be used to specify the required modules you want to get in the response.Expected values:
security, currency, timezone, location, and/or deviceSample value: security,timezone,currencyFor more information please refer to Customize response modules.string
default:"EN"
The lang command is used to get a response in a specific language.Expected values:
EN, AR, DE, FR, ES, JA, ZH, or RUFor more information please refer to Localization.string
The callback command can help you make the response a JSONP format.Expected values: any name that can be used as a function name in Javascript, e.g:
myFunctionName.For more information please refer to JSONP callback.string
default:"JSON"
The format command is used to get a response in a specific format.Expected values:
JSON, XML, CSV, or NewlineFor more information please refer to Response format.string
default:"live"
The mode command is used in the development stage to simulate the integration process before releasing it to the production environment.Expected values:
live, or test.For more information please refer to Development environment.string
Optional label for your own analytics or support correlation (for example a product or channel name).
string
The user_id command can be used to identify requests sent by specific users to monitor in the Events page.Expected values: email address, phone number, user id, name, etc.For more information please refer to User identifier.
Response properties
boolean
required
true when the request succeeded; false on error.object
required
Map of IP address strings to lookup results. Each key is one address from the
ips query (for example 1.1.1.1). Invalid or duplicate entries in ips are omitted.Hide properties
Hide properties
object
required
Geo and optional modules for that IP. The property name is the literal IP string from your request.
Hide properties
Hide properties
object
required
object
required
Hide properties
Hide properties
string
required
Name of the continent where the IP address is.
string
required
Code representation of the continent.
string
required
Code representation of the country in
ISO-3166 format.integer
required
GeoName ID of the continent.
string
required
Name of the country.
integer
required
GeoName ID of the country.
string
required
Name of the region.
string
required
Name of the city.
string
required
ZIP code of the location where the IP address belong.
number
required
Latitude coordinate of the location.
number
required
Longitude coordinate of the location.
object
required
Show details
Show details
string
required
Capital city of the country.
integer
required
Population of the country.
object
required
object
required
string
required
International dialing code for the country.
boolean
required
Indicates if the country is in the EU.
string
required
List of neighboring countriesâ codes.
string
required
Top-level domain of the country.
object
required
object
required
Show details
Show details
string
required
Autonomous System Number (for example
AS15169).string
required
Name of the ASN.
string
required
Organization associated with the ASN.
string
required
Phone contact for the ASN.
string
required
Email contact for the ASN.
string
required
Domain associated with the ASN.
string
required
Date of ASN creation.
string
required
Type of organization (âispâ, âhostingâ, âbusinessâ, âeducationâ, or
âgovernmentâ).
object
required
Show details
Show details
string
required
Timezone name.
string
required
Timezone abbreviation.
integer
required
Timezone offset from UTC.
string
required
Current time in the timezone.
integer
required
Current timestamp in the timezone.
boolean
required
Indicates if Daylight Saving Time is active.
object
required
Show details
Show details
string
required
Sunset time.
string
required
Sunrise time.
string
required
Solar transit time.
string
required
Civil twilight begin time.
string
required
Civil twilight end time.
string
required
Nautical twilight begin time.
string
required
Nautical twilight end time.
string
required
Astronomical twilight begin time.
string
required
Astronomical twilight end time.
string
required
Length of the day.
object
required
Show details
Show details
boolean
required
Indicates if the IP address is a proxy service.
string
required
Type of proxy used.
boolean
required
Indicates if accessed through Tor network.
boolean
required
Indicates if the user is a bot.
boolean
required
Indicates if itâs a Appleâs Private Relay connection.
string
Country code for Apple Private Relay when detected; otherwise
null.string
City for Apple Private Relay when detected; otherwise
null.boolean
required
Indicates if the IP address belong to a hosting provider.
boolean
required
Indicates if the IP address is blacklisted due to applying custom
rules or were found in one of
your blacklists.
object
required
Show details
Show details
object
required
Mobile detection from the user agent.
Hide properties
Hide properties
boolean
required
true when the user agent looks like a mobile device.string
required
Type of device.
object
required
Show details
Show details
string
required
Type of operating system.
string
required
Name of the operating system.
string
required
Family of the operating system.
string
required
Version of the operating system.
string
required
Title of the operating system.
string
required
64-bit mode hint from the parser (often
Unknown when not detected).object
required
string
Device fingerprint hash when available;
null on IP lookup routes that omit device capture.object
The custom rules applied to this request, learn
more.
Hide properties
Hide properties
integer
required
The total number of custom rules applied to this request.
object
required
The custom rules applied to this request, learn
more.
integer
required
Time taken to process the request (milliseconds).
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Response
200
OK
Was this page helpful?