Skip to content
Start here

Get top ASes by BGP updates

radar.bgp.top.ases.get(AseGetParams**kwargs) -> AseGetResponse
GET/radar/bgp/top/ases

Retrieves the top autonomous systems by BGP updates (announcements only).

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[SequenceNotStr[str]]

Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with - to exclude ASNs from results. For example, -174, 3356 excludes results from AS174, but includes results from AS3356.

date_end: Optional[SequenceNotStr[Union[str, datetime]]]

End of the date range (inclusive).

date_range: Optional[SequenceNotStr[str]]

Filters results by date range. For example, use 7d and 7dcontrol to compare this week with the previous week. Use this parameter or set specific start and end dates (dateStart and dateEnd parameters).

date_start: Optional[SequenceNotStr[Union[str, datetime]]]

Start of the date range.

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
name: Optional[SequenceNotStr[str]]

Array of names used to label the series in the response.

prefix: Optional[SequenceNotStr[str]]

Filters results by BGP network prefix.

update_type: Optional[List[Literal["ANNOUNCEMENT", "WITHDRAWAL"]]]

Filters results by BGP update type.

One of the following:
"ANNOUNCEMENT"
"WITHDRAWAL"
ReturnsExpand Collapse
class AseGetResponse:
meta: Meta
date_range: List[MetaDateRange]
end_time: datetime

Adjusted end of date range.

formatdate-time
start_time: datetime

Adjusted start of date range.

formatdate-time
top_0: List[Top0]
asn: int
as_name: str
value: str

Percentage of updates by this AS out of the total updates by all autonomous systems.

Get top ASes by BGP updates

import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
ase = client.radar.bgp.top.ases.get()
print(ase.meta)
{
  "result": {
    "meta": {
      "dateRange": [
        {
          "endTime": "2022-09-17T10:22:57.555Z",
          "startTime": "2022-09-16T10:22:57.555Z"
        }
      ]
    },
    "top_0": [
      {
        "asn": 714,
        "ASName": "Apple-Engineering",
        "value": "0.73996"
      }
    ]
  },
  "success": true
}
Returns Examples
{
  "result": {
    "meta": {
      "dateRange": [
        {
          "endTime": "2022-09-17T10:22:57.555Z",
          "startTime": "2022-09-16T10:22:57.555Z"
        }
      ]
    },
    "top_0": [
      {
        "asn": 714,
        "ASName": "Apple-Engineering",
        "value": "0.73996"
      }
    ]
  },
  "success": true
}