# ASN and IP netblock scraper (`mangudai/asn-ip-netblock-scraper`) Actor

Find every ASN, IP range and abuse contact owned by a company, an IP address or a country. Returns the owning organisation, country, RIR, registration date, abuse email and phone, and all announced IPv4 and IPv6 prefixes. Public registry data, no login or API key.

- **URL**: https://apify.com/mangudai/asn-ip-netblock-scraper.md
- **Developed by:** [Mangudäi](https://apify.com/mangudai) (community)
- **Categories:** Developer tools, Lead generation, Open source
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.01 / 1,000 results

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## ASN and IP netblock scraper

Organisation, prefixes and abuse contacts for any network. Find every autonomous system and IP range a company owns. Give it a company name, an ASN, an IP address or a country code, and it returns the owning organisation, its country and postal address, the registry that allocated the number, the registration date, the abuse contact email and phone, and every IPv4 and IPv6 prefix the network announces.

All data comes from the public RIPEstat API and the public RIPE database. No login, no API key, no captcha.

### What you can do with it

- Map the full IP footprint of a company before a security assessment or a firewall allowlist.
- Build lists of ISPs, hosting providers and network operators in a country, with abuse contacts attached.
- Turn a log file of IP addresses into named organisations for fraud, bot and traffic analysis.
- Enrich a CRM or KYB record with the registry-level identity behind a network.
- Monitor when a competitor announces new prefixes or registers a new ASN.

### Search modes

| Search by | What you enter | What you get |
| --- | --- | --- |
| Company or organisation name | `cloudflare` | Every ASN whose registered name matches |
| ASN | `AS13335` or `13335` | That one autonomous system |
| IP address or CIDR prefix | `8.8.8.8`, `185.60.216.0/22` | The ASN announcing that address, plus the matched prefix |
| Country code | `DE`, `PT`, `IS` | Autonomous systems registered in that country, routed ones first |

### Input

```json
{
  "searchType": "orgName",
  "queries": ["cloudflare", "hetzner online"],
  "maxItems": 25,
  "includePrefixes": true,
  "maxPrefixesPerAsn": 50,
  "requestDelaySeconds": "0.35"
}
````

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `searchType` | string | `orgName` | `orgName`, `asn`, `ip` or `country` |
| `queries` | array | `["cloudflare", "hetzner online"]` | One value per line |
| `maxItems` | integer | `25` | Hard cap on the number of records |
| `includePrefixes` | boolean | `true` | Fetch announced prefixes. Turn off for faster runs |
| `maxPrefixesPerAsn` | integer | `50` | Cap on stored prefix lists. Counts stay complete |
| `requestDelaySeconds` | string | `0.35` | Polite delay between API calls |

### Output

One row per autonomous system.

```json
{
  "asn": "AS24940",
  "asnNumber": 24940,
  "holder": "HETZNER-AS Hetzner Online GmbH",
  "orgName": "Hetzner Online GmbH",
  "orgAddress": "Industriestrasse 25",
  "country": "DE",
  "registry": "RIPE",
  "registrationDate": "2002-06-03T08:29:26Z",
  "announced": true,
  "abuseEmail": "abuse@hetzner.com",
  "abusePhone": null,
  "techEmail": null,
  "ipv4PrefixCount": 89,
  "ipv6PrefixCount": 5,
  "totalIpv4Addresses": 3171328,
  "ipv4Prefixes": ["23.88.0.0/17", "94.130.0.0/16"],
  "ipv6Prefixes": ["2a01:4f8::/29"],
  "matchedPrefix": null,
  "allocationBlock": "Assigned by RIPE NCC",
  "queriedFor": "hetzner online",
  "ripeStatUrl": "https://stat.ripe.net/AS24940",
  "scrapedAt": "2026-07-20T01:33:28+00:00"
}
```

Export the dataset as JSON, CSV, Excel or XML, or read it straight from the Apify API.

### Notes

- `totalIpv4Addresses` counts every announced IPv4 address, even when the stored prefix list is capped.
- Abuse contacts resolve across all five regional registries. Some networks publish a web form instead of a mailbox, in which case the field is empty.
- Country and postal address come from the linked organisation object, so RIPE-region networks return richer detail than some legacy ARIN records.
- The scraper reads only public registry data and paces its requests. It never touches anything behind a login.

### Pricing

Pay per event. You are charged a small amount per run and per result, and platform usage is free.

# Actor input Schema

## `searchType` (type: `string`):

How the values below should be interpreted.

## `queries` (type: `array`):

One value per line, matching the search type above. Company names, ASNs, IP addresses or two-letter country codes.

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

Stop after this many autonomous system records.

## `includePrefixes` (type: `boolean`):

Fetch the IPv4 and IPv6 prefixes each network announces. Turn off for faster runs.

## `maxPrefixesPerAsn` (type: `integer`):

Prefix lists are capped at this length. Counts and totals still reflect every prefix.

## `requestDelaySeconds` (type: `string`):

Polite rate limit for the public RIPEstat API.

## Actor input object example

```json
{
  "searchType": "orgName",
  "queries": [
    "cloudflare",
    "hetzner online"
  ],
  "maxItems": 25,
  "includePrefixes": true,
  "maxPrefixesPerAsn": 50,
  "requestDelaySeconds": "0.35"
}
```

# Actor output Schema

## `results` (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 = {
    "queries": [
        "cloudflare",
        "hetzner online"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("mangudai/asn-ip-netblock-scraper").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 = { "queries": [
        "cloudflare",
        "hetzner online",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("mangudai/asn-ip-netblock-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "queries": [
    "cloudflare",
    "hetzner online"
  ]
}' |
apify call mangudai/asn-ip-netblock-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=mangudai/asn-ip-netblock-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "ASN and IP netblock scraper",
        "description": "Find every ASN, IP range and abuse contact owned by a company, an IP address or a country. Returns the owning organisation, country, RIR, registration date, abuse email and phone, and all announced IPv4 and IPv6 prefixes. Public registry data, no login or API key.",
        "version": "0.0",
        "x-build-id": "E7bNZtfpPgBCAS9KZ"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/mangudai~asn-ip-netblock-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-mangudai-asn-ip-netblock-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/mangudai~asn-ip-netblock-scraper/runs": {
            "post": {
                "operationId": "runs-sync-mangudai-asn-ip-netblock-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/mangudai~asn-ip-netblock-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-mangudai-asn-ip-netblock-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "queries"
                ],
                "properties": {
                    "searchType": {
                        "title": "Search by",
                        "enum": [
                            "orgName",
                            "asn",
                            "ip",
                            "country"
                        ],
                        "type": "string",
                        "description": "How the values below should be interpreted.",
                        "default": "orgName"
                    },
                    "queries": {
                        "title": "Queries",
                        "type": "array",
                        "description": "One value per line, matching the search type above. Company names, ASNs, IP addresses or two-letter country codes.",
                        "default": [
                            "cloudflare",
                            "hetzner online"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxItems": {
                        "title": "Max results",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Stop after this many autonomous system records.",
                        "default": 25
                    },
                    "includePrefixes": {
                        "title": "Include announced prefixes",
                        "type": "boolean",
                        "description": "Fetch the IPv4 and IPv6 prefixes each network announces. Turn off for faster runs.",
                        "default": true
                    },
                    "maxPrefixesPerAsn": {
                        "title": "Max prefixes stored per ASN",
                        "minimum": 1,
                        "maximum": 2000,
                        "type": "integer",
                        "description": "Prefix lists are capped at this length. Counts and totals still reflect every prefix.",
                        "default": 50
                    },
                    "requestDelaySeconds": {
                        "title": "Delay between requests (seconds)",
                        "type": "string",
                        "description": "Polite rate limit for the public RIPEstat API.",
                        "default": "0.35"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
