Skip to content
Start here

List autonomous systems

client.radar.entities.asns.list(ASNListParams { asn, format, limit, 3 more } query?, RequestOptionsoptions?): ASNListResponse { asns }
GET/radar/entities/asns

Retrieves a list of autonomous systems.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
User Details WriteUser Details Read
ParametersExpand Collapse
query: ASNListParams { asn, format, limit, 3 more }
asn?: string

Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list.

format?: "JSON" | "CSV"

Format in which results will be returned.

One of the following:
"JSON"
"CSV"
limit?: number

Limits the number of objects returned in the response.

exclusiveMinimum
minimum0
location?: string

Filters results by location. Specify an alpha-2 location code.

maxLength2
minLength2
offset?: number

Skips the specified number of objects before fetching the results.

minimum0
orderBy?: "ASN" | "POPULATION"

Specifies the metric to order the ASNs by.

One of the following:
"ASN"
"POPULATION"
ReturnsExpand Collapse
ASNListResponse { asns }
asns: Array<ASN>
asn: number
country: string
countryName: string
name: string
aka?: string
orgName?: string
website?: string

List autonomous systems

import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});

const asns = await client.radar.entities.asns.list();

console.log(asns.asns);
{
  "result": {
    "asns": [
      {
        "asn": 714,
        "country": "GB",
        "countryName": "United Kingdom",
        "name": "Apple Inc.",
        "aka": "aka",
        "orgName": "orgName",
        "website": "https://www.apple.com/support/systemstatus/"
      }
    ]
  },
  "success": true
}
Returns Examples
{
  "result": {
    "asns": [
      {
        "asn": 714,
        "country": "GB",
        "countryName": "United Kingdom",
        "name": "Apple Inc.",
        "aka": "aka",
        "orgName": "orgName",
        "website": "https://www.apple.com/support/systemstatus/"
      }
    ]
  },
  "success": true
}