Endpoint
Authentication
| Header | Required | Value |
|---|---|---|
X-API-Key | Yes | Your API key (bun_...) |
Overview
Classify any IP address as residential, hosting/datacenter, mobile, VPN, Tor exit node, or open proxy. Bunny’s IP Classification API returns a classification label, confidence score, and a full signal breakdown, so you can make precise decisions about traffic sources.Use cases
- Detect and block VPN, proxy, and Tor traffic
- Identify bot and datacenter traffic
- Enforce geo-based access controls
- Fraud prevention and risk scoring
Details
Supports both IPv4 and IPv6. Theconfidence field (0–1) indicates classification certainty. The signals object breaks down each signal individually so you can apply your own logic.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ip | string | Yes | Valid IPv4 or IPv6 address |
Response
200 OK
| Field | Type | Description |
|---|---|---|
ip | string | The IP that was checked |
classification | string | One of: hosting, residential, mobile, vpn, tor, proxy, unknown |
confidence | number | 0.0 to 1.0 |
signals | object | Boolean flags (see below) |
network | object | ASN, org, provider (see below) |
geo | object | country (see below) |
| Field | Type |
|---|---|
is_hosting | boolean |
is_residential | boolean |
is_mobile | boolean |
is_vpn | boolean |
is_tor | boolean |
is_proxy | boolean |
| Field | Type | Description |
|---|---|---|
asn | int | null | Autonomous System Number |
org | string | null | Organization name |
provider | string | null | Friendly name (e.g. “AWS”) |
| Field | Type | Description |
|---|---|---|
country | string | null | ISO 3166-1 alpha-2 country code (e.g. "US") |

