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

# VPNDetection

> VPN, Tor and privacy relay detection for IPv4 and IPv6 addresses, with bot, anycast and bogon flags, country, ASN and network type on the free plan, and proxy, hosting and CDN detection, the operator behind each flag, city and abuse contact on paid plans.

![](https://mintcdn.com/webrouter/Wx0iBZkUGX_VAFTN/logo/data-apis/_default.svg?fit=max\&auto=format\&n=Wx0iBZkUGX_VAFTN\&q=85\&s=951f11a0968af0d8747e234a1ec1f32c)

[Web Catalog · Security](https://docs.webrouter.net/data-apis.md?category=security)

Key optional

Endpoints

2

Auth

Key in header

[Vendor docs](https://docs.vpndetection.io/api)

&#x20;·&#x20;

[Pricing](https://vpndetection.io/pricing)

## Setup

| Variable | | What it is |
| - | - | - |
| `VPNDETECTION_API_KEY` | some calls | a VPNDetection API key (vpndetection.io console > API keys). Optional: without one the free Unlimited plan answers single lookups |

Put them in your environment or `.env`; [Data APIs](https://docs.webrouter.net/vendors.md) covers the other ways.

## Notes

* No key is needed: the free Unlimited plan answers every single lookup with is\_vpn, is\_tor and is\_relay, the tor and relay detail objects with their provider, is\_bot, is\_anycast, is\_bogon, hostname, country-level location and the announcing ASN with its type (isp, hosting, business...), prefix and RPKI status (terms: [https://vpndetection.io/terms#no-key](https://vpndetection.io/terms#no-key)).
* A field missing from an answer is one the plan does not include, never false: the proxy flags (is\_resproxy, is\_dcproxy, is\_mobproxy, is\_pubproxy), is\_hosting, is\_cdn, the vpn object (which VPN it is), city and coordinates need a paid plan. For hosting traffic on the free plan, read asn.type.
* Private and reserved addresses answer 200 with is\_bogon true, not an error. A 429 carries Retry-After.

## Endpoints

GET

Look up an IP address

is\_vpn, is\_tor, is\_relay, is\_bot, is\_anycast and is\_bogon, country, ASN with network type and prefix, and hostname for an IPv4 or IPv6 address; proxy, hosting and CDN flags, the operator and evidence behind each, city and abuse contact on paid plans.

[Open](#vpndetection-ip-lookup)

POST

Look up many IP addresses

Up to 1000 addresses in one call, each answered with the fields a single lookup carries for the plan, keyed by the string sent; an address that fails sits in errors without disturbing the rest.

[Open](#vpndetection-ip-batch)

### Look up an IP address

GET

`/{ip}`

`vpndetection.ip.lookup`

is\_vpn, is\_tor, is\_relay, is\_bot, is\_anycast and is\_bogon, country, ASN with network type and prefix, and hostname for an IPv4 or IPv6 address; proxy, hosting and CDN flags, the operator and evidence behind each, city and abuse contact on paid plans.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`ip` required</td><td>string</td><td>path</td><td>IPv4 or IPv6 address. Example `146.70.116.130`</td></tr>

    <tr>
      <td>
        `user_agent`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        The User-Agent of the request being decided on, up to 1024 characters. On a paid plan the answer then says which agent it names and whether this address bears it out.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://docs.vpndetection.io/api/lookup/lookupIp) · Same job: [Abstract API](https://docs.webrouter.net/data-apis/abstract-api.md#abstract-api-ip-lookup), [API Ninjas](https://docs.webrouter.net/data-apis/apininjas.md#apininjas-ip-lookup), [InternetData](https://docs.webrouter.net/data-apis/internetdata.md#internetdata-ip-lookup), [IP2Location.io](https://docs.webrouter.net/data-apis/ip2location-io.md#ip2location-io-ip-lookup), [ipapi.is](https://docs.webrouter.net/data-apis/ipapiis.md#ipapiis-ip-lookup), [ipdata](https://docs.webrouter.net/data-apis/ipdata.md#ipdata-ip-lookup)

```python Python theme={null}
router.call_data_api("vpndetection.ip.lookup", {'ip': '146.70.116.130'})
```

```text MCP theme={null}
call_data_api(endpoint="vpndetection.ip.lookup", params={"ip": "146.70.116.130"})
```

### Look up many IP addresses

POST

`/batch`

`vpndetection.ip.batch`

Up to 1000 addresses in one call, each answered with the fields a single lookup carries for the plan, keyed by the string sent; an address that fails sits in errors without disturbing the rest.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`ips` required</td><td>array</td><td>body</td><td>The addresses, up to 1000; exact duplicates collapse to one lookup. Example `["146.70.116.130", "2606:4700:4700::1111"]`</td></tr>
  </tbody>
</table>

[Vendor docs](https://docs.vpndetection.io/api/lookup/lookupBatch) · Same job: [Abstract API](https://docs.webrouter.net/data-apis/abstract-api.md#abstract-api-ip-lookup), [API Ninjas](https://docs.webrouter.net/data-apis/apininjas.md#apininjas-ip-lookup), [InternetData](https://docs.webrouter.net/data-apis/internetdata.md#internetdata-ip-lookup), [IP2Location.io](https://docs.webrouter.net/data-apis/ip2location-io.md#ip2location-io-ip-lookup), [ipapi.is](https://docs.webrouter.net/data-apis/ipapiis.md#ipapiis-ip-lookup), [ipdata](https://docs.webrouter.net/data-apis/ipdata.md#ipdata-ip-lookup)

```python Python theme={null}
router.call_data_api("vpndetection.ip.batch", {'ips': ['146.70.116.130', '2606:4700:4700::1111']})
```

```text MCP theme={null}
call_data_api(endpoint="vpndetection.ip.batch", params={"ips": ["146.70.116.130", "2606:4700:4700::1111"]})
```

> [!NOTE]
>
> * A read over POST. Needs a paid plan's key: without a key it answers 401, and with a free-plan key 402, unless ips holds one address, which is answered as a single lookup.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.