{"uid":"cap_w-2I6l1zef_R0PQlY1d5J","slug":"network-calc-cidr-aggregation-8cb1832b","name":"Network Calc: CIDR Aggregation","description":"Summarise IPv4 or IPv6 CIDR blocks into the minimal set (merging adjacent and overlapping blocks) plus the covering supernet.","url":"https://network-calc.x402tookit.com/cidr-aggregate?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"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":["cidrs"],"properties":{"cidrs":{"type":"string","description":"Prefixes separated by commas, spaces or newlines, for example 10.0.0.0/24,10.0.1.0/24,10.0.3.0/24"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"asOf":{"type":["null","string"]},"ipv4":{"type":["array","null"],"items":{"type":"string"}},"ipv6":{"type":["array","null"]},"source":{"type":["null","string"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"disclaimer":{"type":["null","string"]},"inputCount":{"type":["null","number"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"outputCount":{"type":["null","number"]},"ipv4Supernet":{"type":["null","string"]},"ipv6Supernet":{},"ipv4SupernetGap":{"type":["null","string"]},"ipv6SupernetGap":{"type":["null","string"]},"reductionPercent":{"type":["null","number"]},"ipv4AddressesCovered":{"type":["null","string"]},"ipv6AddressesCovered":{"type":["null","string"]},"ipv4SingleSupernetExact":{"type":["boolean","null"]},"ipv6SingleSupernetExact":{"type":["boolean","null"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Bjs2DXappZ1tRmusYUCIi","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Aggregates a list of IPv4 or IPv6 CIDR blocks into the minimal set of non-overlapping, merged prefixes plus the covering supernet.","exampleAgentPrompt":"Can you aggregate these subnets into the smallest possible set of CIDR blocks and tell me the covering supernet: 10.0.0.0/24, 10.0.1.0/24, 10.0.2.0/24, 10.0.3.0/24?","exampleUseCases":[{"title":"Firewall ACL rule consolidation","prompt":"I have a bunch of IP ranges in my firewall allowlist — 192.168.10.0/24, 192.168.11.0/24, 192.168.12.0/24, 192.168.13.0/24, 10.5.0.0/16, 10.6.0.0/16 — can you merge them into the fewest possible CIDR rules and show me the supernet?"},{"title":"BGP summary route calculation","prompt":"Before I advertise these prefixes to my upstream provider, can you aggregate them into the minimal set and tell me if there's a single supernet that covers them exactly: 203.0.113.0/26, 203.0.113.64/26, 203.0.113.128/25?"},{"title":"IPv6 prefix list cleanup","prompt":"I need to clean up our IPv6 routing table — can you take these prefixes and collapse them into the smallest summary: 2001:db8::/34, 2001:db8:4000::/34, 2001:db8:8000::/33 and tell me the covering supernet?"}],"resultDescription":"Returns the aggregated list of IPv4 and/or IPv6 CIDR blocks (merged and de-duplicated), the covering supernet for each address family, any supernet gap (addresses in the supernet not covered by the input), the reduction percentage, input and output block counts, total addresses covered, and a flag indicating whether a single exact supernet covers the input precisely.","failureModes":["Invalid CIDR notation in input causes parse error","Mixed IPv4 and IPv6 in contexts expecting one family","Empty or missing 'cidrs' query parameter returns error","Extremely large prefix lists may time out","Overlapping private and public ranges return unexpected supernets"],"whenToPreferThis":"Use this endpoint when you need to programmatically minimize a list of IP prefixes for firewall rules, routing tables, BGP advertisements, or ACL policy — especially when you want the covering supernet and a reduction percentage. Prefer this over manual tools or general-purpose code when operating in an agentic workflow that already handles x402 micropayments.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T00:30:17.897Z","isFirstParty":false,"canonicalSlug":"network-calc-cidr-aggregation-8cb1832b"}