# IP Address Lookup: geolocation, ASN, owner, reverse DNS (`klyve1/ip-address-lookup`) Actor

Bulk IP lookup: country, region, city and coordinates (DB-IP Lite), ASN and network operator, reverse DNS hostname and RDAP network owner for IPv4 and IPv6 addresses. Fast, no API key.

- **URL**: https://apify.com/klyve1/ip-address-lookup.md
- **Developed by:** [Nico Klyve](https://apify.com/klyve1) (community)
- **Categories:** Developer tools, Business
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 ip address 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

## IP Address Lookup: geolocation, ASN, network owner, reverse DNS

Paste a list of **IPv4 or IPv6 addresses** (or hostnames) and get one clean row per IP: **country, region, city and coordinates**, the **ASN and network operator** (Google, Cloudflare, OVH, Orange...), the **reverse DNS hostname**, and the **network name, range and owner** declared to the regional internet registry (RIPE, ARIN, APNIC...) via RDAP.

Geolocation comes from the **DB-IP Lite** database bundled in the Actor, so lookups are fast and need no API key. Network ownership comes from the official **RDAP** service of the internet registries.

### What people use it for

- **Log and traffic analysis**: find where your visitors, signups or API calls come from.
- **Fraud and security**: spot hosting providers, VPNs on data centre networks, or traffic from unexpected countries.
- **Lead enrichment for B2B**: see which company network an IP belongs to (ASN organisation).
- **Network operations**: identify who owns an IP range before filing an abuse report.
- **AI agents**: "where is this IP and who runs it?" in one call.

### Example output

```json
{
  "query": "apify.com",
  "hostname": "apify.com",
  "ip": "13.32.28.104",
  "ok": true,
  "ipVersion": 4,
  "continent": "Europe",
  "continentCode": "EU",
  "country": "Norway",
  "countryCode": "NO",
  "isEU": false,
  "region": "Oslo",
  "city": "Oslo",
  "latitude": 59.9139,
  "longitude": 10.7522,
  "asn": 16509,
  "asnOrganization": "Amazon.com, Inc.",
  "reverseDns": "server-13-32-28-104.osl51.r.cloudfront.net",
  "networkName": "AMAZO-CF",
  "networkRange": "13.32.0.0 - 13.33.255.255",
  "networkCidr": "13.32.0.0/15",
  "networkOrganization": "Amazon.com, Inc.",
  "networkCountry": null,
  "rir": "arin",
  "geoDatabase": "DB-IP Lite 2026-11",
  "attribution": "IP Geolocation by DB-IP (https://db-ip.com), CC BY 4.0"
}
```

### Input

| Field | What it does | Default |
|---|---|---|
| `ips` | IPv4, IPv6 addresses or hostnames, one per line | required |
| `includeReverseDns` | Add the PTR hostname of each IP | `true` |
| `includeRdap` | Add network name, range and owner from the registry | `true` |
| `maxItems` | Safety limit per run | `10000` |

### Pricing

Pay per result: **$0.0005 per IP address** looked up (2,000 IPs for $1). Private or invalid addresses are free.

### Good to know

- City-level geolocation of IP addresses is approximate by nature (often the location of the provider's point of presence, not of the person). Country and ASN are much more reliable.
- Private and reserved ranges (192.168.x.x, 10.x.x.x, ::1...) are reported as such, without location.
- For very large lists, turn off `includeRdap`: lookups then run from the bundled databases only and are much faster.
- IP Geolocation by [DB-IP](https://db-ip.com), licensed under CC BY 4.0. The database version is given in every row.

# Actor input Schema

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

IPv4 or IPv6 addresses, one per line. Hostnames (example.com) are resolved and each of their IP addresses is looked up.

## `includeReverseDns` (type: `boolean`):

Look up the hostname of each IP address (PTR record).

## `includeRdap` (type: `boolean`):

Ask the regional internet registry (RIPE, ARIN, APNIC, LACNIC, AFRINIC) via RDAP for the network name, range and owner. Slower; turn off for very large lists.

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

Maximum number of entries from the list processed in one run.

## Actor input object example

```json
{
  "ips": [
    "8.8.8.8",
    "1.1.1.1",
    "2a00:1450:4007:80e::200e"
  ],
  "includeReverseDns": true,
  "includeRdap": true,
  "maxItems": 10000
}
```

# Actor output Schema

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

All rows produced by the run.

# 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:4007:80e::200e"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("klyve1/ip-address-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:4007:80e::200e",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("klyve1/ip-address-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:4007:80e::200e"
  ]
}' |
apify call klyve1/ip-address-lookup --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,klyve1/ip-address-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/rAKB0Y3KQqEWLxzTj/builds/roz2uGaxAEQMgOOFn/openapi.json
