# PeeringDB Scraper (`parseforge/peeringdb-scraper`) Actor

Scrape Networks, Internet Exchanges (IX), and Facilities (FAC) from the PeeringDB public API. Includes ASN, peering policy, traffic, prefixes, locations, and metadata. No API key required.

- **URL**: https://apify.com/parseforge/peeringdb-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Developer tools, Business, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

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

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.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.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/platform/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

![ParseForge Banner](https://github.com/ParseForge/apify-assets/raw/main/banner.jpg)

## 🌐 PeeringDB Scraper

> 🚀 **Export the global Internet peering registry in seconds.** Pull **networks (ASNs), Internet Exchanges (IXes), and Facilities (FACs)** with ASN, peering policy, traffic class, prefix counts, contact info, and geo data. No API key, no signup.

> 🕒 **Last updated:** 2026-05-13 · **📊 25+ fields** per record · **🌐 50,000+ networks** · **🛰️ 1,000+ IXes** · **🏢 5,000+ facilities** · **🌍 240+ countries**

The **PeeringDB Scraper** queries the PeeringDB public REST API and returns clean structured records for the three core entity types in the Internet routing ecosystem: **Networks (`net`)**, **Internet Exchanges (`ix`)**, and **Facilities (`fac`)**. Each entity carries up to **25+ fields**, including the canonical ID, name and aliases, ASN (for networks), IPv4 and IPv6 prefix counts, traffic class, IPv6 support, peering policy and contracts, location (city, country, continent), media (Ethernet, ATM), site-level counts (net_count, ix_count, fac_count), and contact information (tech, sales, policy emails and phones).

PeeringDB is the open, community-maintained directory used by network engineers worldwide to coordinate peering, plan interconnects, and discover ISPs, content networks, and colocation facilities. This Actor mirrors the same API used by the official PeeringDB web UI, with server-side filtering by country and name substring, and automatic pagination across thousands of records.

| 🎯 Target Audience | 💡 Primary Use Cases |
|---|---|
| Network engineers, peering coordinators, ISPs, CDN operators, hosting and cloud providers, IXPs, OSINT investigators, journalists | Peering target discovery, ASN lookups, IX participant lists, facility selection, network research, OSINT enrichment, supply-chain mapping |

---

### 📋 What the PeeringDB Scraper does

Three entity modes plus filters in a single run:

- 🌐 **Networks (`net`).** Every ASN registered in PeeringDB with peering policy, traffic class, prefix counts, IRR set, and contact info.
- 🛰️ **Internet Exchanges (`ix`).** Every IX with city, country, media (Ethernet, ATM), unicast/multicast/IPv6 support, participant count, and service tier.
- 🏢 **Facilities (`fac`).** Every colocation facility with operator, address, lat/lon, CLLI, NPA-NXX, voltage services, and counts of networks, IXes, and carriers on site.
- 🌍 **Country and name filters.** Restrict to one ISO country code (US, DE, NL, JP) and / or a name substring.

Each record includes a deep link back to the PeeringDB profile and the underlying create/update timestamps, so you always know how fresh the upstream entry is.

> 💡 **Why it matters:** PeeringDB is the source of truth for inter-network routing relationships. Network engineers use it to find peering partners, ops teams use it to map upstream and downstream dependencies, and OSINT analysts use it to trace ASN ownership and infrastructure footprints. This Actor turns the live registry into a queryable, exportable dataset.

---

### 🎬 Full Demo

_🚧 Coming soon: a 3-minute walkthrough from signup to a downloaded PeeringDB dataset._

---

### ⚙️ Input

<table>
<thead>
<tr><th>Input</th><th>Type</th><th>Default</th><th>Behavior</th></tr>
</thead>
<tbody>
<tr><td><code>maxItems</code></td><td>integer</td><td><code>10</code></td><td>Records to return. Free plan caps at 10, paid plan at 1,000,000.</td></tr>
<tr><td><code>entity</code></td><td>string</td><td><code>"net"</code></td><td>One of <code>net</code> (Networks), <code>ix</code> (Internet Exchanges), <code>fac</code> (Facilities).</td></tr>
<tr><td><code>country</code></td><td>string</td><td><code>""</code></td><td>ISO 3166-1 alpha-2 country code. Applies to <code>ix</code> and <code>fac</code>. Empty = worldwide.</td></tr>
<tr><td><code>name</code></td><td>string</td><td><code>""</code></td><td>Case-insensitive substring filter on the <code>name</code> field. Empty = no filter.</td></tr>
</tbody>
</table>

**Example: 100 largest content networks worldwide.**

```json
{
    "maxItems": 100,
    "entity": "net",
    "name": ""
}
````

**Example: every Internet Exchange in Germany.**

```json
{
    "maxItems": 200,
    "entity": "ix",
    "country": "DE"
}
```

> ⚠️ **Good to Know:** the PeeringDB API uses 250-record pages. This Actor handles pagination automatically and respects 429 and 503 backoff. Country filtering applies natively for `ix` and `fac` but not for `net`, since network ASNs are global by definition (use the `info_scope` field to filter network reach downstream).

***

### 📊 Output

Each record contains the union of fields relevant to its entity type. Null and empty fields are dropped, so a Facility row carries different keys than a Network row. Download the dataset as CSV, Excel, JSON, or XML.

#### 🧾 Schema (Networks)

| Field | Type | Example |
|---|---|---|
| 🆔 `id` | number | `2` |
| 🟢 `entity` | string | `"net"` |
| 🏢 `name` | string | `"Akamai Technologies"` |
| 🧾 `aka` | string | null | `"Formerly known as nLayer Communications"` |
| 🔢 `asn` | number | `20940` |
| 🔗 `website` | string | null | `"https://www.akamai.com/"` |
| 🪪 `irr_as_set` | string | null | `"AS-AKAMAI"` |
| 🏷️ `info_type` | string | null | `"Content"` |
| 🏷️ `info_types` | string\[] | null | `["Content"]` |
| 4️⃣ `info_prefixes4` | number | null | `12000` |
| 6️⃣ `info_prefixes6` | number | null | `5000` |
| 📊 `info_traffic` | string | null | `"100+Tbps"` |
| ⚖️ `info_ratio` | string | null | `"Heavy Outbound"` |
| 🌍 `info_scope` | string | null | `"Global"` |
| 📡 `info_unicast` | boolean | `true` |
| 📺 `info_multicast` | boolean | `false` |
| 6️⃣ `info_ipv6` | boolean | `true` |
| 📜 `policy_general` | string | `"Open"` |
| 📍 `policy_locations` | string | `"Not Required"` |
| ⚖️ `policy_ratio` | boolean | `false` |
| 📄 `policy_contracts` | string | `"Not Required"` |
| 🔗 `url` | string | `"https://www.peeringdb.com/net/2"` |
| 🟢 `status` | string | `"ok"` |
| 🗓️ `created` | ISO 8601 | `"2004-07-28T00:00:00Z"` |
| 🗓️ `updated` | ISO 8601 | `"2026-04-17T02:41:50Z"` |
| 🕒 `scrapedAt` | ISO 8601 | `"2026-05-13T22:25:00.795Z"` |

For `ix` records you also get `city`, `country`, `region_continent`, `media`, `proto_unicast/multicast/ipv6`, `tech_email/phone`, `policy_email/phone`, `sales_email/phone`, `net_count`, `fac_count`, and `service_level`. For `fac` records you get `org_id`, `org_name`, `clli`, `npanxx`, `address1/2`, `zipcode`, `latitude`, `longitude`, plus the same operator and tech contact fields.

#### 📦 Sample records

<details>
<summary><strong>🌐 Content network: Akamai Technologies (AS20940)</strong></summary>

```json
{
    "id": 2,
    "entity": "net",
    "name": "Akamai Technologies",
    "asn": 20940,
    "website": "https://www.akamai.com/",
    "irr_as_set": "AS-AKAMAI",
    "info_type": "Content",
    "info_types": ["Content"],
    "info_prefixes4": 12000,
    "info_prefixes6": 5000,
    "info_traffic": "100+Tbps",
    "info_ratio": "Heavy Outbound",
    "info_scope": "Global",
    "info_unicast": true,
    "info_multicast": false,
    "info_ipv6": true,
    "policy_general": "Open",
    "policy_locations": "Not Required",
    "policy_ratio": false,
    "policy_contracts": "Not Required",
    "url": "https://www.peeringdb.com/net/2",
    "status": "ok",
    "created": "2004-07-28T00:00:00Z",
    "updated": "2026-04-17T02:41:50Z",
    "scrapedAt": "2026-05-13T22:25:00.795Z"
}
```

</details>

<details>
<summary><strong>🌐 Tier-1 carrier: GTT Communications (AS4436)</strong></summary>

```json
{
    "id": 1,
    "entity": "net",
    "name": "GTT Communications (AS4436)",
    "aka": "Formerly known as nLayer Communications",
    "asn": 4436,
    "website": "http://www.gtt.net",
    "info_type": "NSP",
    "info_types": ["NSP"],
    "info_prefixes4": 200000,
    "info_prefixes6": 10000,
    "info_scope": "Global",
    "info_unicast": true,
    "info_multicast": false,
    "info_ipv6": true,
    "policy_url": "http://www.gtt.net/peering/",
    "policy_general": "Restrictive",
    "policy_locations": "Required - International",
    "policy_ratio": true,
    "policy_contracts": "Required",
    "url": "https://www.peeringdb.com/net/1",
    "status": "ok",
    "created": "2004-07-28T00:00:00Z",
    "updated": "2022-07-27T05:33:22Z",
    "scrapedAt": "2026-05-13T22:25:00.794Z"
}
```

</details>

<details>
<summary><strong>🌐 European ISP: Swisscom (AS3303)</strong></summary>

```json
{
    "id": 5,
    "entity": "net",
    "name": "Swisscom",
    "aka": "IP-Plus",
    "asn": 3303,
    "website": "http://www.swisscom.com",
    "route_server": "telnet://route-server.ip-plus.net",
    "irr_as_set": "RIPE::AS3303:AS-SWCMGLOBAL",
    "url": "https://www.peeringdb.com/net/5",
    "status": "ok"
}
```

</details>

***

### ✨ Why choose this Actor

| | Capability |
|---|---|
| 🌐 | **Three entity modes in one Actor.** Networks, Internet Exchanges, and Facilities, with consistent schema patterns. |
| 🔢 | **ASN and ISP enrichment.** Peering policy, IRR set, prefix counts, traffic class, and IPv6 readiness in one record. |
| 🛰️ | **IX participant intelligence.** Member counts, facility ties, supported protocols, and contact info per exchange. |
| 🏢 | **Facility detail.** CLLI, NPA-NXX, lat/lon, address, and on-site network and carrier counts. |
| 🌍 | **Country + name filters.** Native PeeringDB filters applied server-side. |
| 📄 | **Auto-paginated.** Handles 250-record pages and 429/503 backoff under the hood. |
| 🚫 | **No authentication.** Anonymous PeeringDB read endpoints. No API key, no login. |
| 🔁 | **Always fresh.** Every run pulls the latest registry state. |

> 📊 PeeringDB is the operational backbone reference for the inter-network routing community.

***

### 📈 How it compares to alternatives

| Approach | Cost | Coverage | Refresh | Filters | Setup |
|---|---|---|---|---|---|
| **⭐ PeeringDB Scraper** *(this Actor)* | $5 free credit, then pay-per-use | **Networks + IXes + Facilities** | **Live per run** | entity, country, name | ⚡ 2 min |
| Raw PeeringDB REST API | Free | Same, but you maintain pagination + filters | On-demand | Build your own | 🛠️ Days |
| RIR whois data | Free | ASN-level only, sparse | RIR cycles | None | 🐢 Brittle |
| Manual page scraping | Free | Fragile | Variable | None | 🐢 Brittle |

Pick this Actor when you want a ready-to-use, structured PeeringDB dataset with zero pagination or rate-limit handling.

***

### 🚀 How to use

1. 📝 **Sign up.** [Create a free account with $5 credit](https://console.apify.com/sign-up?fpr=vmoqkp) (takes 2 minutes).
2. 🌐 **Open the Actor.** Go to the PeeringDB Scraper page on the Apify Store.
3. 🎯 **Set input.** Pick an entity (`net`, `ix`, or `fac`), an optional country, a name substring, and `maxItems`.
4. 🚀 **Run it.** Click **Start** and let the Actor pull live records from PeeringDB.
5. 📥 **Download.** Grab your results from the **Dataset** tab as CSV, Excel, JSON, or XML.

> ⏱️ Total time from signup to a downloaded dataset: **3-5 minutes.** No coding required.

***

### 💼 Business use cases

<table>
<tr>
<td width="50%" valign="top">

#### 🌐 Network Engineering

- Peering target discovery by traffic class and policy
- IX selection by country, participant count, and media
- Facility shortlists by city and on-site network count
- ASN-level due diligence before BGP peering sessions

</td>
<td width="50%" valign="top">

#### 🏢 Sales & Business Development

- Lead lists of ISPs, CDNs, and hosting providers
- Targeted outreach to network operators in specific cities
- Account research on Tier-1 carriers and content networks
- Channel mapping for telecom and colocation partners

</td>
</tr>
<tr>
<td width="50%" valign="top">

#### 🕵️ OSINT & Investigations

- ASN ownership and operator history
- Infrastructure footprint mapping by org
- Cross-reference for routing-leak investigations
- Journalism on undersea cable and IX dependencies

</td>
<td width="50%" valign="top">

#### 📊 Research & Policy

- IPv6 adoption studies across regions
- Peering-ecosystem health metrics
- Internet topology and concentration analysis
- Reproducible datasets for academic papers

</td>
</tr>
</table>

***

### 🔌 Automating PeeringDB Scraper

Control the scraper programmatically for scheduled runs and pipeline integrations:

- 🟢 **Node.js.** Install the `apify-client` NPM package.
- 🐍 **Python.** Use the `apify-client` PyPI package.
- 📚 See the [Apify API documentation](https://docs.apify.com/api/v2) for full details.

The [Apify Schedules feature](https://docs.apify.com/platform/schedules) lets you trigger this Actor on any cron interval. Daily pulls keep peering-target lists fresh, weekly pulls capture changes in IX membership and facility counts.

***

### 🌟 Beyond business use cases

PeeringDB data fuels more than commercial workflows.

<table>
<tr>
<td width="50%">

#### 🎓 Research and academia

- Internet topology analyses for academic papers
- Geospatial mapping of colocation hubs
- IPv6 readiness studies by region or operator
- Reproducible coursework on inter-domain routing

</td>
<td width="50%">

#### 🎨 Personal and creative

- Hobbyist BGP and ASN dashboards
- Side projects mapping ISPs in a region
- Visualizations of peering ecosystems
- Content pieces about how the Internet connects

</td>
</tr>
<tr>
<td width="50%">

#### 🤝 Non-profit and civic

- Civic infrastructure maps for community networks
- Journalism on routing transparency and outages
- Open-data feeds for digital-rights orgs
- Reference data for community ISPs (CommunityIX)

</td>
<td width="50%">

#### 🧪 Experimentation

- Train ML classifiers on operator type and traffic class
- Prototype agent pipelines that resolve ASN to org
- Test routing-policy analyzers with real records
- Validate hypotheses on IX vs facility growth

</td>
</tr>
</table>

***

### 🤖 Ask an AI assistant about this scraper

Open a ready-to-send prompt about this ParseForge actor in the AI of your choice:

- 💬 [**ChatGPT**](https://chat.openai.com/?q=How%20do%20I%20use%20the%20PeeringDB%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🧠 [**Claude**](https://claude.ai/new?q=How%20do%20I%20use%20the%20PeeringDB%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🔍 [**Perplexity**](https://perplexity.ai/search?q=How%20do%20I%20use%20the%20PeeringDB%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🅒 [**Copilot**](https://copilot.microsoft.com/?q=How%20do%20I%20use%20the%20PeeringDB%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)

***

### ❓ Frequently Asked Questions

#### 🧩 How does it work?

The Actor calls the public PeeringDB REST API (`/api/{net|ix|fac}`) with your country and name filters, paginates 250 records at a time, retries 429 and 503 responses with exponential backoff, and writes one clean record per entity to the dataset.

#### 🔁 How often is the data refreshed?

Every run pulls live records from PeeringDB. The registry itself is community-maintained and updates continuously as operators add and edit entries, so a freshly triggered run reflects the latest state.

#### 🌐 What are `net`, `ix`, and `fac`?

`net` is a **network** (ASN), e.g. an ISP, CDN, or content network. `ix` is an **Internet Exchange**, the shared fabric where networks peer. `fac` is a **facility**, the physical colocation building where networks and IXes are present. Pick one entity per run.

#### 🔢 Can I look up a specific ASN?

This Actor returns lists. To pull a specific ASN, set `entity: "net"` and use the `name` filter (PeeringDB indexes ASNs in names like `(AS4436)`), or run with no filter and grep the dataset on `asn` downstream.

#### 🌍 Can I filter networks by country?

PeeringDB does not expose a native country filter on the `net` endpoint, because networks are global by ASN. Use the `info_scope` field to filter by reach downstream, or filter `ix`/`fac` by country to find networks present in a specific region.

#### 🔐 Do I need an API key?

No. PeeringDB's read API is anonymous for unauthenticated access at standard quotas. No login, no API key required.

#### ⏰ Can I schedule regular runs?

Yes. Use Apify Schedules to trigger this Actor on any cron cadence. Daily pulls keep peering-target lists fresh, weekly pulls capture growth in IX membership.

#### ⚖️ Is this data legal to use?

PeeringDB publishes the registry under a permissive license intended specifically for operational and research use. Review the PeeringDB terms for any redistribution, but raw lookup and analytics use cases are well within scope.

#### 💼 Can I use this data commercially?

Yes. PeeringDB data is broadly used in commercial network operations, peering coordination, and sales workflows. Confirm your downstream license obligations for any redistribution.

#### 💳 Do I need a paid Apify plan to use this Actor?

No. The free Apify plan is enough for testing and small runs (10 records per run). A paid plan lifts that limit and unlocks scheduling, higher concurrency, and larger datasets.

#### 🔁 What happens if a run fails or gets interrupted?

Apify automatically retries transient errors. The Actor also retries 429 and 503 responses internally with exponential backoff. Partial datasets from failed runs are preserved, so you never lose progress.

#### 🛬 What if I need related entities like POCs or netixlan?

This Actor returns the three top-level entities (net, ix, fac). For points-of-contact, netixlan (network-to-IX records), and netfac (network-to-facility records), reach out via the contact form for a companion scraper.

#### 🆘 What if I need help?

Our support team is here to help. Contact us through the Apify platform or use the Tally form linked below.

***

### 🔌 Integrate with any app

PeeringDB Scraper connects to any cloud service via [Apify integrations](https://apify.com/integrations):

- [**Make**](https://docs.apify.com/platform/integrations/make) - Automate multi-step workflows
- [**Zapier**](https://docs.apify.com/platform/integrations/zapier) - Connect with 5,000+ apps
- [**Slack**](https://docs.apify.com/platform/integrations/slack) - Get run notifications in your channels
- [**Airbyte**](https://docs.apify.com/platform/integrations/airbyte) - Pipe network data into your warehouse
- [**GitHub**](https://docs.apify.com/platform/integrations/github) - Trigger runs from commits and releases
- [**Google Drive**](https://docs.apify.com/platform/integrations/drive) - Export datasets straight to Sheets

You can also use webhooks to trigger downstream actions when a run finishes. Push fresh peering targets into your CRM, or alert your team in Slack on new IX listings.

***

### 🔗 Recommended Actors

- [**📡 RIPEstat Scraper**](https://apify.com/parseforge/ripestat-scraper) - IP, ASN, prefix and routing data from the RIPE NCC
- [**✈️ OurAirports Scraper**](https://apify.com/parseforge/ourairports-scraper) - Global airport reference dataset
- [**🤖 Hugging Face Model Scraper**](https://apify.com/parseforge/hugging-face-model-scraper) - Open-source AI model directory
- [**🏢 AWS Marketplace Scraper**](https://apify.com/parseforge/aws-marketplace-scraper) - Cloud software listings and pricing
- [**🔌 Stripe App Marketplace Scraper**](https://apify.com/parseforge/stripe-marketplace-scraper) - Fintech app directory metadata

> 💡 **Pro Tip:** browse the complete [ParseForge collection](https://apify.com/parseforge) for more reference-data scrapers.

***

**🆘 Need Help?** [**Open our contact form**](https://tally.so/r/BzdKgA) to request a new scraper, propose a custom data project, or report an issue.

***

> **⚠️ Disclaimer:** this Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by PeeringDB or its operators. All trademarks mentioned are the property of their respective owners. Only publicly available registry data is collected.

# Actor input Schema

## `entity` (type: `string`):

Which PeeringDB entity to scrape.

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

Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000

## `country` (type: `string`):

Filter by country code (e.g. US, DE, NL). Applies to ix and fac entities. Leave empty for all.

## `name` (type: `string`):

Case-insensitive substring filter on name. Leave empty for no filter.

## Actor input object example

```json
{
  "entity": "net",
  "maxItems": 10,
  "country": "",
  "name": ""
}
```

# Actor output Schema

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

Overview of scraped data

## `fullData` (type: `string`):

Complete dataset

# 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 = {
    "entity": "net",
    "maxItems": 10,
    "country": "",
    "name": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/peeringdb-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 = {
    "entity": "net",
    "maxItems": 10,
    "country": "",
    "name": "",
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/peeringdb-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 '{
  "entity": "net",
  "maxItems": 10,
  "country": "",
  "name": ""
}' |
apify call parseforge/peeringdb-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "PeeringDB Scraper",
        "description": "Scrape Networks, Internet Exchanges (IX), and Facilities (FAC) from the PeeringDB public API. Includes ASN, peering policy, traffic, prefixes, locations, and metadata. No API key required.",
        "version": "0.0",
        "x-build-id": "2lnhIUmTejf3QX5x1"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/parseforge~peeringdb-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-parseforge-peeringdb-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/parseforge~peeringdb-scraper/runs": {
            "post": {
                "operationId": "runs-sync-parseforge-peeringdb-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/parseforge~peeringdb-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-parseforge-peeringdb-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",
                "properties": {
                    "entity": {
                        "title": "Entity Type",
                        "enum": [
                            "net",
                            "ix",
                            "fac"
                        ],
                        "type": "string",
                        "description": "Which PeeringDB entity to scrape.",
                        "default": "net"
                    },
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "maximum": 1000000,
                        "type": "integer",
                        "description": "Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000"
                    },
                    "country": {
                        "title": "Country Filter (ISO-3166 alpha-2)",
                        "type": "string",
                        "description": "Filter by country code (e.g. US, DE, NL). Applies to ix and fac entities. Leave empty for all.",
                        "default": ""
                    },
                    "name": {
                        "title": "Name substring filter",
                        "type": "string",
                        "description": "Case-insensitive substring filter on name. Leave empty for no filter.",
                        "default": ""
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
