## List bots `client.Radar.Bots.List(ctx, query) (*BotListResponse, error)` **get** `/radar/bots` Retrieves a list of bots. ### Parameters - `query BotListParams` - `BotCategory param.Field[BotListParamsBotCategory]` 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]` Filters results by bot operator. - `BotVerificationStatus param.Field[BotListParamsBotVerificationStatus]` Filters results by bot verification status. - `const BotListParamsBotVerificationStatusVerified BotListParamsBotVerificationStatus = "VERIFIED"` - `Format param.Field[BotListParamsFormat]` Format in which results will be returned. - `const BotListParamsFormatJson BotListParamsFormat = "JSON"` - `const BotListParamsFormatCsv BotListParamsFormat = "CSV"` - `Kind param.Field[BotListParamsKind]` Filters results by bot kind. - `const BotListParamsKindAgent BotListParamsKind = "AGENT"` - `const BotListParamsKindBot BotListParamsKind = "BOT"` - `Limit param.Field[int64]` Limits the number of objects returned in the response. - `Offset param.Field[int64]` Skips the specified number of objects before fetching the results. ### Returns - `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` ### Example ```go 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) } ``` #### Response ```json { "result": { "bots": [ { "category": "AI_CRAWLER", "description": "OpenAI/ChatGPT's web crawler", "kind": "AGENT", "name": "GPTBot", "operator": "OpenAI", "slug": "gptbot", "userAgentPatterns": [ "GPTBot" ] } ] }, "success": true } ```