ASN API Developer Resource
Available in: IPinfo Core, IPinfo Plus, and IPinfo Enterprise
ASN API allows you to programmatically access details about an ASN, such as the assigned prefixes, related domain, and more. The ASN API is available at /ASXX/json.
Quick Reference
API Schema
JSON
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "IPinfo ASN API Response",
"description": "Schema for IPinfo ASN API response",
"type": "object",
"properties": {
"asn": {
"type": "string",
"description": "The Autonomous System Number (ASN) in AS-prefixed format.",
"example": "AS7922"
},
"name": {
"type": "string",
"description": "The official name of the organization that owns the ASN.",
"example": "Comcast Cable Communications, LLC"
},
"country": {
"type": "string",
"description": "The ISO 3166-1 alpha-2 country code where the ASN is registered.",
"example": "US"
},
"allocated": {
"type": "string",
"format": "date",
"description": "The date when the ASN was allocated, in YYYY-MM-DD format (ISO-8601).",
"example": "1997-02-14"
},
"registry": {
"type": "string",
"description": "The Regional Internet Registry (RIR) that allocated the ASN.",
"enum": ["arin", "ripencc", "apnic", "lacnic", "afrinic"],
"example": "arin"
},
"domain": {
"type": "string",
"description": "The primary domain associated with the organization that owns the ASN.",
"example": "comcast.com"
},
"num_ips": {
"type": "integer",
"description": "The total number of IPv4 addresses announced by this ASN.",
"example": 71224576
},
"type": {
"type": "string",
"description": "The type of organization that owns the ASN.",
"enum": ["isp", "hosting", "business", "education", "government"],
"example": "isp"
},
"prefixes": {
"type": "array",
"description": "List of IPv4 prefixes (netblocks) announced by this ASN.",
"items": {
"type": "object",
"properties": {
"netblock": {
"type": "string",
"description": "The IPv4 CIDR notation for the prefix.",
"example": "104.69.216.0/22"
},
"id": {
"type": "string",
"description": "The network identifier or handle for the prefix.",
"example": "AKAMAI"
},
"name": {
"type": "string",
"description": "The name of the organization associated with the prefix.",
"example": "Akamai Technologies, Inc."
},
"country": {
"type": "string",
"description": "The ISO 3166-1 alpha-2 country code for the prefix.",
"example": "US"
}
}
}
},
"prefixes6": {
"type": "array",
"description": "List of IPv6 prefixes (netblocks) announced by this ASN.",
"items": {
"type": "object",
"properties": {
"netblock": {
"type": "string",
"description": "The IPv6 CIDR notation for the prefix.",
"example": "2601::/20"
},
"id": {
"type": "string",
"description": "The network identifier or handle for the prefix.",
"example": "COMCAST6NET"
},
"name": {
"type": "string",
"description": "The name of the organization associated with the prefix.",
"example": "Comcast Cable Communications, LLC"
},
"country": {
"type": "string",
"description": "The ISO 3166-1 alpha-2 country code for the prefix.",
"example": "US"
}
}
}
}
}
}
| Field | Type | Description | Example |
|---|---|---|---|
asn | string | The Autonomous System Number (ASN) in AS-prefixed format. | AS7922 |
name | string | The official name of the organization that owns the ASN. | Comcast Cable Communications, LLC |
country | string | The ISO 3166-1 alpha-2 country code where the ASN is registered. | US |
allocated | string (date) | The date when the ASN was allocated, in YYYY-MM-DD format (ISO-8601). | 1997-02-14 |
registry | string | The Regional Internet Registry (RIR) that allocated the ASN. One of: arin, ripencc, apnic, lacnic, afrinic. | arin |
domain | string | The primary domain associated with the organization that owns the ASN. | comcast.com |
num_ips | integer | The total number of IPv4 addresses announced by this ASN. | 71224576 |
type | string | The type of organization that owns the ASN. One of: isp, hosting, business, education, government. | isp |
prefixes | array | List of IPv4 prefixes (netblocks) announced by this ASN. | See below |
prefixes6 | array | List of IPv6 prefixes (netblocks) announced by this ASN. | See below |
Prefix Object Fields
The prefixes and prefixes6 arrays contain objects with the following fields:
| Field | Type | Description | Example |
|---|---|---|---|
netblock | string | The CIDR notation for the prefix (IPv4 for prefixes, IPv6 for prefixes6). | 104.69.216.0/22 or 2601::/20 |
id | string | The network identifier or handle for the prefix. | AKAMAI |
name | string | The name of the organization associated with the prefix. | Akamai Technologies, Inc. |
country | string | The ISO 3166-1 alpha-2 country code for the prefix. | US |
Lookup ASN:
Bash
curl ipinfo.io/AS7922/json?token=$TOKEN
JSON
{
"asn": "AS7922",
"name": "Comcast Cable Communications, LLC",
"country": "US",
"allocated": "1997-02-14",
"registry": "arin",
"domain": "comcast.com",
"num_ips": 71224576,
"type": "isp",
"prefixes": [
{
"netblock": "104.69.216.0/22",
"id": "AKAMAI",
"name": "Akamai Technologies, Inc.",
"country": "US"
},
{
"netblock": "104.69.220.0/23",
"id": "AKAMAI",
"name": "Akamai Technologies, Inc.",
"country": "US"
}
],
"prefixes6": [
{
"netblock": "2601::/20",
"id": "COMCAST6NET",
"name": "Comcast Cable Communications, LLC",
"country": "US"
},
{
"netblock": "2603:2000::/20",
"id": "COMCAST6NET",
"name": "Comcast Cable Communications, LLC",
"country": "US"
},
{
"netblock": "2603:3000::/24",
"id": "COMCAST6NET",
"name": "Comcast Cable Communications, LLC",
"country": "US"
},
{
"netblock": "2a03:2880:d001::/48",
"id": "IE-FACEBOOK-201100822",
"name": "Facebook Ireland Ltd",
"country": "IE"
}
]
}
Was this page helpful?