Catalog/util-ip-validate

Utilities

Validate & classify an IP address API

Validate an IPv4 or IPv6 string, normalize it, and classify its scope per RFC 1918 (private v4), RFC 5735 (loopback/link-local/reserved/multicast/documentation), RFC 4193 (unique-local v6) and RFC 4291 (v6 loopback/link-local/multicast), optionally testing membership in a provided CIDR block. Distinct from util-cidr (subnet math on a block). Answers 'is 10.0.0.1 a private IP','what scope is fe80::1','is 8.8.8.8 inside 8.8.8.0/24'.

Price$0.01per request
MethodPOST
Route/v1/util/util-ip-validate
StatusLive
MIME typeapplication/json
Rate limit120/minute
CacheNo cache
utilipipv4ipv6rfc1918cidrnetworkclassify
API URLhttps://x402.hexl.dev/v1/util/util-ip-validate
Integration docs
Example request
{
  "ip": "10.0.0.1"
}
Example response
{
  "input": "10.0.0.1",
  "valid": true,
  "version": 4,
  "normalized": "10.0.0.1",
  "integer": 167772161,
  "scope": "private",
  "isPrivate": true,
  "isLoopback": false,
  "isLinkLocal": false,
  "isMulticast": false,
  "isReserved": false,
  "isGlobal": false,
  "rfc": "RFC 1918",
  "note": "Private-use network"
}
Input schema
{
  "type": "object",
  "required": [
    "ip"
  ],
  "properties": {
    "ip": {
      "type": "string",
      "minLength": 1,
      "examples": [
        "10.0.0.1",
        "2001:db8::1"
      ]
    },
    "cidr": {
      "type": "string",
      "examples": [
        "10.0.0.0/8"
      ]
    }
  },
  "examples": [
    {
      "ip": "10.0.0.1"
    },
    {
      "ip": "8.8.8.8",
      "cidr": "8.8.8.0/24"
    }
  ]
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}