# Lookproof IP Range to CIDR Converter

> Lookproof IP Range to CIDR Converter 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).

Converts a start and end IPv4 or IPv6 address into the minimal list of CIDR blocks that exactly covers that range.

## Facts

- Endpoint: GET https://api.lookproof.dev/v1/ip/range-to-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-ip-range-to-cidr-converter-543fd97b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_mL4gVks-rG14mcFK7Dy3J

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-ip-range-to-cidr-converter-543fd97b
```

Example prompt: Convert the IP range from 203.0.113.5 to 203.0.113.50 into the smallest set of CIDR blocks I can use for firewall rules.

## When to prefer this

Use this endpoint when you need to express an arbitrary IP address range as firewall, ACL, or SPF entries in CIDR notation and want the minimal covering set with no overlaps or gaps. It operates fully offline (no external DNS or registry calls), making it fast and deterministic. Prefer it over manual calculation or general-purpose libraries when an agent needs a reliable, API-accessible computation with a well-defined output limit.

## Known failure modes

- Invalid IP address format returns an error (e.g. non-numeric octets, out-of-range values)
- Start address greater than end address returns an error
- Mixing IPv4 and IPv6 addresses in the same request returns an error
- Missing required start or end parameter returns a 400 Bad Request
- Extremely large ranges that exceed the 62/254 CIDR block limit may return an error or truncated result

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

A list of CIDR blocks (in prefix/length notation) that collectively and exactly cover the specified start-to-end IP address range, using the fewest possible blocks — up to 62 for IPv4 ranges and up to 254 for IPv6 ranges. The result is ready to paste directly into firewall rules, ACL entries, or SPF records.

## 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": "IpRangeInput",
     "required": [
      "start",
      "end"
     ],
     "properties": {
      "end": {
       "type": "string",
       "title": "End",
       "maxLength": 64,
       "minLength": 2
      },
      "start": {
       "type": "string",
       "title": "Start",
       "maxLength": 64,
       "minLength": 2
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/lookproof-ip-range-to-cidr-converter-543fd97b/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)
