> ## Documentation Index
> Fetch the complete documentation index at: https://docs.greip.io/llms.txt
> Use this file to discover all available pages before exploring further.

# VPN/Proxy Detection

> Detect and eliminate bad traffic!

## Overview

In both [IP Geolocation](/api-reference/endpoint/data-lookup/geoip) and [IP Lookup](/api-reference/endpoint/data-lookup/ip) 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

<CodeGroup>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://greipapi.com/geoip?params=security' \
    --header 'Authorization: Bearer <token>'
  ```

  ```python Python theme={null}
  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)
  ```

  ```javascript Javascript theme={null}
  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 PHP theme={null}
  <?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;
  }
  ```

  ```go Go theme={null}
  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))

  }
  ```

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

## Sample Response

```json theme={null}
{
  "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
}
```
