🚀 Experience the new and improved APIVoid! Check out what's new

ASN Info API: Lookup IP Address Ranges and Organization

A JSON API to fetch ASN details, including IPv4/IPv6 prefixes, organization name (e.g. DigitalOcean, LLC), AS name, abuse contact, and related domains. Use this API to quickly obtain valuable ASN information such as prefixes and the organization that owns the ASN.

Consumes 1 credit per API call

# Example Curl request from the command line:
                          
curl -X POST "https://api.apivoid.com/v2/asn-info" \
     -H "Content-Type: application/json" \
     -H "X-API-Key: YOUR_API_KEY_HERE" \
     -d '{"asn": "AS14061"}'

# Example JSON output for a 200 HTTP status code:

{
    "asn": "AS14061",
    "asname": "DIGITALOCEAN-ASN",
    "status": "active",
    "org": "DigitalOcean, LLC",
    "country_code": "US",
    "created": "2012-09-25",
    "days_since_created": 4754,
    "months_since_created": 156,
    "years_since_created": 13,
    "updated": "2025-03-04",
    "days_since_updated": 211,
    "months_since_updated": 6,
    "years_since_updated": 0,
    "address": "105 Edgeview Drive, Suite 425, Broomfield, CO, 80021, United States",
    "abuse_email": "abuse@digitalocean.com",
    "domain": "digitalocean.com",
    "type": "hosting",
    "routes": {
        "ipv4": {
            "total_prefixes": 821,
            "total_ips": 3021312,
            "prefixes": [
                "103.253.144.0/22",
                "104.131.0.0/18",
                "104.131.128.0/20",
                ...
            ]
        },
        "ipv6": {
            "total_prefixes": 17,
            "total_ips": "328827822935179135520079872",
            "prefixes": [
                "2400:6180:100::/40",
                "2400:6180:10::/48",
                "2400:6180::/48",
                ...
            ]
        }
    },
    "rir": "ARIN"
}
Code analysis

Key Features

Get comprehensive information about ASNs, such as AS14061

Businesses and startups use this ASN Info API to instantly get complete and accurate information about an ASN to enrich a SIEM event or to find all the IPv4 and IPv6 assigned ranges.

Full ASN Details

Retrieve AS name, organization, status, country, creation date, domain, abuse email, prefixes.

IPv4 and IPv6 prefixes

Get all IPv4 and IPv6 prefixes assigned to the ASN, including prefix counts and total IP addresses.

Abuse Contact Email

Most ASNs include an abuse contact email, allowing faster reporting of malicious or abusive IP addresses.

Updated Weekly

Our dataset is refreshed every 7 days, guaranteeing access to accurate and up-to-date ASN information.

Common Use Cases

Take a look at some real-world use cases of this API service

Our API can be applied in many ways, from cybersecurity operations to research projects. Here we highlight the most popular use cases based on our customers’ usage:

Get ASN IP Prefixes

Easily retrieve all the IPv4 and IPv6 prefixes (such as 103.253.144.0/22) assigned to an ASN.

Block ASN IP Prefixes

In some cases, you may want to block IP addresses related to an ASN. Use our API to retrieve them.

Enrich ASN Information

Using a SIEM or CRM platform? Add context to ASN-related data, show organization, prefixes, etc.

Report Abusive IP Address

The API output includes the ASN’s abuse contact email, making it easy to report malicious IP activity.

Use cases

USAGE EXAMPLE

Learn how seamless it is to add and use ASN Info API anywhere you want

All it takes is a HTTPS POST request with JSON payload to our endpoint, and you’ll receive the response within seconds, usually within 1-3 seconds. Here are a few code examples to use the API:

$asn = 'AS14061';

$apiUrl = 'https://api.apivoid.com/v2/asn-info';
$apiKey = 'your_api_key_here';

$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json', 'X-API-Key: ' . $apiKey]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(['asn' => $asn]));
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

if ($httpCode === 200) {
    $responseData = json_decode($response, true);

    print_r($responseData);
}

Start using our API services, it takes just a few minutes

Create your account, pick a subscription plan, and make your first API call instantly with your API key—simple as that!

Get started now