# Cloud Provider Ip Ranges Scraper (`kawsar/cloud-provider-ip-ranges-scraper`) Actor

Collect IPv4 and IPv6 cloud ranges by service and region from kawsar's scraper, filter by what you need, and export clean JSON, CSV, or Excel datasets for allowlists, security checks, or monitoring

- **URL**: https://apify.com/kawsar/cloud-provider-ip-ranges-scraper.md
- **Developed by:** [Kawsar](https://apify.com/kawsar) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Cloud Provider IP Ranges Scraper

![Cloud Provider IP Ranges Scraper cover](https://images.bigibyte.com/cdn-cgi/image/width=1260,height=540,fit=cover,format=webp/apify-actors-covers/cloud-provider-ip-ranges-scraper-cover.png)

Collect AWS cloud IP ranges by service and region using the publicly available Amazon Web Services IP ranges dataset. Retrieve IPv4 and IPv6 network prefixes, apply optional filters, and export structured records for firewall management, infrastructure research, and network monitoring.

### What It Does

This actor collects AWS IP range records and organizes each network prefix into an individual dataset entry. Records include the IP prefix, AWS region, service, and network border group. You can filter results by service and region to focus on specific cloud infrastructure.

### Key Features

- **IPv4 and IPv6 Ranges:** Collect network prefixes from the AWS IP ranges dataset.
- **Service Filtering:** Retrieve ranges associated with a specific AWS service.
- **Region Filtering:** Narrow results to a selected AWS region.
- **Structured Records:** Receive individual records for each collected network prefix.
- **Dataset Exports:** Export results in JSON, CSV, Excel, and other supported formats.
- **Scheduled Monitoring:** Run the actor regularly to track changes in published IP ranges.

### Mode

- **`aws`:** Collects AWS IPv4 and IPv6 prefixes, with optional service and region filters.

### Input Example

```json
{
  "mode": "aws",
  "service": "EC2",
  "region": "us-east-1",
  "maxItems": 5,
  "requestDelayMs": 1000
}
```

### Input Parameters

| Parameter | Type | Description |
|---|---|---|
| `mode` | String | Collection mode. Use `aws`. |
| `service` | String | Optional AWS service filter, such as `EC2`. |
| `region` | String | Optional AWS region filter, such as `us-east-1`. |
| `maxItems` | Integer | Maximum number of records to return. |
| `requestDelayMs` | Integer | Delay between requests in milliseconds. |

### Output Example

```json
{
  "ip_prefix": "3.4.12.4/32",
  "region": "eu-west-1",
  "service": "AMAZON",
  "network_border_group": "eu-west-1",
  "scrapedAt": "2026-10-26T00:00:00+00:00"
}
```

### Output Fields

| Field | Description |
|---|---|
| `ip_prefix` | IPv4 or IPv6 network prefix. |
| `region` | AWS region associated with the prefix. |
| `service` | AWS service associated with the prefix. |
| `network_border_group` | Network border group associated with the prefix. |
| `scrapedAt` | Timestamp when the record was collected. |

### Use Cases

- **Firewall Allowlists:** Collect AWS network ranges for firewall and access-control configurations.
- **Security Research:** Compare published AWS prefixes when investigating network traffic.
- **Infrastructure Monitoring:** Track changes in AWS IP range records over time.
- **Data Dashboards:** Build visualizations using structured IP range datasets.
- **Workflow Automation:** Integrate AWS prefix records into infrastructure management and network analysis workflows.

### Frequently Asked Questions

**What data does this actor collect?**

It collects AWS IPv4 and IPv6 network prefixes along with their associated service, region, and network border group.

**Can I collect ranges for a specific AWS service?**

Yes. Set the `service` parameter to a value such as `EC2` to filter the results.

**Can I filter by AWS region?**

Yes. Provide a region such as `us-east-1` using the `region` parameter.

**Does the actor support both IPv4 and IPv6?**

Yes. It collects both IPv4 and IPv6 prefixes available in the AWS dataset.

**What export formats are available?**

You can export results as JSON, CSV, Excel, and other formats supported by Apify.

**Can I schedule automatic updates?**

Yes. Configure Apify schedules to collect updated AWS IP range records regularly.

### Trademark Notice

Amazon Web Services (AWS) is a trademark of Amazon, Inc. or its affiliates. This independent actor uses the name only to identify the data source and does not imply affiliation, sponsorship, or endorsement.

### Is Web Scraping Legal?

This actor collects publicly accessible AWS network range information without bypassing login screens, paywalls, or technical security measures. These records describe cloud infrastructure, but their use should follow applicable laws and AWS policies.

- **Personal Data:** The dataset primarily contains technical network information and is not expected to contain personal information. Follow applicable privacy requirements if combining it with other data.
- **Copyright and Licensing:** Review AWS documentation and applicable terms before redistributing or incorporating collected information into other products.
- **Platform Terms and Request Policies:** Respect AWS policies, source conditions, and reasonable request practices.
- **Disclaimer:** This information is general guidance, not legal advice. Consult a qualified professional about your intended use.

For more information, read Apify's article: [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

# Actor input Schema

## `mode` (type: `string`):

What to scrape. AWS ranges reads the public AWS ip-ranges.json file and saves one row per IP prefix.

## `service` (type: `string`):

Optional service filter, for example EC2 or AMAZON. Leave empty to keep all services up to maxItems.

## `region` (type: `string`):

Optional region filter, for example us-east-1. Leave empty to keep all regions up to maxItems.

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

Stop after this many IP prefix rows. Hard max is 1000.

## `requestDelayMs` (type: `integer`):

Milliseconds to wait before each request. Raise if you see 429 responses.

## `userAgent` (type: `string`):

User-Agent header sent with each request.

## `timeoutSecs` (type: `integer`):

Overall run budget in seconds.

## `requestTimeoutSecs` (type: `integer`):

Per-request timeout in seconds.

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

Optional proxy. Leave off unless you need it. The AWS IP ranges file is public and usually works without a proxy.

## Actor input object example

```json
{
  "mode": "aws",
  "service": "EC2",
  "region": "us-east-1",
  "maxItems": 100,
  "requestDelayMs": 1000,
  "userAgent": "ActorResearch/1.0",
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Dataset rows in the overview table.

## `dataset` (type: `string`):

Full dataset for this run.

## `items` (type: `string`):

Dataset items as JSON.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("kawsar/cloud-provider-ip-ranges-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("kawsar/cloud-provider-ip-ranges-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 '{}' |
apify call kawsar/cloud-provider-ip-ranges-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kawsar/cloud-provider-ip-ranges-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/Ac4zQhwSO7KidpKpa/builds/HjjEqxUGqNPYNuhVI/openapi.json
