# IP Address Validator & Classifier

> IP Address Validator & Classifier is a paid API for AI agents from api.x402node.dev, paid per call via x402, $0.0022/call, status unknown (last checked 2026-09-13).

Validates an IP address string and classifies it as public, private, loopback, link-local, multicast, or reserved, supporting both IPv4 and IPv6.

## Facts

- Endpoint: GET https://api.x402node.dev/validate/ip
- Price: $0.0022/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-x402node-dev-46a1d7c2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Rw_D05YsZoYCS9rLimMnw

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 api-x402node-dev-46a1d7c2
```

Example prompt: Is 192.168.1.1 a valid IP address, and is it public or private?

## When to prefer this

Use this endpoint when you need to programmatically validate and classify IP addresses before storing, routing, or processing them — especially useful for security pipelines, user-input sanitization, network tooling, or filtering out private/reserved IPs from public-facing datasets.

## Known failure modes

- Invalid or malformed input returns valid: false with null version and type
- Empty or missing IP field may return a 400-level error
- Non-string inputs (e.g. integers) may cause validation errors
- Network timeout or service unavailability results in no response

## How this service works

IP address validator, IPv4 IPv6 detector, IP format check, private IP detection, loopback detection, link-local detection, multicast detection, RFC 1918, network classifier. Validate any IP address (IPv4 or IPv6) and classify as public/private/loopback/link-local/multicast/reserved. Accepts payment on Base or Solana — either network works.

## Output

Returns a JSON object with the original IP string, a boolean 'valid' flag, the IP version (4 or 6, or null if invalid), and a 'type' string classifying the address as public, private, loopback, link-local, multicast, or reserved.

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "ip"
     ],
     "properties": {
      "ip": {
       "type": "string",
       "description": "Ip (required)"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-x402node-dev-46a1d7c2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.x402node.dev](https://www.zero.xyz/host/api.x402node.dev/llms.txt)
