Access controls
VPN Detection API for OFAC & Sanctions Screening
GET /api/v1/vpn returns a true / false / unknown VPN signal for the calling client or any IP address, so you know when a location result deserves less trust. It is purpose-built as a companion control for OFAC and sanctions screening workflows: geo-blocking only holds when the IP reflects where the user really is.
GET /api/v1/vpn/{ip}
# Omit the IP to evaluate the calling client
curl https://api.compliapi.com/api/v1/vpn/172.217.22.14 \
-H "Authorization: Bearer $COMPLIAPI_TOKEN"import requests
resp = requests.get(
"https://api.compliapi.com/api/v1/vpn/172.217.22.14",
headers={"Authorization": f"Bearer {COMPLIAPI_TOKEN}"},
)
print(resp.json())const resp = await fetch(
"https://api.compliapi.com/api/v1/vpn/172.217.22.14",
{ headers: { Authorization: `Bearer ${process.env.COMPLIAPI_TOKEN}` } },
);
console.log(await resp.json());Response
{ "ip": "172.217.22.14", "vpn": false }An honest tri-state signal
Responses are true, false, or "unknown" when privacy data is unavailable for an IP — no false confidence.
Caller or arbitrary IP
Evaluate the requesting client directly, or pass any public IP from your own systems.
Pairs with geolocation
Use alongside the geolocation endpoint to judge how much to trust a location signal.
Metered and logged
VPN checks use the same tokens, quota and request logging as every other CompliAPI endpoint.
Why geo-blocking alone fails OFAC expectations
Geo-blocking works by mapping an IP address to a country and refusing service where sanctions apply. A VPN breaks that mapping silently: a user in a sanctioned jurisdiction connects through an exit node in a permitted country, and every downstream control sees the wrong location.
Regulators know this. OFAC's 2021 sanctions compliance guidance for the virtual currency industry discusses IP-based location controls as a core measure and treats VPN use as a known evasion vector, and public enforcement settlements have cited location-control gaps. Nothing in the regulations names VPN detection as a requirement — the expectation is that controls are effective, not nominal. A geo-block that any free VPN defeats is hard to defend as effective.
Checking for a VPN at the moments that matter — signup, wallet connect, checkout, withdrawal — closes the gap: when the location signal is untrustworthy, your policy can step up verification or decline instead of trusting the apparent country.
How can platforms enforce OFAC screening when users use VPNs?
In three layers, because a VPN changes the IP address and nothing else. Screen the identifiers the user hands you — wallet addresses, emails, government IDs — against the sanctions lists; geolocate the session with GET /geo and read its sanctioned-country flag as the jurisdiction decision; and call GET /vpn at the same moment, treating true and "unknown" as reasons to trust the apparent country less — step up verification, hold the action, or apply the restricted-jurisdiction rule. Log all three results next to the decision.
That is the shape OFAC itself describes. Its October 2021 Sanctions Compliance Guidance for the Virtual Currency Industry (read 21 November 2026) lists geolocation tools and IP address blocking among the internal controls it recommends, says analytic tools can identify IP misattribution "by screening IP addresses against known virtual private network (VPN) IP addresses and identifying improbable logins", and names an attempt to access an exchange "from an IP address or VPN connected to a sanctioned jurisdiction" as a red flag. Its case study is the failure mode: a company that logged users' IP addresses for security but never used them to screen, and so served users in Crimea, Cuba, Iran, Sudan and Syria.
Does OFAC require the use of interdiction software? No. Neither document names a product or makes screening software mandatory: OFAC's A Framework for OFAC Compliance Commitments (read 21 November 2026) says internal controls should let an organization "identify, interdict, escalate, and report" prohibited activity and, where technology is part of those controls, that it be "selected and calibrated" to the organization's risk profile — its appendix lists screening software that was not kept updated as a root cause of violations, not the absence of software. The expectation is that controls are effective, not that a particular tool is bought. A VPN signal is one way to make an IP-based control effective; no control stops every VPN, and what a platform can show is that its geo-control accounted for the known weakness. This is context, not legal advice.
Which are safeguards that may prevent OFAC violations? The three below map to the Framework's internal-controls component — identify, interdict, escalate, report and keep records of activity that may be prohibited:
| Safeguard | Where it runs | What it leaves behind |
|---|---|---|
| Identifier screening against the lists | Onboarding, payouts and withdrawals — GET /screen/* on the address, email or ID | A match or no-match with the list, program and official record, logged per request |
| A geographic restriction that accounts for VPNs | Session start and high-value actions — GET /geo for the country and its sanctioned flag, GET /vpn for how far to trust it | The country, the flag, the VPN state (true / false / "unknown") and the branch your policy took |
| A record of each decision | Your own store, beside the request log CompliAPI keeps for your organization | What a reviewer or banking partner needs to reconstruct why an action was allowed, held or declined |
One request, one answer
GET /api/v1/vpn evaluates the calling client's IP; GET /api/v1/vpn/{ip} evaluates any public IPv4 or IPv6 address — from your logs, a webhook payload, or a queued review. Either way the response carries the one field that matters: vpn. There is no separate sandbox or test-data mode: the same endpoint answers with live data on the free tier, so testing means calling it with real IPs (see the FAQ below).
The signal is deliberately tri-state: true, false, or "unknown" when privacy data is unavailable for that IP. Uncertainty is reported instead of hidden, so your policy decides what to do with it explicitly — a defensible design when someone asks how the control behaves at its edges.
What the signals tell you
VPN detection is one signal in a layered location control. Here is what each signal in the stack tells you, and where it comes from:
| Signal | Where it comes from | What to do with it |
|---|---|---|
| VPN exit | GET /vpn returns vpn: true | Treat the session's apparent location as low-trust: step up verification or apply your restricted-jurisdiction policy. |
| No privacy data | GET /vpn returns vpn: "unknown" | Decide explicitly — never let "unknown" silently default to false. |
| Sanctioned-country location | GET /geo returns the country with a sanctioned flag | The jurisdiction decision itself: block or restrict per your policy. |
| Country mismatch | Your comparison of the /geo country against the user's declared country | An integration pattern built from the two endpoints — flag the account for review. |
Using VPN detection with sanctions screening
The endpoint returns a VPN signal, and only that. It is not proxy or datacenter classification, device fingerprinting, or fraud scoring — an IP lookup that promises all of those at once is usually overstating what IP data can say.
Where it earns its place is as one layer of a sanctions control: screen the identifiers you can see — wallet addresses, emails, government IDs — against the SDN and other sanctions lists, geolocate the session and check the sanctioned-country flag, and weigh both against the VPN signal that says how much the location can be trusted.
All three checks run on the same API token, draw from the same quota, and appear in the same request log — so when an auditor or banking partner asks whether the check ran, the trail is already there.
VPN detection API by use case: banks, fintech, marketplaces and SaaS
The endpoint, the signal and the price are the same for every team that calls it — there is no "for banks" edition. What differs is the moment the check runs and what a true or "unknown" result usually triggers:
| Who | When the check runs | What a VPN result usually triggers |
|---|---|---|
| Banks and fintech | Account opening and outbound payments, beside the identifier screen and the GET /geo country flag | Step-up verification or a hold — and a logged record that the geographic restriction accounted for VPNs, which is what a regulated institution is expected to be able to show (see the banks FAQ below) |
| Marketplaces | Seller onboarding, payouts and geofenced listings or categories | Review before payout; the restricted-jurisdiction rule applied to the listing rather than a silent allow |
| SaaS, account security and login risk | New-device or new-location sign-in, and before sensitive account changes | Step-up authentication for the session; a hard block only where your policy already geo-restricts the product |
| Trust and safety and fraud teams | Review queues and investigations, on IPs from your own logs via GET /vpn/{ip} | Context for the reviewer — the result is a VPN fact for an IP address, not a fraud or risk score |
VPN detection API best practices
The endpoint is one GET; the policy around it is where integrations succeed or fail. Five practices — the rules that hold up in review:
1. Check at the moments that matter — signup, wallet connect, checkout, withdrawal — rather than on every request. A VPN signal is a decision input, and it is only worth the quota where a decision is being made.
2. Branch on all three states. true, false and "unknown" each need an explicit path; an integration that treats "unknown" as false has quietly removed the control for every IP without privacy data.
3. Prefer step-up verification to a hard block. Legitimate users and corporate networks use VPNs, so a VPN result usually means "trust the apparent location less" — ask for more evidence, hold the action for review, or apply the restricted-jurisdiction rule — not "reject".
4. Store the signal next to the decision it fed. CompliAPI logs the request for your organization; your own records should keep the returned value and the policy branch taken, so a reviewer can reconstruct why an action was allowed or held.
5. Read it together with the geolocation result. The country and its sanctioned-country flag from GET /geo are the jurisdiction decision; the VPN signal says how far to trust that country. Apply the two as one rule, not as two unrelated checks.
How to choose a VPN detection API
VPN detection APIs differ more in what they claim to return than in how they are called. Some vendors sell the same lookup as a privacy detection API or an IP security API; the questions below apply to all of them. The questions that separate them — and CompliAPI's answer to each:
| Criterion | What to ask | CompliAPI's answer |
|---|---|---|
| Signal shape | A single VPN verdict, a VPN / proxy / Tor / hosting classification, or a risk score? | One vpn field: true, false or "unknown" when privacy data is missing. It is not a proxy or Tor classifier and it produces no score — if you need those, this is not that product. |
| Inputs | Can it evaluate the calling client as well as an arbitrary address? IPv6? | GET /vpn evaluates the caller; GET /vpn/{ip} takes any public IPv4 or IPv6 address. |
| Testing | Is there a sandbox, or do you test against live data? | Live data only, on the free tier — the test-data FAQ below shows how to produce all three states. |
| Access and pricing | Self-serve with a free tier and published plans, or sales-gated? | Free tier of 100 requests a month, no credit card; published plans above it, no sales call. |
| Compliance context | Does the VPN check share tokens, quota and audit trail with your sanctions screening? | Yes — one token, one quota and one request log across VPN detection, geolocation and every screening endpoint. |
Pricing
VPN checks are metered like every other CompliAPI request. As of November 2026 the free tier is 100 requests a month with a dashboard-issued API token and no credit card to start; paid plans raise the quota, and the endpoint and the signal are identical on every plan.
Know when a location signal deserves less trust
Geofencing and jurisdiction rules assume an IP address reflects where a user actually is. VPNs break that assumption, and building your own VPN-detection capability means sourcing and maintaining IP privacy data that changes constantly.
CompliAPI gives you the VPN signal as a one-request check. Call it where location matters in your flow — signup, wallet connect, high-value actions — and feed the result into your own policy: block, step up verification, or record it.
No VPN signal is infallible, and CompliAPI does not decide your policy. It reports the signal; your application chooses what a VPN result means for the user.
How it works
Send a request
Call /vpn to evaluate the calling client's IP, or /vpn/{ip} for any public IP address.
CompliAPI checks IP privacy data
The IP is evaluated against current privacy data to determine whether it appears to be a VPN exit.
Apply your policy
Branch on true, false or "unknown" — block, require additional verification, or simply record the signal.
What you can screen
- The calling client's IP (no argument needed)
- Any public IPv4 or IPv6 address
Where teams use it
Strengthening geofencing
Treat a restricted-jurisdiction decision differently when the location signal comes from a VPN.
Step-up verification
Ask for additional verification on sensitive actions when a session arrives over a VPN, instead of blocking outright.
Onboarding risk signals
Record VPN usage at signup as one input to your review process.
Session context for reviews
Attach the VPN signal to logged sessions so reviewers have the context later.
Scope and limitations
VPN detection is a signal for your access-control decisions, not a verdict. Design your policy around these realities:
No signal is infallible
New VPN exits and residential proxies appear constantly. A false result does not prove a direct connection, and detection data always trails the newest infrastructure.
"Unknown" is a real state
When privacy data is unavailable for an IP, the API says so rather than guessing. Decide explicitly how your policy handles "unknown".
You set the policy
Whether VPN usage means blocking, step-up verification, or just a log entry is your organization's decision — legitimate users use VPNs too.
Scope
The endpoint reports a VPN signal for an IP address. It is not device fingerprinting, bot detection, or fraud scoring.
Frequently asked questions
Is VPN detection required for OFAC compliance?
No regulation names VPN detection as a requirement. What OFAC expects is that sanctions controls — including geo-blocking — actually work, and its virtual-currency guidance treats VPN evasion as a known weakness of IP-based controls. Many teams add the VPN signal to make their geo-controls defensible. This is context, not legal advice.
How accurate is VPN detection?
No provider detects every VPN — new exit nodes and residential proxies appear constantly. That is why the response is tri-state rather than falsely confident: true and false reflect current privacy data, and unknown is reported honestly. Treat the result as one input to your policy, not a verdict.
Does VPN detection flag corporate VPNs?
It can — a VPN exit is a VPN exit, and the signal does not distinguish a corporate network from a consumer privacy app. That is a reason most teams step up verification on a VPN result rather than hard-blocking.
How can platforms enforce OFAC screening when users use VPNs?
In three layers, because a VPN changes the IP address, not the identifiers. First, screen what the user hands you — wallet addresses, emails, government IDs — against the sanctions lists; a VPN does not hide those. Second, geolocate the session with GET /geo and read its sanctioned-country flag as the jurisdiction decision. Third, call GET /vpn at the same moment: when it returns true or "unknown", treat the apparent country as low-trust — step up verification, hold the action, or apply your restricted-jurisdiction rule — and log all three results next to the decision. No control stops every VPN; what a platform can show is that its geo-control accounted for the known weakness. The section of the same name above walks through it against OFAC's own 2021 guidance and compliance framework.
Is there a free VPN checker API available?
Yes. CompliAPI's free tier — 100 requests a month with a dashboard-issued API token and no credit card, as of November 2026 — includes GET /api/v1/vpn and GET /api/v1/vpn/{ip}, returning the same true / false / "unknown" signal as the paid plans. It is a VPN signal for an IP address, not a proxy, Tor or datacenter classifier.
Is there test data for the VPN detection API?
There is no fixture set — the endpoint evaluates live IP privacy data, so you test it with real addresses. To exercise all three states: call GET /api/v1/vpn with no argument from your own machine (your egress IP, normally false), make the same call through a consumer VPN client (true), and pass any public IP from your logs as GET /api/v1/vpn/{ip} to see how your policy handles "unknown" when no privacy data exists for an address. Private and loopback caller addresses are rejected with a 400 that asks you to pass an IP explicitly, so a local development server needs the explicit form. Test calls count against the free tier's monthly quota like any other request.
Do banks need VPN detection for OFAC compliance?
No regulation names VPN detection, for banks or anyone else. What regulated institutions are expected to show is that a geographic restriction actually works — and an IP-based restriction that a VPN defeats silently is hard to defend. The VPN signal is one way to evidence that a location-based control was applied with its known weakness accounted for; how a bank weighs it — step-up verification, a hold, or a decline — is its own policy.
Related
Access controls
IP Geofencing API for Sanctioned Countries
Geofencing API using IP: one GET returns country, region, city and an OFAC sanctioned-country flag to geo-block sanctioned countries.
Sanctions screening
OFAC API — screen against the official SDN and Consolidated lists
Screen wallets, emails, IDs and countries against OFAC's SDN and Consolidated lists, polled every 15 minutes.
Use case
Sanctions screening and VPN detection for banks
Sanctions screening and VPN detection for banks by API: screen names, IDs and wallets against OFAC, UN, EU and UK lists, flag sanctioned-country and VPN sessions.
Use case
OFAC compliance API for DeFi
Add sanctions screening, geofencing and VPN detection to a DeFi frontend: screen connecting wallets against the OFAC SDN list and apply jurisdiction rules with simple GET requests.
Use case
Crypto sanctions screening for exchanges
Crypto sanctions screening for exchanges: screen deposit and withdrawal addresses, emails and IDs against the OFAC SDN list in one GET request.
Add VPN detection to your application
Get a free API key and make your first request in minutes.
Free tier: 100 requests a month. No credit card required.
CompliAPI provides data and tools that support compliance workflows. It does not provide legal advice, and organizations should determine their obligations with qualified counsel.