# Bulk IP Lookup – Geolocation, ASN, ISP, Reverse DNS & RDAP (`gazidev/bulk-ip-lookup`) Actor

Look up thousands of IPv4/IPv6 addresses at once: country, region, city, lat/lon, ASN and ISP/AS organisation, reverse DNS (PTR), optional RDAP network owner and abuse contact, plus private/reserved flags. No API key. $0.60 per 1,000 IPs.

- **URL**: https://apify.com/gazidev/bulk-ip-lookup.md
- **Developed by:** [Cemal Atakli](https://apify.com/gazidev) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.60 / 1,000 ip looked ups

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## 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

## Bulk IP Lookup – IP Geolocation, ASN, ISP, Reverse DNS & RDAP Owner

Look up **thousands of IPv4 and IPv6 addresses in one run** and get one clean row per IP: **country, region, city, latitude/longitude**, **ASN and AS organisation (ISP / hosting company)**, **reverse DNS (PTR hostname)**, a **private / reserved / CGNAT flag**, and optionally the **RDAP network owner**: network name, handle, IP range, registrant organisation, registry, country and **abuse e-mail**.

You don't need an API key or an account with an IP geolocation provider. Geolocation and ASN data come from the monthly **DB-IP Lite** databases (CC BY 4.0). Network ownership comes live from the five regional internet registries (ARIN, RIPE NCC, APNIC, LACNIC, AFRINIC) over the public RDAP protocol.

**$0.60 per 1,000 IPs**, with reverse DNS included. RDAP owner lookup is optional and costs **+$0.40 per 1,000**. Duplicates, invalid values and private/reserved addresses are **free**.

### What you can use it for

- **Log and traffic analysis**: paste web-server, firewall or VPN logs and see where visitors come from and which networks (cloud, ISP, bots) they belong to.
- **Fraud and risk checks**: compare a sign-up's IP country with the billing country, and spot hosting/datacenter ASNs (AWS, Google, OVH, Hetzner...) behind "residential" users.
- **Security and abuse handling**: find the network owner and **abuse contact** for attacking IPs, and use PTR names to recognise crawlers (`*.googlebot.com`, `*.search.msn.com`).
- **Lead and market research**: enrich IP lists from analytics or form submissions with company network names and locations.
- **Data cleaning**: flag private, loopback, CGNAT (100.64.0.0/10), documentation and other non-routable addresses before further processing.
- **Chaining**: feed IPs from another Actor's dataset, such as the A records from our Bulk DNS Lookup, a crawler, or a log parser.

### Input

| Field | What it does |
|---|---|
| `ips` | List of IPv4/IPv6 addresses. `1.2.3.4:443` and `[2001:db8::1]:443` work (the port is ignored). |
| `bulkText` | Paste anything (CSV, access logs, firewall exports). Every IP address found in it is looked up. |
| `datasetId` + `datasetField` | Read IPs from an Apify dataset (picker). The field can be a dot path (`client.ip`) or a list of IPs. |
| `reverseDns` | PTR hostname for every IP (default on, included in the price). |
| `rdap` | RDAP network owner and abuse contact (default off, extra event). |
| `includeInvalid` | Free error rows for values that are not IPs (default on). |
| `maxItems` | Cap on the number of unique public IPs looked up (0 = all). |

```json
{
  "ips": ["8.8.8.8", "1.1.1.1", "2a00:1450:4001:80b::200e", "88.255.1.1"],
  "reverseDns": true,
  "rdap": true
}
```

Logs pasted as text:

```json
{
  "bulkText": "203.0.113.7 - - [21/Oct/2026:10:00:00 +0000] \"GET / HTTP/1.1\" 200\n66.249.66.1 - - [21/Oct/2026:10:00:01 +0000] \"GET /robots.txt HTTP/1.1\" 200",
  "reverseDns": true
}
```

### Output

One row per unique IP. Example with RDAP enabled:

```json
{
  "input": "88.255.1.1",
  "ip": "88.255.1.1",
  "ipVersion": 4,
  "ipType": "public",
  "isPublic": true,
  "isPrivate": false,
  "isReserved": false,
  "continentCode": "AS",
  "countryCode": "TR",
  "countryName": "Turkey",
  "isInEU": false,
  "region": "Istanbul",
  "city": "Esenyurt",
  "latitude": 41.0343,
  "longitude": 28.6615,
  "geoNetwork": "88.255.1.0/30",
  "asn": 9121,
  "asOrganization": "Turk Telekomunikasyon Anonim Sirketi",
  "asNetwork": "88.255.0.0/16",
  "ptr": null,
  "rdapHandle": "88.224.0.0 - 88.255.255.255",
  "rdapName": "TR-TELEKOM-20051027",
  "rdapType": "ALLOCATED PA",
  "rdapCountry": "TR",
  "rdapRegistry": "ripe",
  "rdapCidr": "88.224.0.0/11",
  "rdapOrganization": "Turk Telekomunikasyon Anonim Sirketi",
  "rdapAbuseEmail": "abuse@turktelekom.com.tr",
  "rdapRegistered": "2005-10-27",
  "rdapLastChanged": "2021-07-04",
  "source": "DB-IP Lite city 2026-10 / ASN 2026-10 - IP Geolocation by DB-IP (https://db-ip.com), CC BY 4.0",
  "lookedUpAt": "2026-10-21T18:08:54+00:00"
}
```

Other fields: `isLoopback`, `isMulticast`, `ptrError` (e.g. `TIMEOUT`), `rdapStartAddress`, `rdapEndAddress`, `rdapError` (e.g. `NOT_FOUND`). Private and reserved addresses get a free row with `ipType` (`private`, `loopback`, `link-local`, `multicast`, `shared (CGNAT)`, `documentation/benchmark`, `reserved`) and no geolocation. Invalid values get a free row with `error`.

The run summary (counts, DB-IP edition, RDAP requests, duration) is saved as `OUTPUT` in the default key-value store. The **Overview** and **Network & RDAP** table views are available in the Output tab, and you can export to CSV, Excel or JSON.

### Pricing (pay per event)

| Event | Price | Charged when |
|---|---|---|
| `ip-lookup` | $0.0006 ($0.60 / 1,000) | A public IP is looked up and saved (geolocation + ASN + PTR) |
| `rdap-lookup` | $0.0004 ($0.40 / 1,000) | Only with `rdap` on, and only when the registry returned the network owner |
| Actor start | $0.00005 | Once per run |

Private/reserved addresses, duplicates, invalid values and failed lookups are not charged. If you set a maximum charge for the run, the Actor stops cleanly when it is reached.

How it compares with similar Store Actors (prices as listed in October 2026):

| Actor | Price per 1,000 IPs |
|---|---|
| **This Actor** (geo + ASN + PTR) | **$0.60** (+$0.40 with RDAP) |
| haketa | $0.90 |
| yadroo/ip-intel | $1.00 + $0.001 per run |
| scrapemint/ip-address-lookup | $1.00 |
| vulnv/ip-geolocation-and-insights-lookup | $1.95 |
| visita/ip-whois-inspector, ryanclinton | $3.00 |

### Speed

- Geolocation and ASN are offline database lookups, so they take microseconds per IP. PTR lookups run 100 at a time over Cloudflare/Google DNS. In our tests, **1,005 random IPs took 19 s** and the 3-IP demo about 5 s, including the database download.
- The DB-IP files (about 65 MB) are downloaded once a month and then cached in your account's key-value store `bulk-ip-lookup-dbip-cache`, so later runs start faster.
- RDAP is slower on purpose. The registries rate-limit clients, so the Actor sends at most one request at a time per registry, about 2 per second (slower for LACNIC/AFRINIC), and honours `429 Retry-After`. IPs in the same network reuse one answer. Expect roughly 3-10 IPs per second depending on the registry mix (our 30-IP test across all five registries took 10 s). That is fine for a few thousand addresses, but the extra step isn't worth it for millions of IPs.

### Data sources and attribution

- **IP Geolocation by DB-IP** – [DB-IP Lite](https://db-ip.com/db/download/ip-to-city-lite) "IP to City Lite" and "IP to ASN Lite" databases, licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). If you republish the data, keep the attribution with a link to https://db-ip.com. Every row carries it in `source`.
- **RDAP** (Registration Data Access Protocol) from ARIN, RIPE NCC, APNIC, LACNIC and AFRINIC, using the [IANA RDAP bootstrap registry](https://data.iana.org/rdap/).
- **Reverse DNS** via public DNS resolvers (1.1.1.1, 8.8.8.8).

This Actor is not affiliated with DB-IP, IANA or any regional internet registry.

### Accuracy

IP geolocation is an estimate. Country is usually right, but city and coordinates often point to the ISP's routing location, not the user. Mobile networks, VPNs, proxies and anycast services such as 8.8.8.8 and 1.1.1.1 can appear somewhere other than where the person is. The free "Lite" databases have city-level detail but no ZIP code, timezone or proxy/VPN flag. ASN data and RDAP ownership are generally reliable.

### Use with AI agents (Apify MCP)

Add this Actor to Claude, ChatGPT or any MCP client through the [Apify MCP server](https://mcp.apify.com) and ask, for example: *"Where do the IPs in this log come from, and which of them are cloud servers?"* or *"Who owns 185.199.108.153 and what is the abuse e-mail?"* The flat, documented output fields are easy for agents to filter and summarise.

### FAQ

**Do I need an API key?** No. Everything runs on open data and public protocols.

**Does it support IPv6?** Yes, for geolocation, ASN, PTR and RDAP. IPv4-mapped IPv6 (`::ffff:1.2.3.4`) is converted to IPv4.

**Can I look up a CIDR range like 10.0.0.0/8?** No. Ranges are not expanded. They return a free error row. Enter single addresses.

**How fresh is the data?** DB-IP Lite is updated monthly, and the Actor uses the current month's edition (the previous one during the first days of a month). RDAP and PTR are queried live on every run.

**Why is `ptr` empty?** Many IPs, especially home and mobile connections, have no reverse DNS record. That is normal and still charged as a normal lookup, because the geolocation and ASN data were delivered.

**Why is `rdapCountry` empty for US IPs?** ARIN's RDAP responses do not include a country field. Use `countryCode` (geolocation) instead.

**Will I pay for private IPs or duplicates?** No. Only unique public IPs are charged.

**Related Actors:** our **Bulk DNS Lookup** (A/MX/TXT/SPF/DMARC/PTR for domains) pairs well with this one. You can resolve domains first, then geolocate their IPs.

# Actor input Schema

## `ips` (type: `array`):

IPv4 and/or IPv6 addresses, one per line. `1.2.3.4:443` and `[2001:db8::1]:443` are accepted (the port is ignored). CIDR ranges are not expanded.

## `bulkText` (type: `string`):

Every IP address found in the text is looked up (other words are ignored). Handy for access logs, firewall exports and spreadsheets.

## `datasetId` (type: `string`):

Optional: a dataset (e.g. the output of another Actor run) that contains IP addresses.

## `datasetField` (type: `string`):

Field name in that dataset (dot path like `client.ip` works; a list of IPs in one field also works).

## `reverseDns` (type: `boolean`):

Resolve the PTR record of every IP (e.g. `dns.google`). Included in the base price.

## `rdap` (type: `boolean`):

Query the regional internet registry (ARIN, RIPE NCC, APNIC, LACNIC, AFRINIC) for the network name, handle, range, registrant organisation, country and abuse e-mail. Charged extra per IP with an RDAP result. Slower: registries are rate-limited (about 2 requests/second each; IPs in the same network reuse one answer).

## `includeInvalid` (type: `boolean`):

Adds a free row with an error for every value in *IP addresses* / the dataset that is not a valid IP.

## `maxItems` (type: `integer`):

Stop after this many unique public IPs (0 = all). Private/reserved, duplicate and invalid entries are free and not counted.

## Actor input object example

```json
{
  "ips": [
    "8.8.8.8",
    "1.1.1.1",
    "2a00:1450:4001:80b::200e"
  ],
  "datasetField": "ip",
  "reverseDns": true,
  "rdap": false,
  "includeInvalid": true,
  "maxItems": 0
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `results` (type: `string`):

No description

## `summary` (type: `string`):

No description

# 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 = {
    "ips": [
        "8.8.8.8",
        "1.1.1.1",
        "2a00:1450:4001:80b::200e"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("gazidev/bulk-ip-lookup").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 = { "ips": [
        "8.8.8.8",
        "1.1.1.1",
        "2a00:1450:4001:80b::200e",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("gazidev/bulk-ip-lookup").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 '{
  "ips": [
    "8.8.8.8",
    "1.1.1.1",
    "2a00:1450:4001:80b::200e"
  ]
}' |
apify call gazidev/bulk-ip-lookup --silent --output-dataset

```

## MCP server setup

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

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/9TcCngT0KjFglftzq/builds/k0QTNHi7V7XmrY46S/openapi.json
