Skip to content
Start here

List bots

client.Radar.Bots.List(ctx, query) (*BotListResponse, error)
GET/radar/bots

Retrieves a list of bots.

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 BotListParams
BotCategory param.Field[BotListParamsBotCategory]optional

Filters results by bot category.

const BotListParamsBotCategorySearchEngineCrawler BotListParamsBotCategory = "SEARCH_ENGINE_CRAWLER"
const BotListParamsBotCategorySearchEngineOptimization BotListParamsBotCategory = "SEARCH_ENGINE_OPTIMIZATION"
const BotListParamsBotCategoryMonitoringAndAnalytics BotListParamsBotCategory = "MONITORING_AND_ANALYTICS"
const BotListParamsBotCategoryAdvertisingAndMarketing BotListParamsBotCategory = "ADVERTISING_AND_MARKETING"
const BotListParamsBotCategorySocialMediaMarketing BotListParamsBotCategory = "SOCIAL_MEDIA_MARKETING"
const BotListParamsBotCategoryPagePreview BotListParamsBotCategory = "PAGE_PREVIEW"
const BotListParamsBotCategoryAcademicResearch BotListParamsBotCategory = "ACADEMIC_RESEARCH"
const BotListParamsBotCategorySecurity BotListParamsBotCategory = "SECURITY"
const BotListParamsBotCategoryAccessibility BotListParamsBotCategory = "ACCESSIBILITY"
const BotListParamsBotCategoryWebhooks BotListParamsBotCategory = "WEBHOOKS"
const BotListParamsBotCategoryFeedFetcher BotListParamsBotCategory = "FEED_FETCHER"
const BotListParamsBotCategoryAICrawler BotListParamsBotCategory = "AI_CRAWLER"
const BotListParamsBotCategoryAggregator BotListParamsBotCategory = "AGGREGATOR"
const BotListParamsBotCategoryAIAssistant BotListParamsBotCategory = "AI_ASSISTANT"
const BotListParamsBotCategoryAISearch BotListParamsBotCategory = "AI_SEARCH"
const BotListParamsBotCategoryArchiver BotListParamsBotCategory = "ARCHIVER"
BotOperator param.Field[string]optional

Filters results by bot operator.

maxLength100
BotVerificationStatus param.Field[BotListParamsBotVerificationStatus]optional

Filters results by bot verification status.

const BotListParamsBotVerificationStatusVerified BotListParamsBotVerificationStatus = "VERIFIED"
Format param.Field[BotListParamsFormat]optional

Format in which results will be returned.

const BotListParamsFormatJson BotListParamsFormat = "JSON"
const BotListParamsFormatCsv BotListParamsFormat = "CSV"
Kind param.Field[BotListParamsKind]optional

Filters results by bot kind.

const BotListParamsKindAgent BotListParamsKind = "AGENT"
const BotListParamsKindBot BotListParamsKind = "BOT"
Limit param.Field[int64]optional

Limits the number of objects returned in the response.

exclusiveMinimum
minimum0
Offset param.Field[int64]optional

Skips the specified number of objects before fetching the results.

minimum0
ReturnsExpand Collapse
type BotListResponse struct{…}
Bots []BotListResponseBot
Category string

The category of the bot.

Description string

A summary for the bot (e.g., purpose).

Kind string

The kind of the bot.

Name string

The name of the bot.

Operator string

The organization that owns and operates the bot.

Slug string

A kebab-case identifier derived from the bot name.

UserAgentPatterns []string

List bots

package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/option"
  "github.com/cloudflare/cloudflare-go/radar"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  bots, err := client.Radar.Bots.List(context.TODO(), radar.BotListParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", bots.Bots)
}
{
  "result": {
    "bots": [
      {
        "category": "AI_CRAWLER",
        "description": "OpenAI/ChatGPT's web crawler",
        "kind": "AGENT",
        "name": "GPTBot",
        "operator": "OpenAI",
        "slug": "gptbot",
        "userAgentPatterns": [
          "GPTBot"
        ]
      }
    ]
  },
  "success": true
}
Returns Examples
{
  "result": {
    "bots": [
      {
        "category": "AI_CRAWLER",
        "description": "OpenAI/ChatGPT's web crawler",
        "kind": "AGENT",
        "name": "GPTBot",
        "operator": "OpenAI",
        "slug": "gptbot",
        "userAgentPatterns": [
          "GPTBot"
        ]
      }
    ]
  },
  "success": true
}