Skip to content
Start here

Get AS details by ASN

client.radar.entities.asns.get(numberasn, ASNGetParams { format } query?, RequestOptionsoptions?): ASNGetResponse { asn }
GET/radar/entities/asns/{asn}

Retrieves the requested autonomous system information. (A confidence level below 5 indicates a low level of confidence in the traffic data - normally this happens because Cloudflare has a small amount of traffic from/to this AS). Population estimates come from APNIC (refer to https://labs.apnic.net/?p=526).

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
asn: number

Single Autonomous System Number (ASN) as integer.

query: ASNGetParams { format }
format?: "JSON" | "CSV"

Format in which results will be returned.

One of the following:
"JSON"
"CSV"
ReturnsExpand Collapse
ASNGetResponse { asn }
asn: ASN { asn, confidenceLevel, country, 8 more }
asn: number
confidenceLevel: number
country: string
countryName: string
estimatedUsers: EstimatedUsers { locations, estimatedUsers }
locations: Array<Location>
locationAlpha2: string
locationName: string
estimatedUsers?: number

Estimated users per location.

estimatedUsers?: number

Total estimated users.

name: string
orgName: string
source: string

Regional Internet Registry.

website: string
aka?: string

Get AS details by ASN

import Cloudflare from 'cloudflare';

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

const asn = await client.radar.entities.asns.get(174);

console.log(asn.asn);
{
  "result": {
    "asn": {
      "asn": 714,
      "confidenceLevel": 5,
      "country": "GB",
      "countryName": "United Kingdom",
      "estimatedUsers": {
        "locations": [
          {
            "locationAlpha2": "US",
            "locationName": "United States",
            "estimatedUsers": 16710
          }
        ],
        "estimatedUsers": 86099
      },
      "name": "Apple Inc.",
      "orgName": "orgName",
      "related": [
        {
          "asn": 174,
          "name": "Cogent-174",
          "aka": "aka",
          "estimatedUsers": 65345
        }
      ],
      "source": "RIPE",
      "website": "https://www.apple.com/support/systemstatus/",
      "aka": "aka"
    }
  },
  "success": true
}
Returns Examples
{
  "result": {
    "asn": {
      "asn": 714,
      "confidenceLevel": 5,
      "country": "GB",
      "countryName": "United Kingdom",
      "estimatedUsers": {
        "locations": [
          {
            "locationAlpha2": "US",
            "locationName": "United States",
            "estimatedUsers": 16710
          }
        ],
        "estimatedUsers": 86099
      },
      "name": "Apple Inc.",
      "orgName": "orgName",
      "related": [
        {
          "asn": 174,
          "name": "Cogent-174",
          "aka": "aka",
          "estimatedUsers": 65345
        }
      ],
      "source": "RIPE",
      "website": "https://www.apple.com/support/systemstatus/",
      "aka": "aka"
    }
  },
  "success": true
}