# Lookproof CIDR Block Calculator

> Lookproof CIDR Block Calculator is a paid API for AI agents from api.lookproof.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-31).

Computes full CIDR block details (network address, first/last host, address count, netmask, host mask, and host-bits-set flag) for any IPv4 or IPv6 CIDR notation input, entirely offline.

## Facts

- Endpoint: GET https://api.lookproof.dev/v1/ip/cidr?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/lookproof-cidr-block-calculator-294433da
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Vp_-mvhVesN3GJ1UbDiKq

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability lookproof-cidr-block-calculator-294433da
```

Example prompt: Can you break down the CIDR block 192.0.2.5/24 for me — I need to know the network address, the first and last host address, how many IPs it covers, and the netmask?

## When to prefer this

Choose this endpoint when you need authoritative, offline computation of CIDR block properties — particularly for firewall rule validation, SPF record IP range explanation, cloud subnet planning, or any scenario where you must confirm network/broadcast addresses, address counts, or netmasks without relying on external registry data. It handles both IPv4 and IPv6, making it suitable for modern dual-stack environments.

## Known failure modes

- Invalid CIDR notation (e.g. missing prefix length or malformed IP) returns a 4xx error
- Prefix length out of range for address family (e.g. /33 for IPv4) returns a validation error
- Missing required 'cidr' query parameter returns a 400 bad request
- Extremely large IPv6 ranges may return address counts as big integers depending on response format

## How this service works

Check SPF, DMARC, DKIM, MTA-STS, DNSSEC and more, with results that explain what was found and why. Free browser checks and a pay-per-request API with x402.

## Output

Returns a structured object containing: the canonical network address, the first and last address in the block, total number of addresses, the netmask (e.g. 255.255.255.0), the host mask (wildcard mask), and a boolean flag indicating whether the input CIDR had host bits set beyond the prefix. Works for both IPv4 and IPv6. Computation is done offline with no external DNS or registry lookups.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "title": "CidrInput",
     "required": [
      "cidr"
     ],
     "properties": {
      "cidr": {
       "type": "string",
       "title": "Cidr",
       "maxLength": 64,
       "minLength": 2
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/lookproof-cidr-block-calculator-294433da/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.lookproof.dev](https://www.zero.xyz/host/api.lookproof.dev/llms.txt)
