The IP API classifies an IP address (IPv4 or IPv6) by network type: hosting, residential, mobile, VPN, TOR, proxy, or unknown. Use it to detect datacenter/VPN traffic, prioritize residential users, or block risky networks.

Endpoint

POST https://api.bunny.build/api/v1/ip/check

Request body

Send a JSON body with one field: ip (string, required). Must be a valid IPv4 or IPv6 address.

Response (200)

FieldTypeDescription
ipstringThe IP that was checked
classificationstringhosting, residential, mobile, vpn, tor, proxy, or unknown
confidencenumber0.0 to 1.0
signalsobjectBoolean flags: is_hosting, is_residential, is_mobile, is_vpn, is_tor, is_proxy
networkobjectasn, org, provider (e.g. “AWS”)
geoobjectcountry, region
Example:
{
  "ip": "203.0.113.42",
  "classification": "hosting",
  "confidence": 0.95,
  "signals": {
    "is_hosting": true,
    "is_residential": false,
    "is_mobile": false,
    "is_vpn": false,
    "is_tor": false,
    "is_proxy": false
  },
  "network": {
    "asn": 16509,
    "org": "Amazon.com, Inc.",
    "provider": "AWS"
  },
  "geo": {
    "country": "US",
    "region": null
  }
}

Example

curl -X POST https://api.bunny.build/api/v1/ip/check \
  -H "X-API-Key: sec4_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"ip": "203.0.113.42"}'

SDK helpers

SDKs typically provide:
  • check(ip) — Full result
  • is_hosting(ip), is_vpn(ip), is_tor(ip), is_residential(ip), is_mobile(ip) — Boolean helpers

Errors

StatusMeaning
401Missing or invalid API key
422Invalid IP format
429Rate limit exceeded
402Quota exceeded
See API Reference → POST /ip/check for full request/response and error bodies.