Usage

Use the VPN Blocker API to quickly and easily determine whether a specified IP address belongs to a hosting or VPN organization. And on the Professional package also receive Hostname and GeoLocation data for the specified IP address.

API Parameters

http://api.vpnblocker.net/v2/{format}/{ip}
http://api.vpnblocker.net/v2/{format}/{ip}/{api key}

Parameter Description
{format} Must either be json, xml or html this is the format your API result will return in.
{ip} A valid IPV4 or IPV6 address you want to perform a query on.
{api key} (Optional) If you purchased a package (Basic, Professional) you will receive an API key which you will input in your API request to receive the added benefits of your purchased package.

Sample Requests

A demonstration of the data returned, the following sample of IP addresses will be queried using our various packages to demonstrate the possible data that is returned. For simplicity we will only be querying in JSON format.

IP belonging to a hosting organization: 192.184.93.53

  • web Query using the Free Package
    ~$ curl "http://api.vpnblocker.net/v2/json/192.184.93.53"
    {
        "status": "success",
        "package": "Free",
        "remaining_requests": 499,
        "ipaddress": "192.184.93.53",
        "host-ip": true,
        "org": "RamNode LLC"
    }
    
  • web Query using the Basic Package
    ~$ curl "http://api.vpnblocker.net/v2/json/192.184.93.53/API KEY"
    {
        "status": "success",
        "package": "Basic",
        "ipaddress": "192.184.93.53",
        "host-ip": true,
        "org": "RamNode LLC"
    }
    
  • web Query using the Professional Package
    ~$ curl "http://api.vpnblocker.net/v2/json/192.184.93.53/API KEY"
    {
        "status": "success",
        "package": "Professional",
        "ipaddress": "192.184.93.53",
        "host-ip": true,
        "org": "RamNode LLC",
        "country": {
            "name": "United States",
            "code": "US"
        },
        "subdivision": {
            "name": "Georgia",
            "code": "GA"
        },
        "city": "Macon",
        "postal": "31205",
        "location": {
            "lat": 32.8407,
            "long": -83.6324
        }
    }
    

IP belonging to a consumer: 189.230.198.152

  • web Query using the Free Package
    ~$ curl "http://api.vpnblocker.net/v2/json/189.230.198.152"
    {
        "status": "success",
        "package": "Free",
        "remaining_requests": 498,
        "ipaddress": "189.230.198.152",
        "host-ip": false,
        "org": "Uninet S.A. de C.V."
    }
    
  • web Query using the Basic Package
    ~$ curl "http://api.vpnblocker.net/v2/json/189.230.198.152/API KEY"
    {
        "status": "success",
        "package": "Basic",
        "ipaddress": "189.230.198.152",
        "host-ip": false,
        "org": "Uninet S.A. de C.V."
    }
    
  • web Query using the Professional Package
    ~$ curl "http://api.vpnblocker.net/v2/json/189.230.198.152/API KEY"
    {
        "status": "success",
        "package": "Professional",
        "ipaddress": "189.230.198.152",
        "host-ip": false,
        "org": "Uninet S.A. de C.V.",
        "country": {
            "name": "Mexico",
            "code": "MX"
        },
        "subdivision": {
            "name": "Estado de Mexico",
            "code": "MEX"
        },
        "city": "Zumpango",
        "postal": "55646",
        "location": {
            "lat": 19.7978,
            "long": -99.1017
        }
    }
    
API Results

Result Description
status Returns "success" or "failed" whether or not we were able to process your API request. If status returns "failed" the reason would be listed under the msg field.
package The server automatically returns to you what package your using based on the presence of an API Key.
remaining_requests This field only appears if your requesting from the API Server without an API Key, meaning after the remaining_requests equal 0 the server will no longer process your API requests for the month. This rate limit is only present in the Free Package. Basic and Professional packages do not have this restriction.
ipaddress The IPv4 or IPv6 address you requested information on from the API Server.
host-ip Returns boolean value if the requested IP belongs to a hosting organization or not.
hostname Returns the hostname of the IP address. (Professional Package Only)
org Returns the organization who owns the IP address.
msg Returns string which contains information regarding why the status is failed.
country Contains information such as the requested IP addresses country name and country code. (Professional Package Only)
subdivision Contains information such as the requested IP addresses subdivision name and subdivision code. (Professional Package Only)
city Contains the requested IP addresses city name. (Professional Package Only)
postal Contains the requested IP addresses postal and/or zip code. (Professional Package Only)
location Contains the requested IP addresses approximated latitude and longitude. (Professional Package Only)

HTTP Status Codes

Our API server will return the following possible HTTP status codes.

Code Description
200 OK - The server was able to process your request. Check the field "status" if it was able to lookup information regarding your IP Address.
400 Bad Request - Make sure you entered a valid format for the API result. Must be either JSON, XML or HTML.
403 Forbidden - This occurs when you try requesting from the API server using SSL (HTTPS) without the Basic or Professional package.

Our API service uses GeoLite2 City data created by MaxMind, available from http://www.maxmind.com.