# ASN Lookup API

> ASN Lookup resolves any Autonomous System Number to its registered organization name and numeric identifier. Paid plans add the registry handle, country code, and announced IP range statistics.

**Endpoint:** `GET https://api.apiverve.com/v1/asnlookup`  
**Category:** Data Lookup  
**Cost:** 4 credits per call  
**Canonical page:** https://apiverve.com/marketplace/asnlookup

## Overview

An ASN lookup API backed by an ASN database that is refreshed every day. Pass an ASN with or without the leading prefix. The endpoint queries daily-updated registry data to return the registered organization name and numeric identifier. Paid plans include the two-letter country code, registry handle, and the total count of announced IPv4 and IPv6 address ranges.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl "https://api.apiverve.com/v1/asnlookup?asn=AS15169" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `asn` | string | Yes | The ASN you want to get information about, such as AS15169, AS 15169, ASN15169 or 15169 |

## Response fields

- `asn` — string · Full ASN notation (e.g., AS15169 for Google)
- `simple` — string · Numeric ASN without AS prefix (e.g., 15169)
- `handle` — string · Registry handle or short identifier for the AS · (premium)
- `description` — string · Organization name or description associated with ASN
- `country` — string · Two-letter country code where the ASN is registered · (premium)
- `ipv4RangeCount` — number · Number of IPv4 address ranges this AS announces · (premium)
- `ipv6RangeCount` — number · Number of IPv6 address ranges this AS announces · (premium)
- `ipv4AddressCount` — number · Total IPv4 addresses across those ranges · (premium)

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "asn": "AS15169",
    "simple": "15169",
    "handle": "GOOGLE",
    "description": "Google LLC",
    "country": "US",
    "ipv4RangeCount": 152,
    "ipv6RangeCount": 33,
    "ipv4AddressCount": 1314816
  }
}
```

## Use cases

- **Incident Investigation** — When investigating an alert, security teams resolve suspicious IP ownership to determine which hosting provider or telco operates the network.
- **Bot Traffic Filtering** — Flag incoming requests originating from cloud hosting providers rather than consumer internet service providers to block automated scraping.
- **Signup Fraud Prevention** — To stop payment fraud, risk engines compare the cardholder's billing country against the ASN registration country associated with the transaction.
- **Network Peer Analysis** — Network engineers track upstream transit providers by looking up ASNs captured in NetFlow and BGP routing table dumps.

## SDKs

- **npm** — `npm install @apiverve/asnlookup` (https://www.npmjs.com/package/@apiverve/asnlookup)
- **PyPI** — `pip install apiverve-asnlookup` (https://pypi.org/project/apiverve-asnlookup/)
- **NuGet** — `dotnet add package APIVerve.API.ASNLookup` (https://www.nuget.org/packages/APIVerve.API.ASNLookup)
- **Source** — https://github.com/apiverve/asnlookup-api

## More

- Full reference: https://docs.apiverve.com/ref/asnlookup
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
