# IP Lookup API (`gentle_cloud/ip-lookup-api`) Actor

Look up geolocation, ISP, proxy/VPN detection, and hosting provider info for any IP address. Supports batch lookups up to 100 IPs. No API key required.

- **URL**: https://apify.com/gentle_cloud/ip-lookup-api.md
- **Developed by:** [Monkey Coder](https://apify.com/gentle_cloud) (community)
- **Categories:** Developer tools, Jobs, Other
- **Features:** Limited permissions
- **Stats:** 29 total users, 6 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## 🌍 IP Lookup API

Look up geolocation, ISP, proxy/VPN detection, and hosting provider information for any IP address. Supports batch lookups of up to 100 IPs per request. No API key required.

### ✨ Features

- **Geolocation**: Country, region, city, district, ZIP code, latitude/longitude
- **Network info**: ISP, organization, AS number and name, reverse DNS
- **Security flags**: Proxy/VPN detection, mobile network detection, hosting provider detection
- **Locale data**: Timezone, UTC offset, local currency
- **Batch support**: Look up up to 100 IPs in a single request for maximum efficiency
- **No API key**: Uses the free ip-api.com service — no registration or API key needed

### 🚀 How to Use

1. **Enter IP addresses** — one per line in the input field
2. **Enable batch mode** (recommended) for faster lookups when querying multiple IPs
3. **Run the Actor** and download results as JSON, CSV, or Excel

### 📊 Output Fields

Each IP lookup result contains:

| Field | Description |
|-------|-------------|
| `ip` | The queried IP address |
| `status` | `success` or `fail` |
| `country` / `country_code` | Country name and ISO code |
| `region` / `region_name` | Region code and full name |
| `city` / `district` / `zip` | City-level location details |
| `latitude` / `longitude` | Geographic coordinates |
| `timezone` / `utc_offset` | Timezone and UTC offset in seconds |
| `isp` | Internet Service Provider |
| `org` | Organization name |
| `as_number` / `as_name` | Autonomous System number and name |
| `reverse_dns` | Reverse DNS hostname |
| `is_mobile` | Whether the IP is a mobile/cellular connection |
| `is_proxy` | Whether the IP is a known proxy, VPN, or Tor exit node |
| `is_hosting` | Whether the IP belongs to a hosting/data center provider |
| `continent` / `continent_code` | Continent name and code |
| `currency` | Local currency code |

### 📋 Sample Output

```json
{
    "ip": "8.8.8.8",
    "status": "success",
    "country": "United States",
    "country_code": "US",
    "region": "VA",
    "region_name": "Virginia",
    "city": "Ashburn",
    "zip": "20149",
    "latitude": 39.03,
    "longitude": -77.5,
    "timezone": "America/New_York",
    "isp": "Google LLC",
    "org": "Google Public DNS",
    "as_number": "AS15169 Google LLC",
    "as_name": "GOOGLE",
    "reverse_dns": "dns.google",
    "is_mobile": false,
    "is_proxy": false,
    "is_hosting": true,
    "continent": "North America",
    "currency": "USD",
    "checked_at": "2026-03-18T12:00:00.000000"
}
```

### ⚠️ Notes

- **Rate limits**: The free ip-api.com tier allows 45 requests/minute (single) or 15 requests/minute (batch). The Actor automatically handles rate limiting with delays and retries.
- **Batch mode**: Recommended for large IP lists. Processes up to 100 IPs per API call, significantly reducing total runtime.
- **IPv4 and IPv6**: Both address formats are supported.
- **Private IPs**: Lookups for private/reserved IP ranges (e.g., 192.168.x.x, 10.x.x.x) will return a `fail` status.
- **Memory**: Default 4096 MB is sufficient for any reasonable number of IPs.

# Actor input Schema

## `ip_addresses` (type: `string`):

One IP address per line (IPv4 or IPv6). Example: 8.8.8.8

## `use_batch` (type: `boolean`):

Use batch API for faster lookups (up to 100 IPs per request). Recommended for large IP lists.

## Actor input object example

```json
{
  "ip_addresses": "8.8.8.8\n1.1.1.1\n208.67.222.222\n9.9.9.9",
  "use_batch": true
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "ip_addresses": `8.8.8.8
1.1.1.1
208.67.222.222
9.9.9.9`,
    "use_batch": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("gentle_cloud/ip-lookup-api").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "ip_addresses": """8.8.8.8
1.1.1.1
208.67.222.222
9.9.9.9""",
    "use_batch": True,
}

# Run the Actor and wait for it to finish
run = client.actor("gentle_cloud/ip-lookup-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "ip_addresses": "8.8.8.8\\n1.1.1.1\\n208.67.222.222\\n9.9.9.9",
  "use_batch": true
}' |
apify call gentle_cloud/ip-lookup-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,gentle_cloud/ip-lookup-api"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/HJwrAwWZi8ZC1Y3td/builds/1JSFpXVtnj6wiUbsL/openapi.json
