# BGP.HE.NET Recon Scraper (`rl1987/bgphenet-scraper`) Actor

Scrapes ASN, prefix, IP, and DNS recon data (whois, RDAP, BGP peers/prefixes, routing visibility, PTR records) from bgp.he.net.

- **URL**: https://apify.com/rl1987/bgphenet-scraper.md
- **Developed by:** [R.L.](https://apify.com/rl1987) (community)
- **Categories:** Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 result items

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

### What does BGP.HE.NET Recon Scraper do?

**BGP.HE.NET Recon Scraper** extracts BGP and network recon data from [bgp.he.net](https://bgp.he.net) — Hurricane Electric's free BGP Toolkit — for any mix of **ASNs**, **IP prefixes**, **IP addresses**, or **domain names** in a single run. It auto-detects the target type per input string and returns whois/RDAP records, BGP peer and prefix tables, live routing visibility, reverse-DNS/PTR data, and DNS records, all as clean structured JSON. Just enter your targets and let the Actor handle proxy rotation, retries, and pagination on Apify's infrastructure — no need to write your own scraper or babysit browser sessions.

### Why use BGP.HE.NET Recon Scraper?

- **Network reconnaissance** — map an organization's ASN, announced/originated prefixes, upstream and peer ASNs, and RPKI/IRR validation status in one pass.
- **Threat intel & attack surface mapping** — pull reverse-DNS hostnames sharing an IP, prefix delegations, and BGP routing visibility for security research and OSINT.
- **Infrastructure audits** — verify which AS announces your prefixes, whether routes are RPKI-valid, and how widely a prefix is visible across BGP collectors.
- **Bulk lookups on autopilot** — schedule recurring runs, feed the dataset into other tools via the Apify API, or trigger it from Zapier/Make integrations.

### How to use BGP.HE.NET Recon Scraper

1. Open the Actor's **Input** tab.
2. Add one or more **Targets** — any mix of ASNs (`AS15169` or `15169`), IPv4/IPv6 prefixes (`8.8.8.0/24`), IP addresses (`8.8.8.8`), or domain names (`google.com`).
3. Optionally toggle whois/RDAP lookups, BGP routing visibility, and adjust the record caps.
4. Click **Start** and download the results from the **Dataset** tab in JSON, CSV, Excel, or HTML.

### Input

| Field | Type | Description |
|---|---|---|
| `targets` | array of strings | ASN, prefix, IP, or domain. Type is auto-detected per entry. |
| `includeWhois` | boolean | Fetch raw whois text and RDAP JSON (default `true`). |
| `includeRouting` | boolean | For prefix targets, fetch live BGP visibility and observed AS-paths (default `true`). |
| `maxRoutingRecords` | integer | Cap on visibility/AS-path entries kept per prefix (default `300`). |
| `maxHostnamesPerIp` | integer | Cap on reverse-DNS hostnames kept per IP — bgp.he.net often lists hundreds of unrelated domains sharing an IP (default `50`). |
| `proxyConfiguration` | object | Optional Apify Proxy configuration. |

See the Input tab for the full schema.

### Output

Each target produces one dataset item shaped by its detected type. Example for an ASN target:

```json
{
  "targetType": "asn",
  "asn": "15169",
  "orgName": "Google LLC",
  "stats": {
    "prefixes_originated_all": 1417,
    "bgp_peers_observed_all": 701,
    "average_as_path_length_all": 3.652
  },
  "links": {
    "Company Website": { "text": "https://about.google/intl/en/", "href": "https://about.google/intl/en/" },
    "Country of Origin": { "text": "United States", "href": "/country/US" }
  },
  "peersV4": [{ "rank": "1", "name": "TATA COMMUNICATIONS (AMERICA) INC", "asn": "AS6453" }],
  "prefixesV4": [{ "prefix": "8.8.4.0/24", "org": "Google LLC", "irrValid": true, "rpkiValid": true }],
  "inputTarget": "AS15169"
}
```

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

### Data table

| Target type | Key fields |
|---|---|
| ASN | `orgName`, `stats` (prefix/peer/RPKI counters), `links`, `peersV4`/`peersV6`, `prefixesV4`/`prefixesV6`, `whois`, `rdap` |
| Prefix | `announcedBy`, `matchingDelegations`, `ptrRecords`, `rirInfo`, `bgpVisibility`, `bgpAsPaths`, `whois`, `rdap` |
| IP | `announcedBy`, `ptr`, `hostnames`, `whois` |
| Domain | `dnsRecords` (NS/A/AAAA/MX/TXT/SOA), `prefixMappings` |

### Pricing / Cost estimation

This Actor makes lightweight HTTP requests (no browser) — each target typically costs a handful of requests. It runs comfortably on the free Apify plan for moderate target lists; larger batches (hundreds of ASNs with routing data enabled) will use proportionally more compute units.

### Tips or Advanced options

- Turn off `includeRouting` if you only need static prefix/whois data — it skips the live BGP visibility and AS-path lookups, which are the slowest calls.
- Lower `maxHostnamesPerIp` for busy shared-hosting IPs to keep dataset items small; bgp.he.net caps this list at 1000 entries per IP regardless.
- Mix target types freely in one `targets` list — an ASN, its prefixes, and specific IPs can all be scraped in the same run.

### FAQ, disclaimers, and support

This Actor only reads publicly available pages on bgp.he.net and does not require authentication. Some tabs on bgp.he.net (whois text, RADB/IRR lookups, cert transparency search, traceroute) are loaded client-side via separate AJAX calls; this Actor reproduces the ones relevant to recon (whois, RDAP, BGP visibility, AS-paths) but does not cover cert search, RBL, or traceroute tooling. Please respect bgp.he.net's terms of use and avoid excessive request volumes. Found a bug or need a custom variant? Open an issue on the Actor's Issues tab.

### Cyber recon toolkit

Part of the **Cyber recon toolkit** — OSINT, attack-surface recon, and vulnerability-intel data collection for security research:

- [Bugcrowd Scraper](https://apify.com/rl1987/bugcrowd-scraper) — Scrapes public Bugcrowd data: disclosed submissions, program directory, leaderboard.
- [HackerOne Scraper](https://apify.com/rl1987/hackerone-scraper) — Scrapes public HackerOne data: Hacktivity disclosed reports, program directory, researcher leaderboard.
- [Intigriti Scraper](https://apify.com/rl1987/intigriti-scraper) — Scrapes public Intigriti data: bug bounty/VDP program directory, researcher leaderboard and profiles.
- [CVE Scraper](https://apify.com/rl1987/cve-scraper) — CVE.org vulnerability info scraper.
- [TLSX - TLS Data Gathering and Analysis](https://apify.com/rl1987/pd-tlsx) — Fast, configurable TLS grabber for TLS-based data collection and analysis.
- [gau - Get All URLs](https://apify.com/rl1987/gau-wrapper) — Fetch known URLs from Wayback Machine, Common Crawl, AlienVault OTX, and URLScan.
- [Git Email Extractor](https://apify.com/rl1987/git-email-extractor) — Shallow-clones git repos and extracts contributor emails from commit history.
- [Wappalyzer Technology Lookup](https://apify.com/rl1987/wappalyzer-tech-lookup) — Detect the technology stack behind any website using Wappalyzer.
- [Meta Tags Scraper](https://apify.com/rl1987/meta-tags-scraper) — Web page metadata scraper (meta tags, Open Graph, Twitter Card).
- [Universal Contact Extractor](https://apify.com/rl1987/universal-contact-extractor) — Extract phone numbers, emails and social media URLs from web pages.
- [Web Text Extractor](https://apify.com/rl1987/web-text-extractor) — Extract clean text or Markdown content from web pages.

### Did you find this useful?

⭐ Rate this actor on Apify! Your feedback helps other users find it and helps us keep improving it.

# Actor input Schema

## `targets` (type: `array`):

ASN (e.g. AS15169 or 15169), IPv4/IPv6 prefix (e.g. 8.8.8.0/24), IP address (e.g. 8.8.8.8), or domain name (e.g. google.com). Target type is auto-detected.

## `includeWhois` (type: `boolean`):

Fetch raw whois text and RDAP JSON for ASN, prefix, and IP targets (one extra request per target per record type).

## `includeRouting` (type: `boolean`):

For prefix targets, fetch live BGP visibility (which collectors/peers see the route) and observed AS-paths.

## `maxRoutingRecords` (type: `integer`):

Cap on how many visibility/AS-path entries to keep per prefix target, to avoid huge dataset items.

## `maxHostnamesPerIp` (type: `integer`):

Cap on how many reverse-DNS hostname matches to keep per IP target. bgp.he.net often lists hundreds of unrelated (often spammy) domains that merely point an A record at a shared IP.

## `proxyConfiguration` (type: `object`):

Optional proxy configuration. bgp.he.net is not aggressively bot-protected, so this can usually stay off.

## Actor input object example

```json
{
  "targets": [
    "AS15169",
    "8.8.8.0/24",
    "8.8.8.8",
    "google.com"
  ],
  "includeWhois": true,
  "includeRouting": true,
  "maxRoutingRecords": 300,
  "maxHostnamesPerIp": 50,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (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 = {
    "targets": [
        "AS15169",
        "8.8.8.0/24",
        "8.8.8.8",
        "google.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("rl1987/bgphenet-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 = { "targets": [
        "AS15169",
        "8.8.8.0/24",
        "8.8.8.8",
        "google.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("rl1987/bgphenet-scraper").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 '{
  "targets": [
    "AS15169",
    "8.8.8.0/24",
    "8.8.8.8",
    "google.com"
  ]
}' |
apify call rl1987/bgphenet-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rl1987/bgphenet-scraper"
        }
    }
}

```

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/BDzladYVodsPQiRVa/builds/WWxldDxXXjWzEqCgZ/openapi.json
