🚀 Experience the new and improved APIVoid! Check out what's new

VPN Test API: Check if a Website Blocks VPN Access

Use this JSON API to make an HTTP request through a VPN service. It helps you verify whether a website is accessible over VPN or if it's blocking VPN exit nodes. Ideal for testing your own VPN IP blocking rules or checking how a website or URL behaves for users accessing it via VPN.

Consumes 10 credits per API call

# Example Curl request from the command line:
                          
curl -X POST "https://api.apivoid.com/v2/vpn-test" \
     -H "Content-Type: application/json" \
     -H "X-API-Key: YOUR_API_KEY_HERE" \
     -d '{"url":"https://www.nvidia.com/"}'

# Example JSON output for a 200 HTTP status code:

{
    "url": "https://www.patreon.com/",
    "accessible": false,
    "status_code": 403,
    "debug_message": "",
    "response_headers": {
        "Accept-Ch": "Sec-CH-UA-Bitness, Sec-CH-UA-Arch, Sec-CH-UA-Full-Version, Sec-CH-UA-Mobile, Sec-CH-UA-Model, Sec-CH-UA-Platform-Version, Sec-CH-UA-Full-Version-List, Sec-CH-UA-Platform, Sec-CH-UA, UA-Bitness, UA-Arch, UA-Full-Version, UA-Mobile, UA-Model, UA-Platform-Version, UA-Platform, UA",
        "Cache-Control": "private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0",
        "Cf-Chl-Out": "oCfcenr8aisw9BCZVlO6UgCVIhba0yavoWofUshfKsoxS0qPqaCDPROZv8sI03NIyTxkrqaQIJVWCsIokIan/hOb+XiEqx8ZW4jgkQL0MlWbbx/sagh1oKQHLg613cykA20IPDKlkluL4BK+pb+s1Q==$IHuTY7AGaBAQPSt5CN7cvQ==",
        "Cf-Mitigated": "challenge",
        "Cf-Ray": "927ae4a10dff7291-EWR",
        "Content-Type": "text/html; charset=UTF-8",
        "Critical-Ch": "Sec-CH-UA-Bitness, Sec-CH-UA-Arch, Sec-CH-UA-Full-Version, Sec-CH-UA-Mobile, Sec-CH-UA-Model, Sec-CH-UA-Platform-Version, Sec-CH-UA-Full-Version-List, Sec-CH-UA-Platform, Sec-CH-UA, UA-Bitness, UA-Arch, UA-Full-Version, UA-Mobile, UA-Model, UA-Platform-Version, UA-Platform, UA",
        "Cross-Origin-Embedder-Policy": "require-corp",
        "Cross-Origin-Opener-Policy": "same-origin",
        "Cross-Origin-Resource-Policy": "same-origin",
        "Date": "Fri, 28 Mar 2025 23:26:33 GMT",
        "Expires": "Thu, 01 Jan 1970 00:00:01 GMT",
        "Nel": "{\"success_fraction\":0,\"report_to\":\"cf-nel\",\"max_age\":604800}",
        "Origin-Agent-Cluster": "?1",
        "Permissions-Policy": "accelerometer=(),autoplay=(),browsing-topics=(),camera=(),clipboard-read=(),clipboard-write=(),geolocation=(),gyroscope=(),hid=(),interest-cohort=(),magnetometer=(),microphone=(),payment=(),publickey-credentials-get=(),screen-wake-lock=(),serial=(),sync-xhr=(),usb=()",
        "Referrer-Policy": "same-origin",
        "Report-To": "{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=DnAvbTN8ie3uDz84OovG1CRA4bp7jaiWwZ5%2FH9ZB2zORWklOm2KEPX7EZQnNt7N8fKcEtSGDvZOC7BgTMkoifnTAc1gWSHDDhiC%2FCOKTAvHUUavXyBwikf%2BGaWGEws7z3w%3D%3D\"}],\"group\":\"cf-nel\",\"max_age\":604800}",
        "Server": "cloudflare",
        "Server-Timing": "chlray;desc=\"927ae4a10dff7291\"",
        "Set-Cookie": "__cf_bm=lCAZXpgkI5.hX9ghhJXZEPbjBpR64uTbpuNr_mlVlB8-1743204393-1.0.1.1-JFpzaxmPUAykjwdevJPx1vsBSuZ4Vf80VDrCM_jF3VtoRVIUWUsUOh8KKfQ4Y137KQa2JiGy3lXyfoibhq32vXuFQUOvtgzPGG1oFb6k7kKxWKoQ6rzYS0offJr7_.ZU; path=/; expires=Fri, 28-Mar-25 23:56:33 GMT; domain=.patreon.com; HttpOnly; Secure; SameSite=None",
        "Strict-Transport-Security": "max-age=2592000",
        "Vary": "Accept-Encoding",
        "X-Content-Options": "nosniff",
        "X-Content-Type-Options": "nosniff",
        "X-Frame-Options": "SAMEORIGIN"
    },
    "html_info": {
        "title": "Just a moment...",
        "description": ""
    },
    "elapsed_ms": 29
}
Code analysis

Key Features

Test your WAF or IP blocking rules if they effectively block VPN IPs

Businesses and startups use this VPN Test API to make HTTP requests through a VPN service to see if a website is accessible via VPN, or to test and verify VPN IP blocking rules.

VPN IP Block Test

An easy way to check if your web application firewall rules are effective in blocking VPN IP addresses.

Websites Blocking VPN

With this API you can check if a website or specific URL (e.g login page) is blocking VPN accesses.

Detailed Report

The JSON data includes the status code (e.g 403 if VPN is blocked), response headers and page title.

Simple Usage

Just submit the URL to test and check if the returned JSON field "accessible" is false (means VPN is blocked).

Common Use Cases

Take a look at some real-world use cases of this API service

Our API can be used in many ways, from firewall rules testing to cybersecurity-related tasks. Here we showcase the most popular use cases according to our customers usage:

Test Your Firewall

If you have configured your firewall to block VPN IP addresses, use this API to check that it works as intended.

Test Other Websites

A quick and simple way to test if other websites or URLs are blocking access to VPN IP addresses.

Research Purposes

Scan a list of popular websites and discover which ones are blocking users accessing them via VPN.

Which URL Blocks VPN

Check if a website allows VPN on some pages and blocks it on others (e.g on signup or login web pages).

Use cases

USAGE EXAMPLE

Learn how seamless it is to add and use VPN Test API anywhere you want

All it takes is a HTTPS POST request with JSON payload to our endpoint, and you’ll receive the response within seconds, usually within 1-3 seconds. Here are a few code examples to use the API:

$url = 'https://www.patreon.com/';

$apiUrl = 'https://api.apivoid.com/v2/vpn-test';
$apiKey = 'your_api_key_here';

$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json', 'X-API-Key: ' . $apiKey]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(['url' => $url]));
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

if ($httpCode === 200) {
    $responseData = json_decode($response, true);

    print_r($responseData);
}

Start using our API services, it takes just a few minutes

Create your account, pick a subscription plan, and make your first API call instantly with your API key—simple as that!

Get started now