Skip to content
Start here

List autonomous systems

radar.entities.asns.list(ASNListParams**kwargs) -> ASNListResponse
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
asn: Optional[str]

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

format: Optional[Literal["JSON", "CSV"]]

Format in which results will be returned.

One of the following:
"JSON"
"CSV"
limit: Optional[int]

Limits the number of objects returned in the response.

exclusiveMinimum
minimum0
location: Optional[str]

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

maxLength2
minLength2
offset: Optional[int]

Skips the specified number of objects before fetching the results.

minimum0
order_by: Optional[Literal["ASN", "POPULATION"]]

Specifies the metric to order the ASNs by.

One of the following:
"ASN"
"POPULATION"
ReturnsExpand Collapse
class ASNListResponse:
asns: List[ASN]
asn: int
country: str
country_name: str
estimated_users: ASNEstimatedUsers
estimated_users: Optional[int]

Total estimated users.

name: str
aka: Optional[str]
org_name: Optional[str]
website: Optional[str]

List autonomous systems

import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
asns = client.radar.entities.asns.list()
print(asns.asns)
{
  "result": {
    "asns": [
      {
        "asn": 714,
        "country": "GB",
        "countryName": "United Kingdom",
        "estimatedUsers": {
          "estimatedUsers": 86099
        },
        "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",
        "estimatedUsers": {
          "estimatedUsers": 86099
        },
        "name": "Apple Inc.",
        "aka": "aka",
        "orgName": "orgName",
        "website": "https://www.apple.com/support/systemstatus/"
      }
    ]
  },
  "success": true
}