Skip to main content

Overview

In both IP Geolocation and IP Lookup endpoints you can pass the security module to the params query parameter in order to get full insights about the security threats of that specific IP address.

Sample Request

curl --request GET \
  --url 'https://greipapi.com/geoip?params=security' \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://greipapi.com/geoip"

querystring = {"params":"security"}

headers = {"Authorization": "Bearer <token>"}

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.text)
const options = { method: "GET", headers: { Authorization: "Bearer <token>" } };

fetch("https://greipapi.com/geoip?params=security", options)
  .then((response) => response.json())
  .then((response) => console.log(response))
  .catch((err) => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://greipapi.com/geoip?params=security",
  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/ioutil"
)

func main() {

	url := "https://greipapi.com/geoip?params=security"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://greipapi.com/geoip?params=security")
  .header("Authorization", "Bearer <token>")
  .asString();

Sample Response

{
  "data": {
    "ip": "165.227.149.217",
    "ipType": "IPv4",
    "IPNumber": 2783155673,
    "continentName": "Europe",
    "continentCode": "EU",
    "countryCode": "DE",
    "continentGeoNameID": 6255148,
    "countryName": "Germany",
    "countryGeoNameID": 2921044,
    "regionName": "Hessen",
    "cityName": "Frankfurt am Main",
    "zipCode": "65931",
    "latitude": "50.115520",
    "longitude": "8.684170",
    // ↓↓ this added here ↓↓
    "security": {
      "isProxy": true,
      "proxyType": "VPN",
      "isTor": false,
      "isBot": false,
      "isRelay": false,
      "isHosting": true
    }
    // ↑↑ this added here ↑↑
  },
  "status": "success",
  "executionTime": 4
}