Skip to main content

ASN Lookup

free
GET/v1/network/asn

Returns Autonomous System (AS) information for an IP address, including ASN, organization name, country of registration, and network classification (ISP, hosting, enterprise). Covers 70+ major networks with AS type detection per RFC 4271 (BGP-4) and RFC 6793 (4-byte ASN).

What It Does

Identifies the Autonomous System Number (ASN) responsible for routing traffic for an IP address. Returns the AS number, AS name (e.g., CLOUDFLARENET), organization (e.g., Cloudflare, Inc.), registration country, and network type classification (ISP, hosting provider, enterprise, education, or government). The response enriches Cloudflare's edge-level ASN data with a comprehensive database of 70+ major global networks, CDN providers, cloud platforms, and Tier-1 transit providers.

Why It's Useful

ASN data reveals the organization behind an IP address, which is more reliable than reverse DNS or WHOIS. It's essential for threat intelligence enrichment, abuse reporting, traffic segmentation, and understanding whether visitors come from residential ISPs, cloud hosting, or enterprise networks. Network type classification helps distinguish legitimate users from potential automated threats originating from hosting infrastructure.

Use Cases

Threat Analyst

Threat Intelligence Enrichment

Enrich IOCs (Indicators of Compromise) with ASN data to identify malicious hosting providers, bulletproof hosters, and attacker infrastructure patterns across autonomous systems.

Build comprehensive threat profiles with network ownership context and identify clusters of malicious activity by ASN.

Security Engineer

Bot & Fraud Detection

Classify traffic by ASN type to detect automated requests originating from hosting/cloud providers vs legitimate user traffic from residential ISPs.

Reduce false positives in bot detection by combining ASN type with behavioral signals.

Business Intelligence

Traffic Analysis & Segmentation

Analyze website traffic by ASN to identify visitor organizations (B2B enterprise visitors vs residential consumers vs cloud crawlers).

Segment traffic by organization type for account-based marketing, lead scoring, and accurate analytics.

Parameters

NameTypeRequiredDescription
ipstringRequiredThe IPv4 or IPv6 address to lookup ASN forExample: 8.8.8.8

Response Fields

FieldTypeDescription
ipstringThe queried IP address
ip_versionnumberIP version (4 or 6)
asn.numbernumberAutonomous System Number (e.g., 13335)
asn.namestringAS name identifier (e.g., CLOUDFLARENET)
asn.organizationstringOrganization name (e.g., Cloudflare, Inc.)
asn.countrystringCountry code of AS registration (ISO 3166-1 alpha-2)
asn.typestringNetwork type: isp, hosting, enterprise, education, or government
network.cidrstringCIDR notation of the IP's network block
network.start_ipstringFirst IP address in the BGP prefix
network.end_ipstringLast IP address in the BGP prefix
rirstringRegional Internet Registry (ARIN, RIPE, APNIC, AFRINIC, LACNIC)
allocatedstringDate the IP block was allocated (from Team Cymru)

Code Examples

cURL
curl "https://api.edgedns.dev/v1/network/asn" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d "ip=8.8.8.8"
JavaScript
const response = await fetch(
  'https://api.edgedns.dev/v1/network/asn?ip=8.8.8.8',
  {
    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/network/asn',
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    params={
    'ip': '8.8.8.8'
    }
)

data = response.json()
print(data)

Read the full ASN Lookup 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 ASN Lookup endpoint live in the playground.