Recommended Free Tools
To check whether an IP address is classified as a VPN by IP2Location.io, call its API from Python and inspect the JSON field proxy.is_vpn. A value of true is a VPN classification; false is a negative result only when the field is present. If the field or the broader proxy object is missing, treat the result as unavailable—not as proof that the address is not a VPN.
What the API checks
IP2Location.io classifies IP addresses associated with anonymizing VPN services and may return provider information when available. Its API distinguishes the VPN-specific proxy.is_vpn field from proxy.proxy_type, which identifies a proxy category, and the broader is_proxy flag, which concerns proxy or intermediary classification. These fields answer related but different questions; use is_vpn when the question is specifically whether the address is classified as a VPN. IP2Location.io API documentation and its proxy concepts reference describe these fields and use cases.
An IP classification is not independent proof of a person’s identity, intent, or exact location. IP2Location.io lists content geo-restriction or licensing and fraud-risk assessment among possible uses, but the official materials cited here do not establish an independent accuracy rate or false-positive and false-negative rates.
Check that your account includes VPN detection
Check feature access before building your workflow around is_vpn. IP2Location.io’s Python example says the field requires the Security plan, while its current pricing page lists VPN detection for Plus and Security and says Micro and Small detect open proxies only. Those vendor statements do not align perfectly, so verify the field’s availability in your account and current plan rather than assuming a particular tier includes it.
#1 Best Overall
The API documentation describes keyless access up to 1,000 queries per day and a keyed Free plan with up to 50,000 queries per month. These are IP2Location.io’s documented limits and may change. Its documentation supports API-key authentication as a URL parameter and Bearer token authentication. Consult the current pricing page and API documentation for applicable access and limits.
Call the API from Python
Install Requests
Install the Requests library in the Python environment that will run the script:
Rank #2
python -m pip install requests
Make the request and interpret the response
The following example follows the pattern in IP2Location.io’s published Python example. Set the API key and target IP through environment variables before running it. It distinguishes a positive result, a negative result when the VPN field is present, and an unavailable field.
import os
import requests
API_URL = "https://api.ip2location.io/"
api_key = os.environ.get("IP2LOCATION_API_KEY")
target_ip = os.environ.get("TARGET_IP")
if not api_key or not target_ip:
raise SystemExit("Set IP2LOCATION_API_KEY and TARGET_IP first.")
try:
response = requests.get(
API_URL,
params={"key": api_key, "ip": target_ip, "format": "json"},
timeout=15,
)
response.raise_for_status()
data = response.json()
except requests.exceptions.HTTPError as exc:
print(f"API returned an HTTP error: {exc}")
raise SystemExit(1)
except requests.exceptions.RequestException as exc:
print(f"Request failed: {exc}")
raise SystemExit(1)
except requests.exceptions.JSONDecodeError as exc:
print(f"API response was not valid JSON: {exc}")
raise SystemExit(1)
proxy = data.get("proxy")
if not isinstance(proxy, dict) or "is_vpn" not in proxy:
print("VPN status unavailable: the response has no proxy.is_vpn field.")
elif proxy["is_vpn"] is True:
provider = proxy.get("provider")
if provider:
print(f"IP is classified as a VPN. Provider: {provider}")
else:
print("IP is classified as a VPN; provider information is unavailable.")
elif proxy["is_vpn"] is False:
print("IP is not classified as a VPN by this response.")
else:
print("VPN status unavailable: proxy.is_vpn is not a Boolean value.")
For example, export IP2LOCATION_API_KEY and TARGET_IP in your shell or configure them through your deployment environment, then run the Python file. Do not commit a real API key in source code; use an appropriate secret store or environment configuration.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Handle missing fields and API errors as distinct outcomes
A missing proxy object or is_vpn field is not the same as is_vpn: false. The account may not have access to the VPN field, or the response may not contain the expected data. Surface that state to the caller so it cannot silently become a negative classification.
HTTP errors and invalid JSON should also be handled separately from a valid classification. IP2Location.io documents errors for invalid API keys, insufficient query allowance, invalid IP addresses, internal server errors, and unsupported language or translation requests. Review the response and the current API error documentation when troubleshooting. Do not treat an unsuccessful request as a result about the IP.
Rank #4
When to use the result
A VPN classification can contribute to a risk or access decision, but it should not be the sole basis for conclusions about a user. For example, a service enforcing licensing rules can use the classification as one signal alongside its own account, location, and policy checks. The API’s provider field is optional, so code should work when it is absent.
If you are selecting a plan, compare the current feature list, query allowance, included proxy and security fields, and price on IP2Location.io’s pricing page. Its displayed prices and feature availability can change; confirm the current terms before committing to a workflow.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

