Catalog/util-cidr

Utilities

CIDR / subnet calculator API

Compute network & broadcast addresses, usable host range, netmask, wildcard, address/host counts, and private/public for an IPv4 CIDR — or test whether an IP is inside the block. Subnet math LLMs get wrong; this is deterministic. Answers 'what's the range of 10.0.0.0/24', 'is this IP in this subnet', 'how many hosts in /26', 'netmask for /20'.

Price$0.01per request
MethodPOST
Route/v1/util/cidr
StatusLive
MIME typeapplication/json
Rate limit120/minute
CacheNo cache
utilcidrsubnetipnetworknetmaskipv4networking
API URLhttps://x402.hexl.dev/v1/util/cidr
Integration docs
Example request
{
  "cidr": "192.168.1.0/24",
  "checkIp": "192.168.1.50"
}
Example response
{
  "cidr": "192.168.1.0/24",
  "network": "192.168.1.0",
  "broadcast": "192.168.1.255",
  "netmask": "255.255.255.0",
  "wildcard": "0.0.0.255",
  "prefixLength": 24,
  "firstHost": "192.168.1.1",
  "lastHost": "192.168.1.254",
  "totalAddresses": 256,
  "usableHosts": 254,
  "isPrivate": true,
  "checkIp": "192.168.1.50",
  "contains": true
}
Input schema
{
  "type": "object",
  "required": [
    "cidr"
  ],
  "properties": {
    "cidr": {
      "type": "string",
      "examples": [
        "192.168.1.0/24"
      ]
    },
    "checkIp": {
      "type": "string",
      "examples": [
        "192.168.1.50"
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}