Endpoint
Authentication
| Header | Required | Value |
|---|---|---|
X-API-Key | Yes | Your API key (bun_...) |
Overview
Get detailed geolocation and network information for any IP address. Bunny returns the country, country code, region, city, postal code, coordinates, timezone, ISP name, organization, and AS number, all in a single fast request.Use cases
- Personalise content and language by user location
- Log request origin for analytics and auditing
- Enforce region-based access controls
- Display estimated shipping locations
Details
Supports IPv4 and IPv6. City-level accuracy varies by region and ISP. Coordinates represent the approximate centre of the detected city, not the end user’s precise location.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 looked up |
country | string | null | Full country name (e.g. "United States") |
country_code | string | null | ISO 3166-1 alpha-2 country code (e.g. "US") |
region | string | null | Full region/state name (e.g. "California") |
region_code | string | null | Region/state code (e.g. "CA") |
city | string | null | City name |
zip | string | null | Postal/ZIP code |
lat | number | null | Latitude |
lon | number | null | Longitude |
timezone | string | null | Timezone identifier (e.g. "America/Los_Angeles") |
isp | string | null | Internet Service Provider name |
org | string | null | Organization name |
as | string | null | AS number and name (e.g. "AS15169 Google LLC") |

