VPN Proxy Detector API - Ruby Gem

VPN Detector is a simple tool for detecting VPN usage. It returns a boolean value indicating whether the IP address is using a VPN or not.

Installation

Add this line to your application's Gemfile:

gem 'apiverve_vpndetector'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install apiverve_vpndetector

Getting Started

Get your API key at APIVerve

Basic Usage

require 'apiverve_vpndetector'

# Initialize the client
client = APIVerve::Vpndetector::Client.new(api_key: "YOUR_API_KEY")

# Make a request
response = client.execute({ ip: "103.62.49.210" })

# Print the response
puts response

Error Handling

begin
  response = client.execute({ ip: "103.62.49.210" })
  puts response["data"]
rescue APIVerve::Vpndetector::ValidationError => e
  puts "Validation error: #{e.errors.join(', ')}"
rescue APIVerve::Vpndetector::APIError => e
  puts "API error: #{e.message}"
  puts "Status code: #{e.status_code}"
end

Debug Mode

# Enable debug logging
client = APIVerve::Vpndetector::Client.new(
  api_key: "YOUR_API_KEY",
  debug: true
)

Example Response

{
  "status": "ok",
  "error": null,
  "data": {
    "ip": "103.62.49.210",
    "is_vpn": false,
    "is_datacenter": true,
    "checked_on": "2025-12-16",
    "risk_level": "High",
    "threat_level": "Moderate"
  }
}

Documentation

For more information, visit the API Documentation.

Support

License

This gem is available under the MIT License.