# IP Address Lookup: ASN, Cloud, Tor Exit & Reverse DNS (Bulk) (`datacrate/ip-network-intel`) Actor

Bulk IP lookup, no API key: origin ASN and AS name, network range, RIR registry country and allocation date, AWS / Google Cloud / Oracle / Cloudflare / Fastly / DigitalOcean membership, Tor exit flag, reverse DNS. Paste IPs or raw logs.

- **URL**: https://apify.com/datacrate/ip-network-intel.md
- **Developed by:** [Data Crate](https://apify.com/datacrate) (community)
- **Categories:** Developer tools, Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.20 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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: ASN, Cloud, Tor Exit & Reverse DNS (Bulk)

Look up thousands of IPv4 and IPv6 addresses in one run. For every IP you get the **origin ASN and AS name**, the **announced network range / prefix**, the **RIR registry, registry country, allocation date and status**, **cloud / CDN provider membership** (AWS, Google Cloud, Oracle Cloud, Cloudflare, Fastly, DigitalOcean) with service and region, a **Tor exit flag**, **reverse DNS (PTR)** with forward confirmation, and a simple, transparent `infraType`. No API key, no browser, no vendor geolocation database.

Paste a list of IPs, or paste a whole server log / firewall export / CSV column: the actor extracts every valid IPv4 and IPv6 address and looks each one up once.

### Why use it

- **Cheap**: $1.50 per 1,000 IPs, no start fee.
- **Fast**: all data sits in a compact in-memory index (sorted intervals, binary search). 10,000 IPs take about a minute, most of it reverse DNS.
- **Honest data**: only official or explicitly licensed public datasets; every row lists its `sources`. `registryCountry` is where the address block is registered, **not** where the user is. If you need city-level geolocation, this actor deliberately does not guess.
- **Log-friendly**: free-text input, deduplication, IPv4-mapped IPv6 normalisation, private/reserved ranges labelled instead of looked up.

### Input

| Field | Meaning |
|---|---|
| `ips` | IPv4 / IPv6 addresses (list). Invalid entries are skipped with a warning. |
| `ipsText` | Any text. Every valid IP in it is extracted (ports and brackets are handled). |
| `includeReverseDns` | PTR lookup plus forward-confirmed reverse DNS check (default on). |
| `includeCloud` | Match AWS / Google Cloud / Oracle / Cloudflare / Fastly / DigitalOcean ranges (default on). |
| `includeTor` | Flag Tor exit nodes (default on). |
| `maxItems` | Cap on unique IPs (you are charged per IP returned). |

If you supply nothing at all (`{}`), the actor looks up six built-in demo addresses so the run still succeeds.

### Output (one row per unique IP)

`ip, version, asn, asName, asCountry, networkRange, bgpPrefix, rir, registryCountry, allocatedDate, registryStatus, reverseDns, fcrdnsMatch, cloudProvider, cloudService, cloudRegion, cloudProviders[], isCloud, isCdn, isTorExit, infraType, notes[], sources[], checkedAt`

Example (trimmed):

```json
{
  "ip": "34.1.208.10", "version": 4,
  "asn": 19527, "asName": "GOOGLE-2 - Google LLC", "asCountry": "US",
  "networkRange": "34.1.208.0 - 34.1.223.255", "bgpPrefix": "34.1.208.0/20",
  "rir": "ARIN", "registryCountry": "US", "allocatedDate": "2022-05-09", "registryStatus": "allocated",
  "reverseDns": "10.208.1.34.bc.googleusercontent.com", "fcrdnsMatch": true,
  "cloudProvider": "Google Cloud", "cloudService": "Google Cloud", "cloudRegion": "africa-south1",
  "isTorExit": false, "infraType": "cloud"
}
```

#### Field notes

- `asCountry` is the country code the ASN dataset attaches to the AS; `registryCountry` comes from the RIR delegation of the address block. Neither is geolocation.
- `networkRange` is the contiguous routed range from the routing-table snapshot; adjacent prefixes with the same origin AS can be merged into one range. `bgpPrefix` is filled only when that range is exactly one CIDR block, otherwise it is `null` and you still have `networkRange`.
- `registryStatus` is `allocated`, `assigned`, `available` (unallocated space) or `reserved`.
- `infraType` rules (first match wins, shown in `notes` where an AS rule applies): `reserved` (private/loopback/multicast/documentation ranges, nothing else is looked up) > `tor-exit` (on the Tor bulk exit list) > `cdn` (Cloudflare/Fastly published ranges, or a known CDN AS such as 13335, 54113, 20940) > `cloud` (published AWS/Google/Oracle/DigitalOcean ranges, or a known cloud/hosting AS such as 16509, 8075, 14061) > `unrouted` (no BGP route found) > `other`. It is a hint, not a verdict: a residential-looking IP can still be a proxy.
- `fcrdnsMatch`: `true` when the PTR hostname resolves back to the same IP, `false` when it does not, `null` when there is no PTR.

### Data sources and licences

| Data | Source | Terms |
|---|---|---|
| IP to ASN, AS name, network range, AS country | iptoasn.com `ip2asn-combined.tsv.gz`, refreshed hourly | Public domain (PDDL v1.0). Exact text on https://iptoasn.com/: **"Licensed under Public Domain (PDDL v1.0)"**; the site's dataset metadata states `"license": "https://opendatacommons.org/licenses/pddl/1.0/"`. The PDDL summary at opendatacommons.org says: **"Recipients may use this work commercially ... It is not a requirement that recipients provide further users with a copy of this licence or attribute the original creator of the data or database as a source."** We credit it anyway. |
| Registry, registry country, allocation date, status | The five RIRs' `delegated-extended-latest` statistics files (RIPE NCC, ARIN, APNIC, LACNIC, AFRINIC), published through the NRO | The NRO describes the file as: **"a daily updated report of the distribution of Internet number resources ... to facilitate research and analysis"** and publishes it openly for download. We use the IP rows only (never contact data). |
| Cloud / CDN ranges | AWS `ip-ranges.json`, Google `cloud.json`, Oracle `public_ip_ranges.json`, Cloudflare `ips-v4`/`ips-v6`, Fastly `public-ip-list`, DigitalOcean `geo/google.csv` | Files the providers publish for exactly this purpose. AWS: **"AWS publishes its current IP address ranges in JSON format. With this information, you can identify traffic from AWS."** |
| Tor exit nodes | Tor Project `check.torproject.org/torbulkexitlist` | Published bulk exit list; its `robots.txt` allows all. |
| Reverse DNS | Standard DNS PTR lookups | n/a |

We do **not** use Team Cymru, WHOIS/RDAP contact data or any commercial geolocation database, and the output contains no personal contact information.

Large files are cached in a key-value store for 24 hours (Tor list: 30 minutes), so repeated and scheduled runs start fast and put almost no load on the sources. If a refresh fails, the previous copy is used and the run says so in the log. All downloads identify themselves as `DataCrate-Apify-Actor/1.0 (ip-network-intel)`.

### Limits and honesty

- The routing view is one snapshot of the public routing table: an IP that is not announced right now shows no ASN and `infraType: "unrouted"`.
- `isTorExit` reflects the current exit list, not whether a relay ever carried traffic.
- Cloud membership is by published range; other providers (for example Azure) are only recognised by their AS number rule, without service/region.
- IPv6 ranges longer than /64 are not indexed.
- Reverse DNS depends on the resolver and may time out for some hosts (shown in `notes`).

### Pricing

Pay per event: **$0.0015 per IP returned** ($1.50 per 1,000), no start fee. Memory: 512 MB is enough for the default settings.

### Use cases

Enrich firewall or web-server logs, triage abuse reports, flag cloud / hosting / Tor traffic in signup and fraud checks, map which networks and registries an IP list belongs to, annotate a list of IPs from a security export.

# Actor input Schema

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

IPv4 and/or IPv6 addresses to look up. Duplicates are removed. You can also paste raw text in 'Text containing IPs' instead.

## `ipsText` (type: `string`):

Optional. Paste any text (server logs, firewall output, a CSV column). The actor extracts every valid IPv4 and IPv6 address from it and looks each up once.

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

Look up the PTR hostname of each IP and check that the hostname resolves back to the same IP (fcrdnsMatch).

## `includeCloud` (type: `boolean`):

Match each IP against the published ranges of AWS, Google Cloud, Oracle Cloud, Cloudflare, Fastly and DigitalOcean (service and region).

## `includeTor` (type: `boolean`):

Flag IPs that are on the Tor Project's current bulk exit list.

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

Stop after this many unique IPs. You are charged per IP returned.

## Actor input object example

```json
{
  "ips": [
    "8.8.8.8",
    "1.1.1.1",
    "3.5.140.1",
    "34.1.208.10",
    "185.220.101.1",
    "2606:4700:4700::1111"
  ],
  "includeReverseDns": true,
  "includeCloud": true,
  "includeTor": true,
  "maxItems": 1000
}
```

# Actor output Schema

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

One row per unique IP address (default dataset items).

# 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",
        "3.5.140.1",
        "34.1.208.10",
        "185.220.101.1",
        "2606:4700:4700::1111"
    ],
    "maxItems": 1000
};

// Run the Actor and wait for it to finish
const run = await client.actor("datacrate/ip-network-intel").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",
        "3.5.140.1",
        "34.1.208.10",
        "185.220.101.1",
        "2606:4700:4700::1111",
    ],
    "maxItems": 1000,
}

# Run the Actor and wait for it to finish
run = client.actor("datacrate/ip-network-intel").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",
    "3.5.140.1",
    "34.1.208.10",
    "185.220.101.1",
    "2606:4700:4700::1111"
  ],
  "maxItems": 1000
}' |
apify call datacrate/ip-network-intel --silent --output-dataset

```

## MCP server setup

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

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/VjbYZXMUNuAAhnSaa/builds/yQJ0ic2YCegaURjSP/openapi.json
