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
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
| Name | Type | In | Description |
ipaddress * | string | path | A valid IPv4 or IPv6 address you want to perform a query on. |
Responses
| Status | Schema | Description |
| 200 OK | Free | successful operation |
| 401 Unauthorized | | invalid or expired api key |
| 406 Not Acceptable | | invalid ip address |
| 429 Too Many Requests | | monthly request limit reached (Free Package) |
| 500 Internal Server Error | Error | unexpected 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
| Name | Type | In | Description |
ipaddress * | string | path | A valid IPv4 or IPv6 address you want to perform a query on. |
Responses
| Status | Schema | Description |
| 200 OK | Free | successful operation |
| 401 Unauthorized | | invalid or expired api key |
| 406 Not Acceptable | | invalid ip address |
| 429 Too Many Requests | | monthly request limit reached (Free Package) |
| 500 Internal Server Error | Error | unexpected 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
| Name | Type | In | Description |
ipaddress * | string | path | A valid IPv4 or IPv6 address you want to perform a query on. |
Responses
| Status | Schema | Description |
| 200 OK | | a html formatted webpage is returned |
Response Content-Type: text/html · Security: api_key
Free object
| Property | Type | Description |
status | string | |
package | string | The name of the package associated with the request |
remaining_requests | integer (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. |
ipaddress | string | The ipaddress the query was performed on |
host-ip | boolean | Returns whether or not the requested IP belongs to a hosting organization |
org | string | Returns the organization who owns the IP address. |
Example
{
"status": "success",
"package": "Free",
"remaining_requests": 499,
"ipaddress": "string",
"host-ip": "boolean",
"org": "string"
}
Basic object
| Property | Type | Description |
status | string | |
package | string | The name of the package associated with the request |
ipaddress | string | The ipaddress the query was performed on |
host-ip | boolean | Returns whether or not the requested IP belongs to a hosting organization |
org | string | Returns the organization who owns the IP address. |
Example
{
"status": "success",
"package": "Basic",
"ipaddress": "string",
"host-ip": "boolean",
"org": "string"
}
Professional object
| Property | Type | Description |
status | string | |
package | string | The name of the package associated with the request |
ipaddress | string | The ipaddress the query was performed on |
host-ip | boolean | Returns whether or not the requested IP belongs to a hosting organization |
hostname | string | Returns the hostname of the IP address. (Professional Package Only) |
org | string | Returns the organization who owns the IP address. |
country | object | |
subdivison | object | |
city | string | |
postal | string | |
location | object | |
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
| Property | Type | Description |
status | string | |
msg | string | The reason for the failure |
Example
{
"status": "failed",
"msg": "string"
}