VPN Detection API
Know who's behind a VPN.
Check any IP address against a continuously updated database of commercial VPN providers, anonymizers, and hosted VPN servers — with datacenter and ASN context in the same response. No sign-up required.
Everything You Need to Detect VPN Traffic
A continuously updated VPN provider database, datacenter correlation, and a clean JSON API — built for geo-compliance and fraud teams.
Commercial VPN Database
IP ranges of known commercial VPN providers and anonymizer services, tracked and refreshed continuously.
Datacenter Correlation
Most VPN servers run on hosted infrastructure. A separate is_datacenter flag catches self-hosted VPNs that aren't in any provider list.
ASN & ISP Context
Every response includes the network operator and ISP, so you can whitelist corporate VPNs while flagging consumer anonymizers.
Real-Time Lookups
Typical response time under 100ms — fast enough to gate logins, checkouts, and content delivery inline.
Full Anonymity Coverage
VPN, proxy, Tor, and datacenter flags come back in the same response — one call covers every anonymization channel.
Simple JSON API
A single REST endpoint with boolean flags — integrate VPN detection into any stack in minutes.
VPN Detection API Documentation & Code Examples
A single REST endpoint returns the VPN status of any IP address — together with proxy, Tor, datacenter, and geolocation context. Predictable JSON, no SDK required.
GET /api/v1/ip/{ip}?api_key={key}
curl "https://ip-api.io/api/v1/ip/185.220.101.45?api_key=YOUR_API_KEY"
{
"suspicious_factors": {
"is_vpn": true,
"is_proxy": false,
"is_tor_node": false,
"is_datacenter": true,
"is_threat": false
},
"isp": "M247 Europe SRL",
"country_code": "NL"
}
GET /api/v1/ip/{ip}?api_key={key}
const res = await fetch(
"https://ip-api.io/api/v1/ip/185.220.101.45?api_key=YOUR_API_KEY"
);
const data = await res.json();
if (data.suspicious_factors.is_vpn) {
console.log("VPN connection — apply your policy");
}
{
"suspicious_factors": {
"is_vpn": true,
"is_proxy": false,
"is_tor_node": false,
"is_datacenter": true,
"is_threat": false
},
"isp": "M247 Europe SRL",
"country_code": "NL"
}
GET /api/v1/ip/{ip}?api_key={key}
import requests
res = requests.get(
"https://ip-api.io/api/v1/ip/185.220.101.45",
params={"api_key": "YOUR_API_KEY"}
)
data = res.json()
if data["suspicious_factors"]["is_vpn"]:
print("VPN connection — apply your policy")
{
"suspicious_factors": {
"is_vpn": true,
"is_proxy": false,
"is_tor_node": false,
"is_datacenter": true,
"is_threat": false
},
"isp": "M247 Europe SRL",
"country_code": "NL"
}
GET /api/v1/ip/{ip}?api_key={key}
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,
"https://ip-api.io/api/v1/ip/185.220.101.45?api_key=YOUR_API_KEY");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = json_decode(curl_exec($ch));
if ($data->suspicious_factors->is_vpn) {
echo "VPN connection — apply your policy";
}
{
"suspicious_factors": {
"is_vpn": true,
"is_proxy": false,
"is_tor_node": false,
"is_datacenter": true,
"is_threat": false
},
"isp": "M247 Europe SRL",
"country_code": "NL"
}
GET /api/v1/ip/{ip}?api_key={key}
require 'net/http'
require 'json'
uri = URI('https://ip-api.io/api/v1/ip/185.220.101.45')
uri.query = URI.encode_www_form(api_key: 'YOUR_API_KEY')
res = Net::HTTP.start(uri.hostname, use_ssl: true) { |h| h.get(uri) }
data = JSON.parse(res.body)
puts "VPN!" if data.dig('suspicious_factors', 'is_vpn')
{
"suspicious_factors": {
"is_vpn": true,
"is_proxy": false,
"is_tor_node": false,
"is_datacenter": true,
"is_threat": false
},
"isp": "M247 Europe SRL",
"country_code": "NL"
}
Built for real-world applications
From content licensing to account security — VPN detection that fits your workflow.
Geo-Compliance & Licensing
Streaming, gaming, and gambling platforms are contractually required to enforce regional restrictions. Detect VPN connections that spoof location before serving licensed content.
Promo & Bonus Abuse
One user hopping between VPN locations can claim region-specific offers, trials, and signup bonuses repeatedly. Flag VPN traffic at registration and checkout to stop multi-accounting.
Account Security
A login from a VPN where the account never used one before is a strong account-takeover signal. Combine the is_vpn flag with your session logic to trigger step-up authentication.
VPN Detection API FAQs
Common questions about detecting VPN connections.
What is a VPN detection API?
A VPN detection API is a web service that tells you whether an IP address belongs to a VPN (Virtual Private Network) service. When a user connects through a VPN, their traffic appears to come from the VPN provider's server instead of their real location. The API checks the connecting IP against databases of known VPN providers and hosting infrastructure, returning a simple boolean flag your application can act on in real time.
How does VPN detection work?
VPN detection combines several signals: continuously updated lists of IP ranges operated by commercial VPN providers, datacenter and hosting-provider IP ranges (most VPN servers run in datacenters rather than on residential connections), ASN (Autonomous System Number) analysis to identify networks known for VPN hosting, and threat intelligence feeds. ip-api.io merges these signals into a single is_vpn boolean, alongside separate is_datacenter, is_proxy, and is_tor_node flags for fine-grained decisions.
Why would I want to detect VPN users?
Common reasons include enforcing geographic content licensing (streaming and media platforms are contractually required to block location spoofing), preventing promo and bonus abuse where one user claims regional offers repeatedly through different VPN locations, stopping account takeover attempts that hide behind anonymized connections, and complying with regional regulations. Many platforms don't block VPN users outright but treat VPN usage as one risk signal among several.
Can a VPN detection API detect all VPNs?
No detection method catches 100% of VPNs. Commercial VPN providers with published server infrastructure are detected very reliably. Harder cases are small private VPNs running on residential connections and newly launched providers. This is why the database is updated continuously, and why the API also returns is_datacenter — a self-hosted VPN on a cloud server still shows up as datacenter traffic even before it is classified as a VPN.
Is the VPN checker on this page free?
Yes, the interactive VPN checker on this page is completely free with no sign-up required. API access for developers with higher request volumes requires a paid subscription starting at €10/month.
Simple, transparent pricing
Start small, scale as you grow. No hidden fees.
Detect VPN traffic programmatically
Check any IP for VPN, proxy, Tor, and datacenter signals in a single API call — no sign-up required for the free tier.