API Reference

VPN Blocker API Reference

VPN Blocker provides an API service to detect IP addresses belonging to VPN, Proxy and Hosting Organizations. Allowing you to effectively reduce malicious users from connecting to and accessing your services.

API Endpoint

https://api.vpnblocker.net/v2
Terms of Service
https://vpnblocker.net/terms-of-service/
Contact
[email protected]
Schemes
https, http
Version
2.0.0

Authentication

api_key

name
X-API-KEY
description
If you purchased a package (Basic, Professional) you will receive an API key which you will send with your API request to receive the added benefits of your purchased package.
in
header

Paths

query

Lookup a ip address get json response

GET/json/{ipaddress}

This endpoint will return a JSON formatted API response, the contents of the response object will vary depending on the presence of the API Key and the associated package for the key supplied.

Parameters

NameTypeInDescription
ipaddress *stringpathA valid IPv4 or IPv6 address you want to perform a query on.

Responses

StatusSchemaDescription
200 OKFreesuccessful operation
401 Unauthorizedinvalid or expired api key
406 Not Acceptableinvalid ip address
429 Too Many Requestsmonthly request limit reached (Free Package)
500 Internal Server ErrorErrorunexpected error

Response Content-Type: application/json · Security: api_key

Response example (200 OK)

{
  "status": "success",
  "package": "Free",
  "remaining_requests": 499,
  "ipaddress": "string",
  "host-ip": "boolean",
  "org": "string"
}

Response example (500 Internal Server Error)

{
  "status": "failed",
  "msg": "string"
}
query

Lookup a ip address get xml response

GET/xml/{ipaddress}

This endpoint will return a XML formatted API response, the contents of the response object will vary depending on the presence of the API Key and the associated package for the key supplied.

Parameters

NameTypeInDescription
ipaddress *stringpathA valid IPv4 or IPv6 address you want to perform a query on.

Responses

StatusSchemaDescription
200 OKFreesuccessful operation
401 Unauthorizedinvalid or expired api key
406 Not Acceptableinvalid ip address
429 Too Many Requestsmonthly request limit reached (Free Package)
500 Internal Server ErrorErrorunexpected error

Response Content-Type: application/xml · Security: api_key

Response example (200 OK) · GET /xml/8.8.8.8

<?xml version="1.0"?>
<root>
  <status>success</status>
  <package>Free</package>
  <remaining_requests>470</remaining_requests>
  <ipaddress>8.8.8.8</ipaddress>
  <host-ip>1</host-ip>
  <org>GOOGLE - Google Inc.</org>
</root>

Response example (406 Not Acceptable) · GET /xml/not-an-ip

<?xml version="1.0"?>
<root>
  <status>failed</status>
  <msg>Invalid IP Address</msg>
</root>
query

Lookup a ip address get html response

GET/html/{ipaddress}

This endpoint will return a HTML formatted API response, the contents of the response object will vary depending on the presence of the API Key and the associated package for the key supplied.

Parameters

NameTypeInDescription
ipaddress *stringpathA valid IPv4 or IPv6 address you want to perform a query on.

Responses

StatusSchemaDescription
200 OKa html formatted webpage is returned

Response Content-Type: text/html · Security: api_key

Schema Definitions

Free object

PropertyTypeDescription
statusstring
packagestringThe name of the package associated with the request
remaining_requestsinteger (int32)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.
ipaddressstringThe ipaddress the query was performed on
host-ipbooleanReturns whether or not the requested IP belongs to a hosting organization
orgstringReturns the organization who owns the IP address.

Example

{
  "status": "success",
  "package": "Free",
  "remaining_requests": 499,
  "ipaddress": "string",
  "host-ip": "boolean",
  "org": "string"
}

Basic object

PropertyTypeDescription
statusstring
packagestringThe name of the package associated with the request
ipaddressstringThe ipaddress the query was performed on
host-ipbooleanReturns whether or not the requested IP belongs to a hosting organization
orgstringReturns the organization who owns the IP address.

Example

{
  "status": "success",
  "package": "Basic",
  "ipaddress": "string",
  "host-ip": "boolean",
  "org": "string"
}

Professional object

PropertyTypeDescription
statusstring
packagestringThe name of the package associated with the request
ipaddressstringThe ipaddress the query was performed on
host-ipbooleanReturns whether or not the requested IP belongs to a hosting organization
hostnamestringReturns the hostname of the IP address. (Professional Package Only)
orgstringReturns the organization who owns the IP address.
countryobject
subdivisonobject
citystring
postalstring
locationobject

Example

{
  "status": "success",
  "package": "Professional",
  "ipaddress": "string",
  "host-ip": "boolean",
  "hostname": "string",
  "org": "string",
  "country": {
    "name": "Canada",
    "code": "CA"
  },
  "subdivison": {
    "name": "Ontario",
    "code": "ON"
  },
  "city": "Toronto",
  "postal": "M5A",
  "location": {
    "lat": 43.6532,
    "long": 79.3832
  }
}

Error object

PropertyTypeDescription
statusstring
msgstringThe reason for the failure

Example

{
  "status": "failed",
  "msg": "string"
}