# Swift Bot Labs Toolbox – IP CIDR Contains Check

> Swift Bot Labs Toolbox – IP CIDR Contains Check is a paid API for AI agents from x402-toolbox.swiftbotlab.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-31).

Checks whether one or more IP addresses fall within one or more CIDR network blocks, returning per-IP match results.

## Facts

- Endpoint: POST https://x402-toolbox.swiftbotlab.workers.dev/v1/ip/contains?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/swift-bot-labs-toolbox-ip-cidr-contains-check-969d315e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jJPEWR2R2-FnmPDV125-X

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 swift-bot-labs-toolbox-ip-cidr-contains-check-969d315e -d '<json body>'
```

Example prompt: Check whether 10.1.2.3 and 8.8.8.8 are contained in any of these CIDR blocks: 10.0.0.0/8 and 192.168.0.0/16.

## When to prefer this

Choose this endpoint when you need a fast, stateless, server-side check of IP-to-CIDR containment without spinning up networking libraries locally. Ideal for batch membership checks (up to 1000 IPs and CIDRs per call), firewall rule validation, security triage, and allowlist/denylist enforcement. Prefer it over self-hosted solutions when you want no infrastructure overhead and pay-per-call USDC pricing via x402.

## Known failure modes

- Invalid IP address format returns it in invalidIps array rather than erroring
- Invalid CIDR notation returns entry in invalidCidrs array
- Exceeding 1000 IPs or CIDRs may be rejected or truncated
- Malformed request body returns an error response
- Payment failure via x402 results in 402 response before execution

## How this service works

62 small, deterministic utility APIs (DNS and e-mail checks, web extraction, EVM decoding, x402 checks, IP math, JSON/CSV, hashing, conversions). No account or API key: pay per call in USDC with x402.

## Output

Returns a JSON object with a results array where each entry contains the queried IP, a 'matches' array listing which CIDR blocks contain it, and a boolean 'contained' flag. Also returns arrays of any invalid IPs or CIDRs submitted.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "ips": {
   "type": [
    "array",
    "string"
   ],
   "items": {
    "type": "string",
    "maxLength": 64
   },
   "maxItems": 1000,
   "maxLength": 40000,
   "description": "IP addresses (JSON array, or a comma/space separated string)"
  },
  "cidrs": {
   "type": [
    "array",
    "string"
   ],
   "items": {
    "type": "string",
    "maxLength": 64
   },
   "maxItems": 1000,
   "maxLength": 40000,
   "description": "CIDR blocks (JSON array, or a comma/space separated string)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "tool": "cidr-contains",
  "result": {
   "results": [
    {
     "ip": "10.1.2.3",
     "matches": [
      "10.0.0.0/8"
     ],
     "contained": true
    },
    {
     "ip": "8.8.8.8",
     "matches": [],
     "contained": false
    }
   ],
   "invalidIps": [],
   "invalidCidrs": []
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/swift-bot-labs-toolbox-ip-cidr-contains-check-969d315e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-toolbox.swiftbotlab.workers.dev](https://www.zero.xyz/host/x402-toolbox.swiftbotlab.workers.dev/llms.txt)
