Skip to main content

IP Range Info

developer
GET/v1/ip/range

Returns detailed information about an IP address range specified in CIDR notation. Calculates range boundaries, total usable addresses, network/broadcast addresses, resolves ASN ownership and RIR allocation, and surfaces a structured `abuse_contact` (email + name + phone + organization). Returns a `bgp_match` enum (exact / subprefix / superprefix / mismatch / unknown) comparing your queried CIDR to the actually-announced BGP prefix, plus `cidr_normalized` and `had_host_bits_set` so silent canonicalization (e.g. `8.8.8.4/24` → `8.8.8.0/24`) is inspectable rather than hidden.

What It Does

Parses and validates CIDR notation, then returns comprehensive range details: first/last IP addresses, total addresses in range, usable host count (excluding network and broadcast for IPv4), network and broadcast addresses, subnet mask, wildcard mask, associated ASN with organization name (populated for every allocated ASN via the Team Cymru AS-description fallback, not just a curated list), RIR allocation details, abuse contact (sourced via RDAP, including RIPE's `abuse-mailbox` vCard convention), the BGP-announced prefix, and the relationship between your queried CIDR and that announcement.

Why It's Useful

Essential for network planning, IP allowlist/blocklist management, and abuse handling. The `bgp_match` enum makes "my internal documentation says this is a /24 but it's actually announced as a /16" inspectable in one field. Understanding the scope and ownership of IP blocks prevents over-blocking in security rules, enables accurate capacity planning, and provides the right contacts for abuse reporting.

Use Cases

Network Architect

Network Capacity Planning

Evaluate IP ranges for subnetting, peering decisions, or address space allocation by understanding exact range boundaries and available host count.

Make informed allocation decisions with precise range size calculations and ownership data.

Security Operations

Abuse Report Routing

Determine the correct organization and abuse contact for a malicious IP range to route incident reports and takedown requests.

Direct abuse reports to the responsible party with accurate ownership data and contact information.

Security Engineer

Blocklist Scope Assessment

Before adding a CIDR block to a firewall blocklist, verify the range size and owner to avoid accidentally blocking legitimate traffic from shared hosting or CDN ranges.

Prevent over-blocking by understanding that a /16 contains 65,536 addresses vs a /24 with only 256.

Parameters

NameTypeRequiredDescription
ipstringRequiredIP range in CIDR notation (e.g., 8.8.8.0/24)Example: 8.8.8.0/24

Response Fields

FieldTypeDescription
cidr.cidrstringThe CIDR range in notation
cidr.first_ipstringFirst IP address in range
cidr.last_ipstringLast IP address in range
cidr.prefix_lengthnumberCIDR prefix length (0-32 for IPv4, 0-128 for IPv6)
cidr.total_ipsstringTotal addresses in range (string for IPv6 precision)
cidr.ip_versionnumberIP version (4 or 6)
cidr.usable_hostsstringUsable host addresses (excludes network/broadcast for IPv4)
cidr.network_addressstringNetwork address
cidr.broadcast_addressstringBroadcast address (IPv4 only, null for IPv6)
cidr.subnet_maskstringSubnet mask (IPv4 only)
cidr.wildcard_maskstringWildcard mask (IPv4 only)
cidr_normalizedstringCanonical CIDR with host bits cleared. Echoed regardless of whether normalization was needed.
had_host_bits_setbooleanTrue when the input CIDR had host bits set and was silently canonicalized (e.g. 8.8.8.4/24 → 8.8.8.0/24)
asnnumberAutonomous System Number from Team Cymru DNS
organizationstringOrganization name — sourced from curated KNOWN_ASNS first, then Team Cymru AS-description fallback
network_namestringNetwork handle / name from RDAP or Cymru
countrystringCountry code where the AS / range is registered
rirstringRegional Internet Registry (ARIN, RIPE, APNIC, LACNIC, AFRINIC)
allocatedstringAllocation date from Team Cymru
bgp_prefixstringBGP-announced prefix for the first IP in the queried range
bgp_matchstringRelationship between queried CIDR and announced BGP prefix: exact, subprefix, superprefix, mismatch, or unknown
abuse_contact.emailstringAbuse reporting email address
abuse_contact.namestringAbuse contact name
abuse_contact.phonestringAbuse contact phone number
abuse_contact.organizationstringAbuse contact organization
is_bogonbooleanWhether the IP is a bogon (reserved/private) address
bogon_typestringBogon classification (e.g., rfc1918_private, rfc5737_documentation)

Code Examples

cURL
curl "https://api.edgedns.dev/v1/ip/range" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d "ip=8.8.8.0/24"
JavaScript
const response = await fetch(
  'https://api.edgedns.dev/v1/ip/range?ip=8.8.8.0%2F24',
  {
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY'
    }
  }
);

const data = await response.json();
console.log(data);
Python
import requests

response = requests.get(
    'https://api.edgedns.dev/v1/ip/range',
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    params={
    'ip': '8.8.8.0/24'
    }
)

data = response.json()
print(data)

Read the full IP Range Info guide

Why it matters, real-world use cases, parameters, response fields, and how to call it from Claude, ChatGPT, or Gemini via MCP.

Read the guide →

Related Endpoints

External References

Learn more about the standards and protocols behind this endpoint.

Try This Endpoint

Test the IP Range Info endpoint live in the playground.