---
title: Get AS rankings by botnet threat feed activity
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/typescript)

[Radar](https://developers.cloudflare.com/api/typescript/resources/radar)

[Entities](https://developers.cloudflare.com/api/typescript/resources/radar/subresources/entities)

[ASNs](https://developers.cloudflare.com/api/typescript/resources/radar/subresources/entities/subresources/asns)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Get AS rankings by botnet threat feed activity

client.radar.entities.asns.botnetThreatFeed(ASNBotnetThreatFeedParams {asn, compareDateRange, date, 6 more } query?, RequestOptionsoptions?): [ASNBotnetThreatFeedResponse](<https://developers.cloudflare.com/api/typescript/resources/radar#(resource)%20radar.entities.asns%20%3E%20(model)%20asn_botnet_threat_feed_response%20%3E%20(schema)>) {ases, meta }

GET/radar/entities/asns/botnet\_threat\_feed

Retrieves a ranked list of Autonomous Systems based on their presence in the Cloudflare Botnet Threat Feed. Rankings can be sorted by offense count or number of bad IPs. Optionally compare to a previous date to see rank changes.

##### Security

<details>

<summary>API Token</summary>



The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.

**Example:**<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>

</details>

<details>

<summary>API Email + API Key</summary>



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

**Example:**<code>X-Auth-Email: user@example.com</code>

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

**Example:**<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>

</details>

##### Accepted Permissions (at least one required)

`User Details Write``User Details Read`

##### ParametersExpand Collapse

<details>

<summary>

query: ASNBotnetThreatFeedParams {asn, compareDateRange, date, 6 more }

</summary>

asn?: Array&lt;string&gt;

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

<a href="#(resource)%20radar.entities.asns%20%3E%20(method)%20botnet_threat_feed%20%3E%20(params)%20default%20%3E%20(param)%20asn">Link to this property</a>

compareDateRange?: string

Relative date range for rank change comparison (e.g., “1d”, “7d”, “30d”).

<a href="#(resource)%20radar.entities.asns%20%3E%20(method)%20botnet_threat_feed%20%3E%20(params)%20default%20%3E%20(param)%20compareDateRange">Link to this property</a>

date?: string

The date to retrieve (YYYY-MM-DD format). If not specified, returns the most recent available data. Note: This is the date the report was generated. The report is generated from information collected from the previous day (e.g., the 2026-02-23 entry contains data from 2026-02-22).

formatdate

<a href="#(resource)%20radar.entities.asns%20%3E%20(method)%20botnet_threat_feed%20%3E%20(params)%20default%20%3E%20(param)%20date">Link to this property</a>

<details>

<summary>

format?: "JSON"| "CSV"

Format in which results will be returned.

</summary>

One of the following:

"JSON"

<a href="#(resource)%20radar.entities.asns%20%3E%20(method)%20botnet_threat_feed%20%3E%20(params)%20default%20%3E%20(param)%20format%20%3E%20(schema)%20%3E%20(member)%200">Link to this property</a>

"CSV"

<a href="#(resource)%20radar.entities.asns%20%3E%20(method)%20botnet_threat_feed%20%3E%20(params)%20default%20%3E%20(param)%20format%20%3E%20(schema)%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20radar.entities.asns%20%3E%20(method)%20botnet_threat_feed%20%3E%20(params)%20default%20%3E%20(param)%20format">Link to this property</a>

limit?: number

Limits the number of objects returned in the response.

exclusiveMinimum

minimum0

<a href="#(resource)%20radar.entities.asns%20%3E%20(method)%20botnet_threat_feed%20%3E%20(params)%20default%20%3E%20(param)%20limit">Link to this property</a>

location?: string

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

maxLength2

minLength2

<a href="#(resource)%20radar.entities.asns%20%3E%20(method)%20botnet_threat_feed%20%3E%20(params)%20default%20%3E%20(param)%20location">Link to this property</a>

<details>

<summary>

metric?: "OFFENSE\_COUNT"| "NUMBER\_OF\_OFFENDING\_IPS"

Metric to rank ASNs by.

</summary>

One of the following:

"OFFENSE\_COUNT"

<a href="#(resource)%20radar.entities.asns%20%3E%20(method)%20botnet_threat_feed%20%3E%20(params)%20default%20%3E%20(param)%20metric%20%3E%20(schema)%20%3E%20(member)%200">Link to this property</a>

"NUMBER\_OF\_OFFENDING\_IPS"

<a href="#(resource)%20radar.entities.asns%20%3E%20(method)%20botnet_threat_feed%20%3E%20(params)%20default%20%3E%20(param)%20metric%20%3E%20(schema)%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20radar.entities.asns%20%3E%20(method)%20botnet_threat_feed%20%3E%20(params)%20default%20%3E%20(param)%20metric">Link to this property</a>

offset?: number

Skips the specified number of objects before fetching the results.

minimum0

<a href="#(resource)%20radar.entities.asns%20%3E%20(method)%20botnet_threat_feed%20%3E%20(params)%20default%20%3E%20(param)%20offset">Link to this property</a>

<details>

<summary>

sortOrder?: "ASC"| "DESC"

Sort order.

</summary>

One of the following:

"ASC"

<a href="#(resource)%20radar.entities.asns%20%3E%20(method)%20botnet_threat_feed%20%3E%20(params)%20default%20%3E%20(param)%20sortOrder%20%3E%20(schema)%20%3E%20(member)%200">Link to this property</a>

"DESC"

<a href="#(resource)%20radar.entities.asns%20%3E%20(method)%20botnet_threat_feed%20%3E%20(params)%20default%20%3E%20(param)%20sortOrder%20%3E%20(schema)%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20radar.entities.asns%20%3E%20(method)%20botnet_threat_feed%20%3E%20(params)%20default%20%3E%20(param)%20sortOrder">Link to this property</a>

</details>

[Link to this property](<#(resource)%20radar.entities.asns%20%3E%20(method)%20botnet_threat_feed%20%3E%20(params)%20default>)

##### ReturnsExpand Collapse

<details>

<summary>

ASNBotnetThreatFeedResponse {ases, meta }

</summary>

<details>

<summary>

ases: Array&lt;Ase&gt;

</summary>

asn: number

<a href="#(resource)%20radar.entities.asns%20%3E%20(model)%20asn_botnet_threat_feed_response%20%3E%20(schema)%20%3E%20(property)%20ases%20%3E%20(items)%20%3E%20(property)%20asn">Link to this property</a>

country: string

<a href="#(resource)%20radar.entities.asns%20%3E%20(model)%20asn_botnet_threat_feed_response%20%3E%20(schema)%20%3E%20(property)%20ases%20%3E%20(items)%20%3E%20(property)%20country">Link to this property</a>

name: string

<a href="#(resource)%20radar.entities.asns%20%3E%20(model)%20asn_botnet_threat_feed_response%20%3E%20(schema)%20%3E%20(property)%20ases%20%3E%20(items)%20%3E%20(property)%20name">Link to this property</a>

rank: number

<a href="#(resource)%20radar.entities.asns%20%3E%20(model)%20asn_botnet_threat_feed_response%20%3E%20(schema)%20%3E%20(property)%20ases%20%3E%20(items)%20%3E%20(property)%20rank">Link to this property</a>

rankChange?: number

<a href="#(resource)%20radar.entities.asns%20%3E%20(model)%20asn_botnet_threat_feed_response%20%3E%20(schema)%20%3E%20(property)%20ases%20%3E%20(items)%20%3E%20(property)%20rankChange">Link to this property</a>

</details>

<a href="#(resource)%20radar.entities.asns%20%3E%20(model)%20asn_botnet_threat_feed_response%20%3E%20(schema)%20%3E%20(property)%20ases">Link to this property</a>

<details>

<summary>

meta: Meta {date, total, compareDate }

</summary>

date: string

<a href="#(resource)%20radar.entities.asns%20%3E%20(model)%20asn_botnet_threat_feed_response%20%3E%20(schema)%20%3E%20(property)%20meta%20%3E%20(property)%20date">Link to this property</a>

total: number

<a href="#(resource)%20radar.entities.asns%20%3E%20(model)%20asn_botnet_threat_feed_response%20%3E%20(schema)%20%3E%20(property)%20meta%20%3E%20(property)%20total">Link to this property</a>

compareDate?: string

<a href="#(resource)%20radar.entities.asns%20%3E%20(model)%20asn_botnet_threat_feed_response%20%3E%20(schema)%20%3E%20(property)%20meta%20%3E%20(property)%20compareDate">Link to this property</a>

</details>

<a href="#(resource)%20radar.entities.asns%20%3E%20(model)%20asn_botnet_threat_feed_response%20%3E%20(schema)%20%3E%20(property)%20meta">Link to this property</a>

</details>

[Link to this property](<#(resource)%20radar.entities.asns%20%3E%20(model)%20asn_botnet_threat_feed_response%20%3E%20(schema)>)

### Get AS rankings by botnet threat feed activity

TypeScript

HTTPTypeScriptPythonGoTerraform

```
import Cloudflare from 'cloudflare';

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

const response = await client.radar.entities.asns.botnetThreatFeed();

console.log(response.ases);
```

200 example

```
{
  "result": {
    "ases": [
      {
        "asn": 4134,
        "country": "CN",
        "name": "CHINANET-BACKBONE",
        "rank": 1,
        "rankChange": -2
      }
    ],
    "meta": {
      "date": "2026-02-04T00:00:00Z",
      "total": 50,
      "compareDate": "2026-01-28T00:00:00Z"
    }
  },
  "success": true
}
```

##### Returns Examples

200 example

```
{
  "result": {
    "ases": [
      {
        "asn": 4134,
        "country": "CN",
        "name": "CHINANET-BACKBONE",
        "rank": 1,
        "rankChange": -2
      }
    ],
    "meta": {
      "date": "2026-02-04T00:00:00Z",
      "total": 50,
      "compareDate": "2026-01-28T00:00:00Z"
    }
  },
  "success": true
}
```