# RIPEstat Data Scraper (`parseforge/ripestat-scraper`) Actor

Query the RIPEstat public Data API for any ASN or IP prefix. Supports nine data calls including as-overview, whois, routing-history, ris-prefixes, prefix-overview, geoloc, asn-neighbours, network-info, and bgplay. No API key required.

- **URL**: https://apify.com/parseforge/ripestat-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 $26.25 / 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)

## 📡 RIPEstat Data Scraper

> 🚀 **Query the RIPEstat public Data API in seconds.** Pull **9 data calls** including AS overview, whois, prefix overview, geolocation, ASN neighbours, routing history, RIS prefixes, network info, and BGPlay. Batch query a list of resources or auto-discover every ASN in a country. No API key, no signup.

> 🕒 **Last updated:** 2026-05-13 · **📊 9 data calls** · **🌐 Any ASN or IP prefix** · **🌍 Country-level ASN discovery** · **📡 RIPE NCC official source**

The **RIPEstat Scraper** wraps the [RIPEstat Data API](https://stat.ripe.net/docs/data_api), the canonical public interface to RIPE NCC's routing and registry data. The Actor supports nine widely-used data calls and three input modes: single resource, multi-resource batch, and country-wide auto-discovery. For each resource you submit, the Actor writes one envelope record containing the raw RIPE response, the status, the queried resource string, and the data-call name.

RIPEstat aggregates data from RIPE's registry, RIS route collectors, geolocation providers, and the wider RIR community. It is the standard tool for network engineers, security researchers, and policy analysts who need authoritative information about how an ASN, prefix, or IP behaves on the global Internet.

| 🎯 Target Audience | 💡 Primary Use Cases |
|---|---|
| Network engineers, BGP operators, security researchers, OSINT analysts, abuse desks, journalists, academics | ASN due diligence, routing-history forensics, hijack detection, geo enrichment, country-scale ISP inventories, BGPlay replays, prefix announcement audits |

---

### 📋 What the RIPEstat Scraper does

Nine data calls, three input modes, in one Actor:

- 📡 **9 data calls.** `as-overview`, `whois`, `network-info`, `prefix-overview`, `geoloc`, `asn-neighbours`, `routing-history`, `ris-prefixes`, `bgplay`.
- 🎯 **Single resource.** Hit one ASN (e.g. `AS3333`) or IP prefix (e.g. `193.0.0.0/21`).
- 📦 **Batch mode.** Pass a list of ASNs or prefixes via the `resources` array. Each entry becomes one row.
- 🌍 **Country discovery.** Set `countryCode` to a two-letter ISO code (NL, DE, US, JP) and the Actor pre-queries the `country-resource-list` data call, expands every allocated ASN range, and runs your chosen data call across the entire allocation. Honors `maxItems`.

Each output row carries the original `resource` and `dataCall` for traceability, the upstream `status`, the full RIPE `data` object, any non-empty `messages` from the upstream API, and a `queriedAt` timestamp.

> 💡 **Why it matters:** RIPEstat is the authoritative public source for inter-domain routing data. A single API call can confirm whether a prefix is announced, who its origin ASN is, which neighbours it peers with, and how that picture has changed over time. The country-discovery mode is unique to this Actor and lets you sweep an entire national ASN allocation in one run.

---

### 🎬 Full Demo

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

---

### ⚙️ Input

<table>
<thead>
<tr><th>Input</th><th>Type</th><th>Default</th><th>Behavior</th></tr>
</thead>
<tbody>
<tr><td><code>dataCall</code></td><td>string</td><td><code>"as-overview"</code></td><td>One of the 9 supported RIPEstat data calls. Required.</td></tr>
<tr><td><code>resource</code></td><td>string</td><td><code>"AS3333"</code></td><td>Single ASN or prefix. Ignored if <code>resources</code> or <code>countryCode</code> is set.</td></tr>
<tr><td><code>resources</code></td><td>string[]</td><td><code>[]</code></td><td>Batch list of ASNs or prefixes. Each entry returns one row.</td></tr>
<tr><td><code>countryCode</code></td><td>string</td><td><code>""</code></td><td>Two-letter ISO country code. Auto-discovers every ASN allocated to the country via <code>country-resource-list</code> and runs the chosen data call across the allocation.</td></tr>
<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>
</tbody>
</table>

**Example: single ASN overview.**

```json
{
    "dataCall": "as-overview",
    "resource": "AS3333"
}
````

**Example: batch routing-history pull.**

```json
{
    "dataCall": "routing-history",
    "resources": ["AS15169", "AS32934", "AS8075"],
    "maxItems": 3
}
```

**Example: AS-overview sweep across every ASN in the Netherlands.**

```json
{
    "dataCall": "as-overview",
    "countryCode": "NL",
    "maxItems": 500
}
```

> ⚠️ **Good to Know:** the Actor queries up to 5 resources in parallel and respects RIPEstat backoff. Country sweeps over large allocations (e.g. `US` has tens of thousands of ASNs) should be paired with a sensible `maxItems` cap. RIPEstat's data is updated continuously, so re-running the same query on a different day can produce different answers (especially for `routing-history` and `bgplay`).

***

### 📊 Output

Each record contains the upstream RIPE response under `data`, plus the metadata fields. The exact shape of `data` depends on the data call you chose. Download the dataset as CSV, Excel, JSON, or XML.

#### 🧾 Schema

| Field | Type | Example |
|---|---|---|
| 🆔 `resource` | string | `"AS1101"` |
| 📡 `dataCall` | string | `"as-overview"` |
| 🟢 `status` | string | null | `"ok"` |
| 📦 `data` | object | `{"holder": "IP-EEND-AS SURF B.V.", "announced": true, ...}` |
| 💬 `messages` | array | (omitted) | `[]` |
| 🕒 `queriedAt` | ISO 8601 | `"2026-05-13T22:25:00.857Z"` |
| ❌ `error` | string | (omitted) | `"HTTP 404: Not Found"` (only on per-resource failure) |

#### 📦 Sample records

<details>
<summary><strong>📡 AS Overview: AS1101 (SURF, Dutch academic network)</strong></summary>

```json
{
    "resource": "AS1101",
    "dataCall": "as-overview",
    "status": "ok",
    "data": {
        "type": "as",
        "resource": "1101",
        "block": {
            "resource": "1-1876",
            "desc": "Assigned by ARIN",
            "name": "IANA 16-bit Autonomous System (AS) Numbers Registry"
        },
        "holder": "IP-EEND-AS SURF B.V.",
        "announced": true,
        "query_starttime": "2026-05-13T16:00:00",
        "query_endtime": "2026-05-13T16:00:00"
    },
    "queriedAt": "2026-05-13T22:25:00.857Z"
}
```

</details>

<details>
<summary><strong>📡 AS Overview: AS1104 (Nikhef physics research)</strong></summary>

```json
{
    "resource": "AS1104",
    "dataCall": "as-overview",
    "status": "ok",
    "data": {
        "type": "as",
        "resource": "1104",
        "block": {
            "resource": "1-1876",
            "desc": "Assigned by ARIN",
            "name": "IANA 16-bit Autonomous System (AS) Numbers Registry"
        },
        "holder": "Nikhef Stichting Nederlandse Wetenschappelijk Onderzoek Instituten",
        "announced": true,
        "query_starttime": "2026-05-13T16:00:00",
        "query_endtime": "2026-05-13T16:00:00"
    },
    "queriedAt": "2026-05-13T22:25:00.857Z"
}
```

</details>

<details>
<summary><strong>📡 AS Overview: AS1105 (SURFnet L3VPN, unannounced)</strong></summary>

```json
{
    "resource": "AS1105",
    "dataCall": "as-overview",
    "status": "ok",
    "data": {
        "type": "as",
        "resource": "1105",
        "block": {
            "resource": "1-1876",
            "desc": "Assigned by ARIN",
            "name": "IANA 16-bit Autonomous System (AS) Numbers Registry"
        },
        "holder": "SURFNET-L3VPN-AS SURF B.V.",
        "announced": false,
        "query_starttime": "2026-05-13T16:00:00",
        "query_endtime": "2026-05-13T16:00:00"
    },
    "queriedAt": "2026-05-13T22:25:00.857Z"
}
```

</details>

***

### ✨ Why choose this Actor

| | Capability |
|---|---|
| 📡 | **9 RIPEstat data calls.** AS overview, whois, network info, prefix overview, geolocation, ASN neighbours, routing history, RIS prefixes, BGPlay. |
| 🎯 | **Three input modes.** Single resource, batch list, or country-wide auto-discovery. |
| 🌍 | **Country sweep mode.** Set `countryCode: "NL"` to query every ASN in the Dutch allocation in one run. |
| 🧠 | **ASN range expansion.** RIPE returns allocations as ranges like `1234-1240`. The Actor expands ranges into individual ASNs automatically. |
| 🚀 | **5-way parallelism.** Resources are queried in chunks of 5 with backoff and per-resource error isolation. |
| 🚫 | **No authentication.** RIPEstat is fully public. No API key, no login. |
| 🔁 | **Always fresh.** Every run hits live RIPEstat endpoints. |

> 📊 RIPEstat is the standard reference for the inter-domain routing community.

***

### 📈 How it compares to alternatives

| Approach | Cost | Coverage | Refresh | Filters | Setup |
|---|---|---|---|---|---|
| **⭐ RIPEstat Scraper** *(this Actor)* | $5 free credit, then pay-per-use | **9 data calls, ASN/prefix/country** | **Live per run** | single / batch / country | ⚡ 2 min |
| Raw RIPEstat API | Free | Same, but you maintain throttling + range expansion | On-demand | Build your own | 🛠️ Days |
| Public looking glasses | Free | Operator-specific, often human-only | On-demand | None | 🐢 Slow |
| RIR whois | Free | Registry only, no routing data | RIR cycles | None | 🐢 Brittle |

Pick this Actor when you want one-shot access to RIPEstat with batch and country sweeps already wired up.

***

### 🚀 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 RIPEstat Data Scraper page on the Apify Store.
3. 🎯 **Set input.** Pick a data call, then a single `resource`, a `resources` array, or a `countryCode`. Set `maxItems`.
4. 🚀 **Run it.** Click **Start** and let the Actor pull live data from RIPEstat.
5. 📥 **Download.** Grab your results from the **Dataset** tab as CSV, Excel, JSON, or XML.

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

***

### 💼 Business use cases

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

#### 🌐 Network Operations

- AS overview lookups for peering due diligence
- Prefix announcement audits across a fleet
- ASN neighbour discovery before turning up a session
- RIS prefixes pulls to compare against your own RIB

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

#### 🔒 Security & Abuse

- Routing-history forensics on suspected hijacks
- Geo enrichment for IP-based abuse reports
- Whois lookups for incident response packets
- BGPlay-style timelines for postmortems

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

#### 🕵️ OSINT & Threat Intel

- ASN ownership mapping by country
- Bulk enrichment of IOC feeds with origin AS
- Network info on suspicious infrastructure
- Country-wide sweeps of ISP allocations

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

#### 📊 Research & Policy

- Internet topology and concentration studies
- Country-level routing footprint comparisons
- IPv6 adoption metrics by region
- Reproducible academic datasets with `queriedAt`

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

***

### 🔌 Automating RIPEstat 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 routing-history pulls keep change feeds fresh, hourly geo and whois lookups support live SOC pipelines.

***

### 🌟 Beyond business use cases

RIPEstat data fuels more than commercial workflows.

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

#### 🎓 Research and academia

- BGP-dynamics studies on routing-history feeds
- IPv6 adoption metrics across allocations
- Coursework on inter-domain routing
- Reproducible papers with versioned RIPEstat pulls

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

#### 🎨 Personal and creative

- Hobbyist BGP and ASN dashboards
- Personal projects mapping ISPs in a country
- Visualizations of ASN relationships
- Content pieces about how routes propagate

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

#### 🤝 Non-profit and civic

- Community-network inventories
- Journalism on routing leaks and outages
- Open-data feeds for digital-rights orgs
- Routing transparency for civic-tech projects

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

#### 🧪 Experimentation

- Train ML classifiers on AS holder names
- Prototype hijack-detection agents
- Test geo-IP pipelines against RIPE `geoloc`
- Validate inter-domain visualization tools

</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%20RIPEstat%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%20RIPEstat%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%20RIPEstat%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%20RIPEstat%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 wraps RIPEstat's `data.json` endpoints. You pick a data call, supply one or more resources (or a country code), and the Actor queries RIPEstat in batches of 5 in parallel, retries 429 and 503 responses, and writes one envelope row per resource with the full upstream `data` object.

#### 📡 Which data calls are supported?

Nine: `as-overview`, `whois`, `network-info`, `prefix-overview`, `geoloc`, `asn-neighbours`, `routing-history`, `ris-prefixes`, and `bgplay`. Each returns a different shape under the `data` field. See the RIPEstat documentation for field-level details.

#### 🌍 How does country mode work?

When you set `countryCode`, the Actor first queries `country-resource-list` to fetch every ASN allocated to that country. RIPEstat returns these as a mix of single ASNs and ranges (e.g. `12345-12350`). The Actor expands ranges into individual ASNs, then runs your chosen data call against each one, capped at `maxItems`. This is unique to the ParseForge Actor.

#### 📦 What is batch mode?

If you pass `resources` as an array, the Actor treats it as a batch list and queries the data call once per entry. Each entry becomes a row in the dataset. Useful for IOC enrichment, fleet audits, or any pre-computed list of ASNs or prefixes.

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

Every run hits RIPEstat live. Some data calls (like `as-overview` or `whois`) are slow-moving, while others (`routing-history`, `bgplay`, `ris-prefixes`) update continuously as RIS collectors observe the global routing table.

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

No. RIPEstat is fully public and anonymous. No login, no API key.

#### ⏰ Can I schedule regular runs?

Yes. Use Apify Schedules to trigger this Actor on any cron cadence. Daily pulls keep change feeds fresh, hourly geo lookups support live SOC pipelines.

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

RIPEstat publishes RIPE NCC data under open terms intended for operational and research use. Review the RIPE NCC terms for any redistribution.

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

Yes. RIPEstat data is widely used in commercial security, networking, and threat-intelligence products. Confirm your downstream license obligations.

#### 💳 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 isolates per-resource failures, so one bad input does not break the whole run. Partial datasets from failed runs are preserved.

#### 🛬 What if I need a data call that is not supported?

The RIPEstat Data API has dozens of data calls. Reach out via the contact form to request support for additional ones.

#### 🆘 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

RIPEstat 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 routing 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 AS-overview rows into your SOC, or alert your team in Slack on routing changes.

***

### 🔗 Recommended Actors

- [**🌐 PeeringDB Scraper**](https://apify.com/parseforge/peeringdb-scraper) - Networks, IXes, and facilities from the global peering registry
- [**✈️ 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 the RIPE NCC or RIPEstat. All trademarks mentioned are the property of their respective owners. Only publicly available RIPEstat data is queried.

# Actor input Schema

## `dataCall` (type: `string`):

RIPEstat data call to query.

## `resource` (type: `string`):

One ASN (e.g. AS3333 or 3333) or IP prefix (e.g. 193.0.0.0/21). Ignored if `resources` or `countryCode` is set.

## `resources` (type: `array`):

Batch-query a list of ASNs/prefixes. Each entry returns one row.

## `countryCode` (type: `string`):

Two-letter ISO country code (e.g. NL, DE, US). Auto-discovers every ASN allocated to that country via country-resource-list and runs the data call for each. Honors maxItems.

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

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

## Actor input object example

```json
{
  "dataCall": "as-overview",
  "resource": "AS3333",
  "resources": [],
  "countryCode": "",
  "maxItems": 10
}
```

# 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 = {
    "dataCall": "as-overview",
    "resource": "AS3333",
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/ripestat-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 = {
    "dataCall": "as-overview",
    "resource": "AS3333",
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/ripestat-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 '{
  "dataCall": "as-overview",
  "resource": "AS3333",
  "maxItems": 10
}' |
apify call parseforge/ripestat-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "RIPEstat Data Scraper",
        "description": "Query the RIPEstat public Data API for any ASN or IP prefix. Supports nine data calls including as-overview, whois, routing-history, ris-prefixes, prefix-overview, geoloc, asn-neighbours, network-info, and bgplay. No API key required.",
        "version": "0.0",
        "x-build-id": "52vh8LyJhoWbMj5Sc"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/parseforge~ripestat-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-parseforge-ripestat-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~ripestat-scraper/runs": {
            "post": {
                "operationId": "runs-sync-parseforge-ripestat-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~ripestat-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-parseforge-ripestat-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": [
                    "dataCall"
                ],
                "properties": {
                    "dataCall": {
                        "title": "Data Call",
                        "enum": [
                            "as-overview",
                            "whois",
                            "network-info",
                            "prefix-overview",
                            "geoloc",
                            "asn-neighbours",
                            "routing-history",
                            "ris-prefixes",
                            "bgplay"
                        ],
                        "type": "string",
                        "description": "RIPEstat data call to query.",
                        "default": "as-overview"
                    },
                    "resource": {
                        "title": "Single resource (ASN or prefix)",
                        "type": "string",
                        "description": "One ASN (e.g. AS3333 or 3333) or IP prefix (e.g. 193.0.0.0/21). Ignored if `resources` or `countryCode` is set."
                    },
                    "resources": {
                        "title": "Multiple resources (batch mode)",
                        "type": "array",
                        "description": "Batch-query a list of ASNs/prefixes. Each entry returns one row.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "countryCode": {
                        "title": "Country code (auto-discover ASNs)",
                        "type": "string",
                        "description": "Two-letter ISO country code (e.g. NL, DE, US). Auto-discovers every ASN allocated to that country via country-resource-list and runs the data call for each. Honors maxItems.",
                        "default": ""
                    },
                    "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"
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
