ASN API
Available in: 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": "AS203779"
},
"name": {
"type": "string",
"description": "The official name of the organization that owns the ASN.",
"example": "NORDFIBER AS"
},
"country": {
"type": "string",
"description": "The ISO 3166-1 alpha-2 country code where the ASN is registered.",
"example": "NO"
},
"allocated": {
"type": "string",
"format": "date",
"description": "The date when the ASN was allocated, in YYYY-MM-DD format (ISO-8601).",
"example": "2015-10-30"
},
"registry": {
"type": "string",
"description": "The Regional Internet Registry (RIR) that allocated the ASN.",
"enum": ["arin", "ripe", "apnic", "lacnic", "afrinic"],
"example": "ripe"
},
"domain": {
"type": "string",
"description": "The primary domain associated with the organization that owns the ASN.",
"example": "nordfiber.no"
},
"num_ips": {
"type": "integer",
"description": "The total number of IPv4 addresses announced by this ASN.",
"example": 1536
},
"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": "185.124.52.0/22"
},
"id": {
"type": "string",
"description": "The network identifier or handle for the prefix.",
"example": "NO-NORDFIBER-20151030"
},
"name": {
"type": "string",
"description": "The name of the organization associated with the prefix.",
"example": "NORDFIBER AS"
},
"country": {
"type": "string",
"description": "The ISO 3166-1 alpha-2 country code for the prefix.",
"example": "NO"
},
"size": {
"type": "string",
"description": "The number of IP addresses in the prefix.",
"example": "1024"
},
"status": {
"type": "string",
"description": "The allocation status of the prefix as assigned by the RIR.",
"example": "ALLOCATED PA"
},
"domain": {
"type": "string",
"description": "The domain associated with the prefix.",
"example": "nordfiber.no"
},
"rpki_status": {
"type": "string",
"description": "The RPKI validation status of the prefix.",
"enum": ["valid", "invalid", "unknown"],
"example": "valid"
}
}
}
},
"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": "2a06:b040::/29"
},
"id": {
"type": "string",
"description": "The network identifier or handle for the prefix.",
"example": "NO-NORDFIBER-20151030"
},
"name": {
"type": "string",
"description": "The name of the organization associated with the prefix.",
"example": "NORDFIBER AS"
},
"country": {
"type": "string",
"description": "The ISO 3166-1 alpha-2 country code for the prefix.",
"example": "NO"
},
"size": {
"type": "string",
"description": "The number of IP addresses in the prefix. Note: IPv6 values exceed the JavaScript safe integer range and are returned as strings.",
"example": "633825300114114700748351602688"
},
"status": {
"type": "string",
"description": "The allocation status of the prefix as assigned by the RIR.",
"example": "ALLOCATED-BY-RIR"
},
"domain": {
"type": "string",
"description": "The domain associated with the prefix.",
"example": "nordfiber.no"
},
"rpki_status": {
"type": "string",
"description": "The RPKI validation status of the prefix.",
"enum": ["valid", "invalid", "unknown"],
"example": "valid"
}
}
}
},
"peers": {
"type": "array",
"description": "List of ASN numbers (without AS prefix) that peer with this ASN.",
"items": {
"type": "string"
},
"example": ["2116", "2119", "3356"]
},
"upstreams": {
"type": "array",
"description": "List of ASN numbers (without AS prefix) that provide upstream transit to this ASN.",
"items": {
"type": "string"
},
"example": ["2116", "2119", "3356"]
},
"downstreams": {
"type": "array",
"description": "List of ASN numbers (without AS prefix) that receive downstream transit from this ASN.",
"items": {
"type": "string"
},
"example": ["200665", "201596"]
}
}
}
| Field | Type | Description | Example |
|---|---|---|---|
asn | string | The Autonomous System Number (ASN) in AS-prefixed format. | AS203779 |
name | string | The official name of the organization that owns the ASN. | NORDFIBER AS |
country | string | The ISO 3166-1 alpha-2 country code where the ASN is registered. | NO |
allocated | string (date) | The date when the ASN was allocated, in YYYY-MM-DD format (ISO-8601). | 2015-10-30 |
registry | string | The Regional Internet Registry (RIR) that allocated the ASN. One of: arin, ripe, apnic, lacnic, afrinic. | ripe |
domain | string | The primary domain associated with the organization that owns the ASN. | nordfiber.no |
num_ips | integer | The total number of IPv4 addresses announced by this ASN. | 1536 |
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 |
peers | array | List of ASNs (without AS prefix) that peer with this ASN. | ["2116", "3356"] |
upstreams | array | List of ASNs (without AS prefix) that provide upstream transit to this ASN. | ["2116", "3356"] |
downstreams | array | List of ASNs (without AS prefix) that receive downstream transit from this ASN. | ["200665", "201596"] |
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). | 185.124.52.0/22 or 2a06:b040::/29 |
id | string | The network identifier or handle for the prefix. | NO-NORDFIBER-20151030 |
name | string | The name of the organization associated with the prefix. | NORDFIBER AS |
country | string | The ISO 3166-1 alpha-2 country code for the prefix. | NO |
size | string | The number of IP addresses in the prefix. IPv6 values exceed the JavaScript safe integer range and are returned as strings. | 1024 |
status | string | The allocation status of the prefix as assigned by the RIR. | ALLOCATED PA |
domain | string | The domain associated with the prefix. | nordfiber.no |
rpki_status | string | The RPKI validation status of the prefix. One of: valid, invalid:origin, invalid:origin or not_found. | valid |
Lookup ASN
Bash
curl ipinfo.io/AS203779/json?token=$TOKEN
JSON
{
"asn": "AS203779",
"name": "NORDFIBER AS",
"country": "NO",
"allocated": "2015-10-30",
"registry": "ripe",
"domain": "nordfiber.no",
"num_ips": 1536,
"type": "isp",
"prefixes": [
{
"netblock": "185.124.52.0/22",
"id": "NO-NORDFIBER-20151030",
"name": "NORDFIBER AS",
"country": "NO",
"size": "1024",
"status": "ALLOCATED PA",
"domain": "nordfiber.no",
"rpki_status": "valid"
}
],
"prefixes6": [
{
"netblock": "2a06:b040::/29",
"id": "NO-NORDFIBER-20151030",
"name": "NORDFIBER AS",
"country": "NO",
"size": "633825300114114700748351602688",
"status": "ALLOCATED-BY-RIR",
"domain": "nordfiber.no",
"rpki_status": "valid"
}
],
"peers": [
"2116",
"2119",
"3356",
"3549",
"6939",
"8896"
],
"upstreams": [
"2116",
"2119",
"3356",
"6939",
"25400"
],
"downstreams": [
"200665",
"201596",
"202204",
"207464"
]
}
Was this page helpful?