Skip to content
Start here

Get bot details

client.Radar.Bots.Get(ctx, botSlug, query) (*BotGetResponse, error)
GET/radar/bots/{bot_slug}

Retrieves the requested bot information.

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
botSlug string

Bot slug.

maxLength100
query BotGetParams
Format param.Field[BotGetParamsFormat]Optional

Format in which results will be returned.

const BotGetParamsFormatJson BotGetParamsFormat = "JSON"
const BotGetParamsFormatCsv BotGetParamsFormat = "CSV"
ReturnsExpand Collapse
type BotGetResponse struct{…}
Bot BotGetResponseBot
AccessLevel string

Who can operate the bot: DIRECT bots reach origins under their own identity, while INTERMEDIARY bots forward requests on behalf of another agent or a person.

Categories []string

The categories of the bot.

DeprecatedCategory string

The category of the bot. Deprecated: use categories.

ContentUse string

How the bot uses the content it fetches (e.g., immediate, reference or full).

Description string

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

DocumentationURL string

The link to the bot documentation.

DeprecatedKind string

The kind of the bot.

Name string

The name of the bot.

Operator string

The organization that owns and operates the bot.

DeprecatedOperatorURL string

The link to the bot documentation. Deprecated: use documentationUrl.

OperatorWebsiteURL string

The link to the operator’s website.

Slug string

A kebab-case identifier derived from the bot name.

UserAgentPatterns []string
UserAgents []string
SignatureAgentURL stringOptional

The URL of the agent’s Web Bot Auth resource. Null for bots not verified via request signature.

Get bot details

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"),
  )
  bot, err := client.Radar.Bots.Get(
    context.TODO(),
    "gptbot",
    radar.BotGetParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", bot.Bot)
}
{
  "result": {
    "bot": {
      "accessLevel": "DIRECT",
      "categories": [
        "AI_CRAWLER"
      ],
      "category": "AI_CRAWLER",
      "contentUse": "full",
      "description": "OpenAI/ChatGPT's web crawler",
      "documentationUrl": "https://platform.openai.com/docs/bots",
      "kind": "AGENT",
      "name": "GPTBot",
      "operator": "OpenAI",
      "operatorUrl": "https://platform.openai.com/docs/bots",
      "operatorWebsiteUrl": "https://openai.com",
      "slug": "gptbot",
      "userAgentPatterns": [
        "GPTBot"
      ],
      "userAgents": [
        "GPTBot"
      ],
      "signatureAgentUrl": "https://example.com/signature-agent"
    }
  },
  "success": true
}
Returns Examples
{
  "result": {
    "bot": {
      "accessLevel": "DIRECT",
      "categories": [
        "AI_CRAWLER"
      ],
      "category": "AI_CRAWLER",
      "contentUse": "full",
      "description": "OpenAI/ChatGPT's web crawler",
      "documentationUrl": "https://platform.openai.com/docs/bots",
      "kind": "AGENT",
      "name": "GPTBot",
      "operator": "OpenAI",
      "operatorUrl": "https://platform.openai.com/docs/bots",
      "operatorWebsiteUrl": "https://openai.com",
      "slug": "gptbot",
      "userAgentPatterns": [
        "GPTBot"
      ],
      "userAgents": [
        "GPTBot"
      ],
      "signatureAgentUrl": "https://example.com/signature-agent"
    }
  },
  "success": true
}