# Ip2Location

IP2Location.io provides fast and accurate IP geolocation data, including country, city, ISP, latitude, longitude, and more, supporting both IPv4 and IPv6 lookups.

- **Category:** developer tools
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 9
- **Triggers:** 0
- **Slug:** `IP2LOCATION`
- **Version:** 20260223_00

## Tools

### Bulk IP Geolocation

**Slug:** `IP2LOCATION_BULK_IP_GEOLOCATION`

Retrieve geolocation information for multiple IP addresses in a single request. Supports batch processing of 1-1000 IPv4 or IPv6 addresses with flexible output formats (JSON or CSV) and customizable field selection. Returns comprehensive data including country, region, city, coordinates, timezone, ASN, and proxy detection. Note: Automatically falls back to individual lookups if bulk endpoint is unavailable.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `ips` | array | Yes | List of IPv4 or IPv6 addresses to look up (1 to 1000 entries). |
| `fields` | array | No | Optional subset of fields to return; if omitted, all fields are returned. |
| `format` | string ("json" | "csv") | No | Response format: 'json' for structured data or 'csv' for raw CSV text. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Check IP2Location API Credits

**Slug:** `IP2LOCATION_CHECK_CREDITS`

Tool to check remaining IP2Location API credits. Use after setting up authentication to monitor usage.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `key` | string | No | API key for IP2Location; if omitted, uses the metadata-configured key. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### IP2Location Distance Calculator

**Slug:** `IP2LOCATION_DISTANCE`

Calculate the great-circle distance between two IP addresses based on their geographic locations. This tool looks up the geolocation (latitude/longitude) for each IP address and calculates the shortest distance between them over the Earth's surface using the Haversine formula. Supports both IPv4 and IPv6 addresses. Returns the distance in kilometers along with the coordinates of both IPs. Use when you need to determine geographic separation between two IP addresses, such as for latency estimation, geographic analysis, or network optimization.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `ip1` | string | Yes | First IPv4 or IPv6 address |
| `ip2` | string | Yes | Second IPv4 or IPv6 address |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### IP2WHOIS Hosted Domains Lookup

**Slug:** `IP2LOCATION_GET_HOSTED_DOMAINS`

Retrieves a list of domain names hosted on a specific IP address (IPv4 or IPv6). Use this tool when you need to: - Discover which domains are hosted on a particular IP - Investigate shared hosting environments - Analyze domain-to-IP relationships The API supports pagination for IPs with many hosted domains.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `ip` | string | Yes | IPv4 or IPv6 address to query. Returns a list of domain names that are hosted on this IP address. |
| `key` | string | Yes | IP2WHOIS API key for accessing the Hosted Domains API. Required for authentication. |
| `page` | integer | No | Page number for pagination (must be >= 1). Use with 'total_pages' in response to retrieve all results. Defaults to 1. |
| `format` | string ("json" | "xml") | No | Response format. Accepts 'json' or 'xml'. Defaults to 'json'. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### IP2Location Get IP Geolocation

**Slug:** `IP2LOCATION_GET_IP_GEOLOCATION`

Tool to retrieve geolocation data for an IP address. Use when detailed IP location info is needed.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `ip` | string | Yes | IPv4 or IPv6 address to look up |
| `lang` | string ("ar" | "cs" | "da" | "de" | "en" | "es" | "et" | "fi" | "fr" | "ga" | "it" | "ja" | "ko" | "ms" | "nl" | "pt" | "ru" | "sv" | "tr" | "vi" | "zh-cn" | "zh-tw") | No | Translation language for certain addon fields; valid values as ISO language codes |
| `addon` | array | No | Extra data to include; valid values: continent, country, region, city, geotargeting, country_groupings, time_zone_info |
| `format` | string ("json" | "xml") | No | Response format; default is json |
| `package` | string ("WS1" | "WS2" | "WS3" | "WS4" | "WS5" | "WS6" | "WS7" | "WS8" | "WS9" | "WS10" | "WS11" | "WS12" | "WS13" | "WS14" | "WS15" | "WS16" | "WS17" | "WS18" | "WS19" | "WS20" | "WS21" | "WS22" | "WS23" | "WS24" | "WS25") | Yes | Web service package controlling which fields are returned; valid values WS1–WS25 |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### IP2Proxy: Get Proxy Detection

**Slug:** `IP2LOCATION_GET_PROXY_DETECTION`

Tool to detect if an IP is a proxy, VPN, or TOR exit node. Use when verifying anonymizing services.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `ip` | string | Yes | IPv4 or IPv6 address to check for proxy/VPN/TOR usage |
| `check` | integer | No | Set to 1 to return only remaining credits instead of lookup data |
| `package` | string ("PX1" | "PX2" | "PX3" | "PX4" | "PX5" | "PX6" | "PX7" | "PX8" | "PX9" | "PX10" | "PX11") | No | Level of detail/package (PX1=basic to PX11=full) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### IP2WHOIS Domain WHOIS Lookup

**Slug:** `IP2LOCATION_IP2_WHOIS_DOMAIN_WHOIS`

Tool to retrieve WHOIS information for a domain. Use when you need domain registration details.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `domain` | string | Yes | Domain name to query, e.g. 'example.com' |
| `format` | string ("json" | "xml") | No | Response format; either 'json' or 'xml'. Defaults to 'json' |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### IP2Location List IPs

**Slug:** `IP2LOCATION_LIST_IPS`

Tool to list a curated set of test IPv4 and IPv6 addresses. Use when sample IPs are needed for IP2Location or IP2Proxy lookups during development or testing.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `type` | string ("ipv4" | "ipv6" | "all") | No | IP version filter: 'ipv4', 'ipv6', or 'all' to return both. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
