Migrate from proxycheck.io
Move from proxycheck.io to VPNDetection: change the request, map each proxycheck.io field to its VPNDetection field, and compare the answers before you switch.
This guide moves an integration from proxycheck.io to VPNDetection. It shows how the request changes, which VPNDetection field answers each of proxycheck.io's, how rules that read them change, and how to compare the two services on your own traffic before you switch.
Before you begin
- A VPNDetection API key, if you need more than the free plan's fields. Without a key, a lookup answers the free plan's fields:
is_vpn,is_tor,is_relay, and the address's country and network. See Plans and fields. - A sample of a few hundred addresses from your own traffic, one per line in
sample.txt, for the comparison in step 4.
1. Change the request
proxycheck.io takes your key in the key query parameter, and answers each address under a key equal to the address unless you pass short=1:
curl "https://proxycheck.io/v3/8.8.8.8?key=$PROXYCHECK_KEY"VPNDetection takes the address as the path and your key in the Authorization header:
curl -H "Authorization: Bearer $VPNDETECTION_API_KEY" https://api.vpndetection.io/8.8.8.8If your code can't set a header, send the key in the apikey query parameter instead; see Authentication. To make the request from your code with an official library, see Use an SDK.
2. Map the fields
Paths below are inside each address's result. proxycheck.io answers detections, operator and network objects, with one proxy detection for every kind of proxy. VPNDetection answers one top-level flag for each kind of address, with a detail object beside it. Fields after Paid plan: come with a paid plan; the rest come with every plan, the free plan included.
| proxycheck.io | VPNDetection | Notes |
|---|---|---|
operator.name, operator.url | Paid plan: vpn.provider, resproxy.provider | A stable ID for the operator, with its display name in provider_name. |
detections | is_vpn, is_tor; Paid plan: is_resproxy, is_dcproxy, is_mobproxy, is_pubproxy, is_hosting | detections.proxy covers every kind of proxy. VPNDetection answers one flag for each. |
detections.first_seen, detections.last_seen | Paid plan: resproxy.first_seen, resproxy.last_seen, vpn.last_seen | Dates (YYYY-MM-DD) rather than date-times. |
detections.confidence | Paid plan: vpn.confidence | high, medium or low, where proxycheck.io's runs from 0 to 100. |
network.asn, network.provider, network.organisation | asn.asn, asn.name | asn.asn is a number, without the AS prefix. |
network.range | asn.prefix | |
network.type | asn.type | isp, hosting, education, government or business. |
attack_history | No counterpart |
The IP lookup reference documents every VPNDetection field.
3. Update your rules
Most rules move field for field:
- Results sit at the top level of the answer, not under the address.
- A rule that read the
riskscore becomes a rule over the classifications it was built from: VPN, Tor, hosting and proxies. vpn.confidenceishigh,mediumorlow. Decide which of them your rule accepts, rather than translating a number.- A field your plan doesn't include is absent rather than
false, so a rule checks that a paid field is present before it acts on the value. See Plans and fields.
4. Compare the answers
Before you switch, run both services on your sample and review the addresses where they disagree. This script prints each address where proxycheck.io's VPN detection and VPNDetection's differ. Save it as compare.mjs beside sample.txt, install the library with npm install vpndetection, and run node compare.mjs:
import { readFileSync } from 'node:fs';
import { VPNDetection } from 'vpndetection';
const client = new VPNDetection({ apiKey: process.env.VPNDETECTION_API_KEY });
const ips = readFileSync('sample.txt', 'utf8').split('\n').filter(Boolean);
for (const ip of ips) {
const url = `https://proxycheck.io/v3/${ip}?key=${process.env.PROXYCHECK_KEY}&short=1`;
const res = await fetch(url);
const theirs = await res.json();
const ours = await client.lookup(ip);
const theirFlag = theirs.detections?.vpn === true;
const ourFlag = ours.isVpn;
if (theirFlag !== ourFlag) {
console.log(ip, 'proxycheck.io:', theirFlag, 'VPNDetection:', ourFlag);
}
}Every provider builds its own data, so some disagreement is expected. Look up a few of the addresses on both sides. If you believe VPNDetection's answer is wrong, send us the address.
5. Switch over
Once the comparison looks right, switch in stages, so you can stop at any point without affecting your users:
- Run both side by side. Keep deciding with proxycheck.io, and log VPNDetection's answer beside it for a few days of real traffic.
- Switch the decisions. Decide with VPNDetection, and keep logging proxycheck.io's answer while you watch for surprises.
- Remove proxycheck.io. Once your logs are clean, delete the old client from your code and revoke its key.
Next steps
When the answers suit your rules, switch your code to VPNDetection. Protect a web app applies rules in middleware, and the guides cover sign-ups, logins, payments and country rules. Before you launch, review the go-live checklist.