{"openapi":"3.1.0","info":{"title":"Subnet API","version":"1.0.0","description":"A fast, fully-local IP and subnet calculator: validate IPv4 and IPv6 addresses with type classification (private, public, loopback, link-local, multicast, CGNAT or reserved), compute CIDR subnet details (network, netmask, wildcard, broadcast, first and last host, total addresses and usable hosts, with IPv6 network and range size), check whether an address falls inside a CIDR block, and convert addresses (IPv4 to integer, hex and binary; IPv6 expand and compress). Every endpoint accepts input via the query string or the request body. Pure server-side compute, no third-party upstream, so responses are instant and always available. Ideal for devops, network automation, IPAM, firewall and ACL tooling and cloud infrastructure.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/subnet-api","description":"oanor gateway"}],"tags":[{"name":"Subnet"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/contains":{"get":{"operationId":"get_v1_contains","tags":["Subnet"],"summary":"Is an IP inside a CIDR","description":"","parameters":[{"name":"cidr","in":"query","required":true,"description":"CIDR block","schema":{"type":"string"},"example":"10.0.0.0/8"},{"name":"ip","in":"query","required":true,"description":"IP address","schema":{"type":"string"},"example":"10.1.2.3"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"ip":"10.1.2.3","cidr":"10.0.0.0/8","contains":true},"meta":{"timestamp":"2026-05-30T10:10:56.481Z","request_id":"1e36be8f-58ce-4878-9526-99fcbaa4c1db"},"status":"ok","message":"OK","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/convert":{"get":{"operationId":"get_v1_convert","tags":["Subnet"],"summary":"Convert an IP address","description":"","parameters":[{"name":"ip","in":"query","required":true,"description":"IPv4 or IPv6 address","schema":{"type":"string"},"example":"192.168.1.1"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"ip":"192.168.1.1","hex":"0xc0a80101","binary":"11000000.10101000.00000001.00000001","integer":3232235777,"version":4},"meta":{"timestamp":"2026-05-30T10:10:56.567Z","request_id":"0d327fbd-fd2f-4c96-b39b-fd406b9f2c3e"},"status":"ok","message":"OK","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/subnet":{"get":{"operationId":"get_v1_subnet","tags":["Subnet"],"summary":"CIDR subnet calculator","description":"","parameters":[{"name":"cidr","in":"query","required":true,"description":"address/prefix","schema":{"type":"string"},"example":"192.168.1.0/24"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"cidr":"192.168.1.0/24","prefix":24,"netmask":"255.255.255.0","network":"192.168.1.0","version":4,"wildcard":"0.0.0.255","broadcast":"192.168.1.255","last_host":"192.168.1.254","first_host":"192.168.1.1","usable_hosts":254,"total_addresses":256},"meta":{"timestamp":"2026-05-30T10:10:56.638Z","request_id":"94f08fee-7e90-4133-a164-e5eeb7900758"},"status":"ok","message":"OK","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/validate":{"get":{"operationId":"get_v1_validate","tags":["Subnet"],"summary":"Validate an IP address","description":"","parameters":[{"name":"ip","in":"query","required":true,"description":"IPv4 or IPv6 address","schema":{"type":"string"},"example":"192.168.1.10"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"ip":"192.168.1.10","type":"private","valid":true,"integer":3232235786,"version":4,"is_private":true},"meta":{"timestamp":"2026-05-30T10:10:56.724Z","request_id":"c42b0dcc-fdcc-40d1-a61c-8f6738bb4a2f"},"status":"ok","message":"OK","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":14000,"rps_limit":3,"hard_limit":true},{"slug":"basic","name":"Basic","price_cents_month":400,"monthly_call_quota":240000,"rps_limit":12,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1500,"monthly_call_quota":1300000,"rps_limit":40,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":4000,"monthly_call_quota":6800000,"rps_limit":120,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/subnet-api"}