OpenIPApi
All posts
Explainer 5 min read · February 14, 2026

ASN Lookups: Understanding Autonomous System Numbers

ASNs identify the networks that make up the internet. Here's how to use them to classify traffic by ISP, hosting provider, or enterprise.

An Autonomous System Number (ASN) is a unique identifier assigned to a network that controls a set of IP prefixes on the internet. Every ISP, cloud provider, university, and large enterprise typically has one or more ASNs.

What you can learn from an ASN

ASNs for access control

Rather than blocking individual IPs, you can block or allow entire ASNs. Blocking AWS, Azure, and GCP ASNs prevents most cloud-based scraping. Allowing your corporate ASN can replace VPN requirements for internal tools.

Querying ASN data

GET https://api.openipapi.com/v1/asn/15169
X-API-Key: your_key

{
  "asn": 15169,
  "name": "Google LLC",
  "domain": "google.com",
  "country": "US",
  "prefixes_v4": 1247,
  "prefixes_v6": 351
}

Try OpenIPApi for free

10,000 free lookups/month. No credit card required.

Get free API key