Detect VPN, proxy and Tor traffic without punishing real users

Two calls tell you whether an address is a VPN, a server or a Tor exit. The harder part, and most of this lesson, is deciding what to do about it.

The location from lesson 1 is only as honest as the connection it came from. Anyone can rent a server in Frankfurt for the price of a coffee, install a VPN app in thirty seconds, or open Tor Browser and exit from a volunteer's machine in another country. Fraudsters do all three routinely. So do privacy-minded customers, remote employees, journalists and everyone on a corporate network that routes through a security proxy.

That overlap is the whole difficulty. A VPN flag correlates with fraud, but most people behind VPNs are not committing any. If you block on the flag, you lose real customers to stop attackers who will switch to a residential proxy by the afternoon. If you ignore it, you throw away one of the best cheap signals you have. The answer in between is step-up: let anonymised traffic through, but ask it for one more piece of proof on the actions that matter.

Three different things that all hide an address

They are often lumped together as "proxies", but they mean different things and deserve different responses.

SignalWhat it meansTypical legitimate usersTypical abuse
DatacenterThe address belongs to a hosting or cloud provider, not an ISPCorporate security gateways, developers testing from servers, your own integrationsScripted signups, credential stuffing from rented servers, scrapers
VPNThe address is a known commercial VPN exitPrivacy-conscious users, travellers, people on public Wi-Fi, remote staffHiding location for promo abuse, multi-accounting, geo-restriction bypass
TorThe address is an exit node of the Tor networkJournalists, activists, people in censored countries, the privacy-maximalHard-to-trace fraud, account takeover attempts, abuse after other routes are blocked

Datacenter is the broadest and the noisiest. If you sell an API, a webhook service or any developer tool, a large share of your legitimate traffic comes from datacenters by design: your customers' servers call you from AWS and Google Cloud all day. Datacenter traffic on your signup form is suspicious; datacenter traffic on your API endpoint is normal.

Check an address for VPN and datacenter use

VPN Proxy Detector (vpndetector) takes an ip on a GET and costs 10 credits.

Try it liveVPN Proxy Detector10 credits
GEThttps://api.apiverve.com/v1/vpndetector
curl "https://api.apiverve.com/v1/vpndetector?ip=103.62.49.210" \
  -H "x-api-key: YOUR_API_KEY"
Sign in or create a free account to run this with your own key.

is_vpn is false but is_datacenter is true: a hosting provider, not a commercial VPN.

On every plan you get is_vpn, is_datacenter and checked_on, the date the address was last checked. Higher plans add is_tor, the network's asn and asn_name, and two bands: risk_level (High for Tor exits and VPNs, Moderate for datacenter-only addresses, Low otherwise) and threat_level (how strongly the address anonymises its user). The example above returns is_datacenter: true with risk_level: "Moderate". A residential cable address such as 173.172.81.20 returns false for both flags.

Do not over-read is_vpn: false. Detection works from lists of known exits and hosting ranges. A small or new VPN, a VPN running on residential addresses, or a "residential proxy" network that routes through hijacked home routers will come back clean. Treat a positive as meaningful and a negative as "no evidence", never as "verified residential".

Check an address against the Tor exit list

Tor Node Detector (tordetect) answers a narrower question with more certainty. The Tor Project publishes the addresses of its exit relays, so membership is a fact rather than a classification.

Try it liveTor Node Detector10 credits
GEThttps://api.apiverve.com/v1/tordetect
curl "https://api.apiverve.com/v1/tordetect?ip=185.189.183.143" \
  -H "x-api-key: YOUR_API_KEY"
Sign in or create a free account to run this with your own key.

isTor is true for an active exit. parsed tells you the address itself was valid.

isTor and parsed are on every plan; ipDetails (country, region, timezone) and the asn/asnName pair are premium. The same address can stop being an exit tomorrow, because relays come and go every day. That shapes your cache: an hour or two for Tor results, not the day you used for location.

When do you need this call, given that VPN Proxy Detector also reports is_tor? Only on plans where is_tor is not included. On those plans, call both in parallel. On plans that include it, VPN Proxy Detector alone covers all three signals for 10 credits instead of 20, and you can drop the second call. The code below handles both cases by reading is_tor when present and calling Tor Node Detector only when it is not.

Check yourself

A B2B API product sees 40% of requests to its /v1 endpoints arriving from is_datacenter: true addresses. What is the right reading?

Answer the check above to continue.

Run every example on your own key. Free plan, no card.

Scaling up?

Volume pricing, custom SLAs, and dedicated support for high-traffic teams.

Contact sales