# CIDR IP Range Calculator (`automation-lab/cidr-ip-range-calculator`) Actor

Calculate network address, broadcast, first/last usable IP, total hosts, subnet mask, wildcard mask, and binary representation from CIDR notation. Supports IPv4 and IPv6. Pure math — no proxy.

- **URL**: https://apify.com/automation-lab/cidr-ip-range-calculator.md
- **Developed by:** [Stas Persiianenko](https://apify.com/automation-lab) (community)
- **Categories:** Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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

## CIDR IP Range Calculator

Calculate network addresses, broadcast IPs, usable host ranges, subnet masks, wildcard masks, and binary representations from **CIDR notation** in bulk. Supports both **IPv4 and IPv6**. Pure math — no proxy required, results are instant.

Try it at [apify.com/automation-lab/cidr-ip-range-calculator](https://apify.com/automation-lab/cidr-ip-range-calculator).

### What does CIDR IP Range Calculator do?

The CIDR IP Range Calculator takes one or more CIDR blocks (e.g., `192.168.1.0/24`, `10.0.0.0/8`) and returns a complete network breakdown for each one. For every CIDR block you provide, the actor calculates:

- **Network address** and **broadcast address**
- **First and last usable IP** addresses
- **Total hosts** and **usable host count**
- **Subnet mask** and **wildcard mask**
- **IP class** (A, B, C, D multicast, E reserved)
- **Private/public, loopback, link-local, multicast** flags
- **Binary representation** of IP and subnet mask (dot-notation)
- **Subnet breakdown** — split any block into two equal subnets one prefix smaller

It works for both **IPv4** (prefix /0 to /32) and **IPv6** (prefix /0 to /128), including special cases like /31 (point-to-point RFC 3021) and /32 (host routes).

### Who is CIDR IP Range Calculator for?

#### 🖧 Network engineers and sysadmins
You need to design IP addressing schemes quickly and accurately. Use this actor to bulk-validate CIDR ranges before deploying VPCs, firewall rules, or BGP announcements — without opening Excel or memorizing subnet math.

- Plan multiple subnets in one API call
- Verify broadcast addresses and usable ranges before provisioning
- Document network layouts with auto-generated subnet breakdowns

#### ☁️ Cloud infrastructure and DevOps teams
AWS, GCP, and Azure all use CIDR notation for VPC subnets, security groups, and routing tables. This actor speeds up your IaC planning:

- Validate CIDR blocks before feeding them into Terraform or CloudFormation templates
- Check whether ranges overlap by comparing network/broadcast addresses
- Generate documentation for network topology reviews

#### 🔐 Security analysts and penetration testers
When scoping engagements or writing firewall rules, you need precise IP range boundaries:

- Confirm exact host counts and boundaries for scan scopes
- Verify wildcard masks for ACLs and firewall rules
- Check whether given IPs fall in private, link-local, or loopback ranges

#### 👩‍💻 Developers and students learning networking
Understand subnetting visually with binary representations:

- See how subnet masks divide the address space in binary dot-notation
- Batch-calculate multiple examples to practice CIDR subnetting
- Integrate into learning tools or networking curriculum apps

#### 🤖 Automation and data pipeline builders
Use the Apify API or MCP to integrate CIDR calculations into your workflows:

- Enrich IP address datasets with network context
- Validate CIDR inputs in web forms or configuration validators
- Feed results into monitoring dashboards or IP management (IPAM) systems

### Why use CIDR IP Range Calculator?

- ✅ **No proxy, no scraping** — pure math, instant results, zero blocked requests
- ✅ **Bulk processing** — calculate dozens of CIDR blocks in a single run
- ✅ **IPv4 and IPv6** — full support for both address families, including special cases
- ✅ **Binary representations** — see the subnet mask and network address in binary dot-notation
- ✅ **Subnet splitting** — auto-generate one-level subnet breakdowns
- ✅ **API-ready output** — structured JSON you can pipe directly into other tools
- ✅ **Edge cases handled** — /31 (point-to-point), /32 (host), /0 (default route), invalid inputs return clear error messages
- ✅ **No API key, no account** — runs on Apify with pay-per-event pricing, $5 free credit included

### What data can you extract?

Each CIDR block returns a structured JSON object with the following fields:

| Field | Type | Description |
|---|---|---|
| `cidr` | string | Normalized CIDR notation (network address + prefix) |
| `ipVersion` | string | `"IPv4"` or `"IPv6"` |
| `isValid` | boolean | Whether the CIDR block was valid and parseable |
| `networkAddress` | string | Network address of the block |
| `broadcastAddress` | string | Broadcast address (last IP in block) |
| `firstUsableIp` | string | First host-assignable IP address |
| `lastUsableIp` | string | Last host-assignable IP address |
| `totalHosts` | number/string | Total number of IP addresses in the block |
| `usableHosts` | number/string | Host-assignable IPs (totalHosts minus network and broadcast) |
| `subnetMask` | string | Dotted-decimal subnet mask (IPv4) or IPv6 equivalent |
| `wildcardMask` | string | Inverse of subnet mask, used in ACLs and Cisco config |
| `prefixLength` | number | CIDR prefix (e.g., `24` for `/24`) |
| `ipClass` | string | Class A/B/C/D/E for IPv4; `"IPv6 (classless)"` for IPv6 |
| `isPrivate` | boolean | True if the range is RFC 1918 (IPv4) or RFC 4193 (IPv6) private space |
| `isLoopback` | boolean | True if loopback range (127.0.0.0/8 or ::1/128) |
| `isLinkLocal` | boolean | True if link-local range (169.254.0.0/16 or fe80::/10) |
| `isMulticast` | boolean | True if multicast range (224.0.0.0/4 or ff00::/8) |
| `ipBinary` | string | Binary dot-notation of the network address (optional) |
| `subnetMaskBinary` | string | Binary dot-notation of the subnet mask (optional) |
| `subnets` | array | Two equal child subnets one prefix smaller (optional) |
| `error` | string | Error message if CIDR was invalid, null otherwise |

### How much does it cost to calculate CIDR ranges?

This actor uses **pay-per-event pricing** — you pay only for what you calculate. No monthly subscription. All platform costs are **included**.

| | Free | Starter ($29/mo) | Scale ($199/mo) | Business ($999/mo) |
|---|---|---|---|---|
| **Per CIDR block** | $0.00115 | $0.001 | $0.00078 | $0.0006 |
| **1,000 blocks** | $1.15 | $1.00 | $0.78 | $0.60 |

Plus a one-time start fee of **$0.005** per run.

Higher-tier plans get additional volume discounts (Platinum and Diamond tiers available for enterprise).

**Real-world cost examples:**

| Input | Results | Duration | Cost (Free tier) |
|---|---|---|---|
| 3 CIDR blocks (default input) | 3 | ~1s | ~$0.008 |
| 50 CIDR blocks | 50 | ~2s | ~$0.063 |
| 500 CIDR blocks | 500 | ~5s | ~$0.580 |

**On the free plan ($5 credit):** You can calculate ~4,300 CIDR blocks before spending your credits.

### How to calculate CIDR IP ranges

1. Go to [apify.com/automation-lab/cidr-ip-range-calculator](https://apify.com/automation-lab/cidr-ip-range-calculator)
2. Click **Try for free** — no credit card required, $5 free credits included
3. Enter your CIDR blocks in the **CIDR Blocks** input field (one per line)
4. Optionally enable **subnet breakdown** or toggle **binary representation**
5. Click **Start** and wait ~1-5 seconds for results
6. Download results as **JSON, CSV, or Excel** from the **Results** tab

You can also trigger runs via the **Apify API** or **MCP** (see sections below).

**Input examples:**

Standard /24 with binary:
```json
{
    "cidrs": ["192.168.1.0/24"],
    "includeBinaryRepresentation": true
}
````

Multiple blocks with subnet split:

```json
{
    "cidrs": ["10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"],
    "includeSubnets": true,
    "includeBinaryRepresentation": false
}
```

Mixed IPv4 and IPv6:

```json
{
    "cidrs": ["192.168.1.0/24", "2001:db8::/32", "fe80::/10", "::1/128"],
    "includeBinaryRepresentation": true
}
```

### Input parameters

| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `cidrs` | array of strings | ✅ Yes | — | CIDR blocks to calculate. IPv4: `"192.168.1.0/24"`. IPv6: `"2001:db8::/32"`. Duplicates are removed automatically. |
| `includeSubnets` | boolean | No | `false` | When `true`, outputs a two-entry subnet breakdown — splits the block into two equal child subnets one prefix length smaller. |
| `includeBinaryRepresentation` | boolean | No | `true` | When `true`, includes binary dot-notation of the network address and subnet mask. Useful for learning or documentation. |

### Output examples

**IPv4 /24 block:**

```json
{
    "cidr": "192.168.1.0/24",
    "ipVersion": "IPv4",
    "isValid": true,
    "networkAddress": "192.168.1.0",
    "broadcastAddress": "192.168.1.255",
    "firstUsableIp": "192.168.1.1",
    "lastUsableIp": "192.168.1.254",
    "totalHosts": 256,
    "usableHosts": 254,
    "prefixLength": 24,
    "subnetMask": "255.255.255.0",
    "wildcardMask": "0.0.0.255",
    "ipClass": "C",
    "isPrivate": true,
    "isLoopback": false,
    "isLinkLocal": false,
    "isMulticast": false,
    "ipBinary": "11000000.10101000.00000001.00000000",
    "subnetMaskBinary": "11111111.11111111.11111111.00000000",
    "subnets": null,
    "error": null
}
```

**IPv6 /32 block:**

```json
{
    "cidr": "2001:db8::/32",
    "ipVersion": "IPv6",
    "isValid": true,
    "networkAddress": "2001:db8::",
    "broadcastAddress": "2001:db8:ffff:ffff:ffff:ffff:ffff:ffff",
    "firstUsableIp": "2001:db8::1",
    "lastUsableIp": "2001:db8:ffff:ffff:ffff:ffff:ffff:fffe",
    "totalHosts": "2^96",
    "usableHosts": "2^96 - 2",
    "prefixLength": 32,
    "subnetMask": "ffff:ffff::",
    "wildcardMask": "::ffff:ffff:ffff:ffff:ffff:ffff",
    "ipClass": "IPv6 (classless)",
    "isPrivate": false,
    "isLoopback": false,
    "isLinkLocal": false,
    "isMulticast": false,
    "error": null
}
```

**Invalid CIDR block:**

```json
{
    "cidr": "256.256.256.256/24",
    "ipVersion": null,
    "isValid": false,
    "networkAddress": null,
    "error": "Error: Invalid IPv4 octet: 256"
}
```

### Tips for best results

- 🔢 **Batch your requests** — pass all CIDR blocks in a single run. The actor processes them sequentially in under 1ms each, so 500 blocks takes ~2 seconds total.
- 🌐 **Mixed IPv4 and IPv6 in one run** — the actor auto-detects IP version per block. You can mix both families in one `cidrs` array.
- 📊 **Export to CSV for Excel** — use the Results tab to download as CSV and open directly in Excel or Google Sheets. Each field becomes a column.
- ⚠️ **Invalid CIDRs don't stop processing** — if one block is invalid, it's recorded with `isValid: false` and an `error` message, but the rest of the run continues.
- 🔗 **Host routes** (`/32` for IPv4, `/128` for IPv6) return the host IP as both `firstUsableIp` and `lastUsableIp`.
- 🔗 **Point-to-point links** (`/31` IPv4, `/127` IPv6) follow RFC 3021 / RFC 6164 — both addresses are listed as usable.
- 💰 **Keep start fees low** — for cost-sensitive automations, batch all CIDR blocks in one run rather than making separate runs, since each run has a $0.005 start fee.

### Integrations

#### CIDR Calculator → Google Sheets (network documentation)

Run the actor on your VPC CIDR blocks, download results as CSV, and import into Google Sheets. Use it as a live IP addressing table for infrastructure documentation. Schedule weekly runs to catch any new allocations.

#### CIDR Calculator → Terraform / CloudFormation validation

Pipe the actor's JSON output into a validation script before `terraform apply`. Verify that:

- No two subnets overlap (compare network/broadcast ranges)
- All blocks are in private RFC 1918 space (`isPrivate: true`)
- Host counts match your capacity planning

#### CIDR Calculator → Zapier / Make workflow

Trigger on a new row in a Google Sheet containing CIDR blocks, run the actor via the Apify API, and write results back to the sheet. Automates documentation for network change management tickets.

#### CIDR Calculator → Security audit pipeline

Feed the actor a list of customer-submitted CIDR scopes, flag any that are public (not `isPrivate`), loopback, or multicast, and alert via Slack before an engagement begins.

#### Scheduled subnet planning runs

Use Apify's cron scheduler to run the actor nightly against your IP address management (IPAM) export. Compare results to detect unauthorized subnet changes or allocations.

### Using the Apify API

Run the actor programmatically from any language using the Apify API.

#### Node.js

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const run = await client.actor('automation-lab/cidr-ip-range-calculator').call({
    cidrs: ['192.168.1.0/24', '10.0.0.0/8', '2001:db8::/32'],
    includeSubnets: true,
    includeBinaryRepresentation: true,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient(token='YOUR_APIFY_TOKEN')

run = client.actor('automation-lab/cidr-ip-range-calculator').call(run_input={
    'cidrs': ['192.168.1.0/24', '10.0.0.0/8', '2001:db8::/32'],
    'includeSubnets': True,
    'includeBinaryRepresentation': True,
})

for item in client.dataset(run['defaultDatasetId']).iterate_items():
    print(item['networkAddress'], '-', item['broadcastAddress'])
```

#### cURL

```bash
## Start the run
curl -X POST "https://api.apify.com/v2/acts/automation-lab~cidr-ip-range-calculator/runs?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "cidrs": ["192.168.1.0/24", "10.0.0.0/8"],
    "includeBinaryRepresentation": true
  }'

## Get results (replace RUN_ID and DATASET_ID from the response above)
curl "https://api.apify.com/v2/datasets/DATASET_ID/items?token=YOUR_APIFY_TOKEN&format=json"
```

### Use with AI agents via MCP

CIDR IP Range Calculator is available as a tool for AI assistants that support the [Model Context Protocol (MCP)](https://docs.apify.com/platform/integrations/mcp).

Add the Apify MCP server to your AI client — this gives you access to all Apify actors, including this one:

#### Setup for Claude Code

```bash
claude mcp add --transport http apify "https://mcp.apify.com"
```

#### Setup for Claude Desktop, Cursor, or VS Code

Add this to your MCP config file:

```json
{
    "mcpServers": {
        "apify": {
            "url": "https://mcp.apify.com"
        }
    }
}
```

Your AI assistant will use OAuth to authenticate with your Apify account on first use.

#### Example prompts

Once connected, try asking your AI assistant:

- "Use automation-lab/cidr-ip-range-calculator to calculate the network details for 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 — I want broadcast addresses and usable host counts"
- "Calculate the CIDR breakdown for our VPC subnets: 10.0.1.0/24, 10.0.2.0/24, 10.0.3.0/24 — include subnet splits so I can see /25 subnets"
- "Check if 2001:db8::/32, fe80::/10, and ::1/128 are private, loopback, or link-local ranges"

Learn more in the [Apify MCP documentation](https://docs.apify.com/platform/integrations/mcp).

### Is it legal to use CIDR IP Range Calculator?

Yes. This actor performs **pure mathematical calculations** on IP addresses and CIDR notation. It does not scrape any website, make network requests to third parties, or access any external data source. It processes only the input you provide.

No website terms of service apply. No robots.txt is relevant. No personal data is collected or processed — IP network addresses are infrastructure identifiers, not personal information under GDPR or CCPA.

### FAQ

**How fast is the actor?**
Each CIDR calculation takes under 1ms of compute. A batch of 100 CIDR blocks completes in under 2 seconds total, including actor startup. The actor is designed for bulk processing — send as many blocks as you need in one run.

**How much does it cost to calculate 1,000 CIDR blocks?**
On the free plan: 1,000 × $0.00115 + $0.005 start = ~$1.155. On Starter ($29/mo): ~$1.005. You get $5 free credits on signup, which covers ~4,300 CIDR blocks at free tier prices.

**Can I use this offline or as a library instead?**
The Apify actor version gives you API access, scheduling, export formats, and MCP integration. If you need an offline tool, there are npm packages like `ip-cidr` and `netmask` for Node.js. The actor is built on pure JS math — no third-party network packages used.

**Why does a /31 block show 2 usable hosts instead of 0?**
/31 blocks follow [RFC 3021](https://datatracker.ietf.org/doc/html/rfc3021), which allows point-to-point links to use both addresses (no network/broadcast reservation). Similarly, /127 IPv6 follows RFC 6164. If you need the traditional calculation (usable = 0 for /31), filter on `prefixLength < 31` in your results.

**Why does totalHosts show `"2^96"` for some IPv6 blocks?**
JavaScript's `number` type loses precision above 2^53. For very large IPv6 blocks (prefix /75 and smaller), the total host count exceeds safe integer range and is returned as a string like `"2^96"` to preserve accuracy. Use BigInt in your application if you need arithmetic on these values.

**Why are some fields null?**
Invalid CIDR blocks (bad syntax, out-of-range octets, missing prefix) return `isValid: false` with all calculated fields as `null` and a descriptive `error` message. Valid blocks never return null for core fields.

**The binary representation looks odd for IPv6 — is that correct?**
IPv6 binary is returned as 128-bit binary grouped into 16-bit chunks separated by dots (e.g., `0010000000000001.0000110110111000...`). This is non-standard notation for visual inspection — standard IPv6 binary has no separators. The grouping makes it easier to see which bits belong to the network vs host portion.

### Other network and IP tools

Explore more automation-lab network utilities:

- [DNS Lookup](https://apify.com/automation-lab/dns-lookup) — bulk DNS record lookup (A, AAAA, MX, TXT, NS, CNAME, SOA)
- [IP Geolocation](https://apify.com/automation-lab/ip-geolocation) — geolocate IP addresses to country, city, ASN, and ISP
- [IP Address Validator](https://apify.com/automation-lab/ip-address-validator) — validate and classify IP addresses (IPv4/IPv6, private, public, loopback)
- [WHOIS Lookup](https://apify.com/automation-lab/whois-lookup) — query WHOIS records for domains and IP ranges
- [SSL Certificate Checker](https://apify.com/automation-lab/ssl-certificate-checker) — verify SSL certificate validity, expiry, and chain
- [HTTP Status Checker](https://apify.com/automation-lab/http-status-checker) — bulk HTTP status code and redirect chain checker
- [Subdomain Finder](https://apify.com/automation-lab/subdomain-finder) — enumerate subdomains for a given domain
- [SPF Record Checker](https://apify.com/automation-lab/spf-record-checker) — validate SPF DNS records for email deliverability

# Actor input Schema

## `cidrs` (type: `array`):

Enter one or more CIDR blocks to calculate. IPv4 examples: '192.168.1.0/24', '10.0.0.0/8'. IPv6 examples: '2001:db8::/32', 'fe80::/10'. Each block gets a full breakdown of network/broadcast/usable IPs.

## `includeSubnets` (type: `boolean`):

When enabled, outputs a breakdown of possible subnets one size smaller (e.g. for a /24, shows two /25 subnets). Useful for network planning.

## `includeBinaryRepresentation` (type: `boolean`):

When enabled, outputs the binary dot-notation representation of the IP address and subnet mask. Useful for learning or subnet mask validation.

## Actor input object example

```json
{
  "cidrs": [
    "192.168.1.0/24",
    "10.0.0.0/8",
    "172.16.0.0/12"
  ],
  "includeSubnets": false,
  "includeBinaryRepresentation": true
}
```

# Actor output Schema

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

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "cidrs": [
        "192.168.1.0/24",
        "10.0.0.0/8",
        "172.16.0.0/12"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/cidr-ip-range-calculator").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 = { "cidrs": [
        "192.168.1.0/24",
        "10.0.0.0/8",
        "172.16.0.0/12",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/cidr-ip-range-calculator").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 '{
  "cidrs": [
    "192.168.1.0/24",
    "10.0.0.0/8",
    "172.16.0.0/12"
  ]
}' |
apify call automation-lab/cidr-ip-range-calculator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=automation-lab/cidr-ip-range-calculator",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "CIDR IP Range Calculator",
        "description": "Calculate network address, broadcast, first/last usable IP, total hosts, subnet mask, wildcard mask, and binary representation from CIDR notation. Supports IPv4 and IPv6. Pure math — no proxy.",
        "version": "0.1",
        "x-build-id": "AudxkZB28Daj2niDs"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/automation-lab~cidr-ip-range-calculator/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-automation-lab-cidr-ip-range-calculator",
                "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/automation-lab~cidr-ip-range-calculator/runs": {
            "post": {
                "operationId": "runs-sync-automation-lab-cidr-ip-range-calculator",
                "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/automation-lab~cidr-ip-range-calculator/run-sync": {
            "post": {
                "operationId": "run-sync-automation-lab-cidr-ip-range-calculator",
                "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": [
                    "cidrs"
                ],
                "properties": {
                    "cidrs": {
                        "title": "🌐 CIDR Blocks",
                        "type": "array",
                        "description": "Enter one or more CIDR blocks to calculate. IPv4 examples: '192.168.1.0/24', '10.0.0.0/8'. IPv6 examples: '2001:db8::/32', 'fe80::/10'. Each block gets a full breakdown of network/broadcast/usable IPs.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "includeSubnets": {
                        "title": "Include subnet breakdown",
                        "type": "boolean",
                        "description": "When enabled, outputs a breakdown of possible subnets one size smaller (e.g. for a /24, shows two /25 subnets). Useful for network planning.",
                        "default": false
                    },
                    "includeBinaryRepresentation": {
                        "title": "Include binary representation",
                        "type": "boolean",
                        "description": "When enabled, outputs the binary dot-notation representation of the IP address and subnet mask. Useful for learning or subnet mask validation.",
                        "default": true
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
