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

Tor Test API: Check if Access via Tor Network is Blocked

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

Consumes 10 credits per API call

# Example Curl request from the command line:
                          
curl -X POST "https://api.apivoid.com/v2/tor-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.nvidia.com/",
    "accessible": false,
    "status_code": 403,
    "debug_message": "",
    "response_headers": {
        "Content-Length": "366",
        "Content-Type": "text/html",
        "Date": "Fri, 28 Mar 2025 15:20:54 GMT",
        "Expires": "Fri, 28 Mar 2025 15:20:54 GMT",
        "Last-Modified": "Fri, 28 Mar 2025 15:20:54 GMT",
        "Mime-Version": "1.0",
        "Server": "AkamaiGHost",
        "Set-Cookie": "c_code=DE; Path=/; Secure",
        "X-Cache-Status": "Error from child",
        "X-Cdn": "akam",
        "X-Cdn-Version": "v373"
    },
    "html_info": {
        "title": "Access Denied",
        "description": ""
    },
    "elapsed_ms": 678
}
Code analysis

Key Features

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

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

Tor IP Block Test

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

Websites Blocking Tor

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

Detailed Report

The JSON data includes the status code (e.g 403 if Tor 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 Tor 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 Tor 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 Tor IP addresses.

Check Onion Websites

Use this API to check if a .onion website is online and view the response headers and page title.

Which URL Blocks Tor

Check if a website allows Tor 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 Tor 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.nvidia.com/';

$apiUrl = 'https://api.apivoid.com/v2/tor-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