Blackbox IP Reputation API

A free, modern API to detect proxies, VPNs, and malicious IPs.

Project History

Blackbox is a modern replacement for the now-discontinued proxy checking APIs, http://proxy.mind-media.com/block/ and http://www.shroomery.org/ythan/proxycheck.php.

The free APIv1 is a direct continuation of the Shroomery.org project, providing a simple way to determine if an IP address is a likely proxy.

Features & Improvements

This service was built from the ground up with several key improvements over the original APIs:

API v1

Returns a simple Y (Yes) or N (No) if the IP is detected as malicious or suspicious. This legacy endpoint is offered with unlimited free requests. Responses are cached for up to 30 days.

Endpoints:

Example:

curl https://blackbox.ipinfo.app/api/v1/8.8.8.8

Response Types:

Implementation Note:

When checking the response, it is important to explicitly check for Y. Avoid checking for "not N" (!= 'N'), as this could incorrectly treat an error response as a positive detection.

// Correct
if (response === 'Y') {
    // Handle proxy
}

// Incorrect
if (response !== 'N') {
    // This will incorrectly trigger on errors
}

API v2

Returns a detailed JSON object with information about the IP address. This modern endpoint is for those who need more specificity and control. API v2 is a subscription-only service, available at RapidAPI. Responses are cached for one day to ensure data is fresh while maintaining high performance.

Endpoint: /api/v2/{ip}

Example:

curl https://blackbox.ipinfo.app/api/v2/8.8.8.8

Example Response (IP is listed):

{
    "ip": "8.8.8.8",
    "error": null,
    "asn": {
        "name": "GOOGLE",
        "number": 15169,
        "network": "8.8.8.0",
        "cidr": 24
    },
    "detection": {
        "bogon": false,
        "cloud": true,
        "hosting": true,
        "proxy": false,
        "spamhaus": false,
        "tor": false
    },
    "suggestion": "block"
}

Example Response (IP is not listed):

{
    "ip": "72.49.1.1",
    "error": null,
    "asn": {
        "name": "FUSE-NET",
        "number": 6181,
        "network": "72.49.0.0",
        "cidr": 16
    },
    "detection": {
        "bogon": false,
        "cloud": false,
        "hosting": false,
        "proxy": false,
        "spamhaus": false,
        "tor": false
    },
    "suggestion": "allow"
}

Detections Explained

The detection object in the API v2 response contains the following boolean flags:

The suggestion field will be block if any detection flag is true. You can use the detailed flags to implement your own blocking logic.

Health Check

Endpoint: /ping or /api/ping

Example:

curl https://blackbox.ipinfo.app/ping

Projects Using Blackbox

Support This Project

If you find the free APIv1 useful, please consider supporting its development and maintenance.

Buy Me A Coffee