{"uid":"cap_HwO53VUdxkjy4qgKZZs3j","slug":"agent402-tools-cidr-block-parser-cdee9059","name":"agent402.tools CIDR Block Parser","description":"Parse an IPv4 CIDR block: network address, broadcast, first/last host, netmask, and host count. Optionally test if an IP is inside it.","url":"https://agent402.tools/api/cidr","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"cidr":{"type":"string"},"contains":{"type":"string","description":"Optional IP to test for membership"}}},"responseSchema":{"type":"json","example":{"cidr":"192.168.1.0/24","prefix":24,"netmask":"255.255.255.0","network":"192.168.1.0","contains":true,"lastHost":"192.168.1.254","broadcast":"192.168.1.255","firstHost":"192.168.1.1","usableHosts":254,"totalAddresses":256}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_wmUnMJ_Zag9-O1AXWoenC","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Parses an IPv4 CIDR block to return network address, broadcast, first/last host, netmask, and host count, with optional IP membership testing.","exampleAgentPrompt":"Can you parse the CIDR block 10.0.0.0/22 and tell me the network address, broadcast, first and last host, netmask, and total host count? Also check if 10.0.3.255 is inside it.","exampleUseCases":null,"resultDescription":"Returns a structured object with the network address, broadcast address, first usable host IP, last usable host IP, subnet mask, total number of hosts, and optionally a boolean indicating whether the provided IP falls within the CIDR range.","failureModes":["Invalid CIDR notation (e.g. missing prefix length or malformed IP) results in an error response","IPv6 CIDR blocks are not supported","The optional 'contains' field with an invalid IP format may return an error or null membership result","Payment failure via x402 protocol blocks the request entirely"],"whenToPreferThis":"Use this endpoint when an agent needs precise subnet arithmetic for an IPv4 CIDR block — especially when both structural details (network/broadcast/host range/mask) and optional IP-in-range membership testing are needed in a single call. Prefer it over manual computation or general-purpose code execution when a lightweight, pay-per-use network utility is sufficient.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:55:30.357Z","isFirstParty":false}