# Bots ## 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 } ``` ## Get bot details `client.Radar.Bots.Get(ctx, botSlug, query) (*BotGetResponse, error)` **get** `/radar/bots/{bot_slug}` Retrieves the requested bot information. ### Parameters - `botSlug string` Bot slug. - `query BotGetParams` - `Format param.Field[BotGetParamsFormat]` Format in which results will be returned. - `const BotGetParamsFormatJson BotGetParamsFormat = "JSON"` - `const BotGetParamsFormatCsv BotGetParamsFormat = "CSV"` ### Returns - `type BotGetResponse struct{…}` - `Bot BotGetResponseBot` - `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. - `OperatorURL string` The link to the bot documentation. - `Slug string` A kebab-case identifier derived from the bot name. - `UserAgentPatterns []string` - `UserAgents []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"), ) bot, err := client.Radar.Bots.Get( context.TODO(), "gptbot", radar.BotGetParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", bot.Bot) } ``` #### Response ```json { "result": { "bot": { "category": "AI_CRAWLER", "description": "OpenAI/ChatGPT's web crawler", "kind": "AGENT", "name": "GPTBot", "operator": "OpenAI", "operatorUrl": "https://platform.openai.com/docs/bots", "slug": "gptbot", "userAgentPatterns": [ "GPTBot" ], "userAgents": [ "GPTBot" ] } }, "success": true } ``` ## Get bots HTTP requests distribution by dimension `client.Radar.Bots.Summary(ctx, dimension, query) (*BotSummaryResponse, error)` **get** `/radar/bots/summary/{dimension}` Retrieves an aggregated summary of bots HTTP requests grouped by the specified dimension. ### Parameters - `dimension BotSummaryParamsDimension` Specifies the attribute by which to group the results. - `const BotSummaryParamsDimensionBot BotSummaryParamsDimension = "BOT"` - `const BotSummaryParamsDimensionBotKind BotSummaryParamsDimension = "BOT_KIND"` - `const BotSummaryParamsDimensionBotOperator BotSummaryParamsDimension = "BOT_OPERATOR"` - `const BotSummaryParamsDimensionBotCategory BotSummaryParamsDimension = "BOT_CATEGORY"` - `query BotSummaryParams` - `ASN param.Field[[]string]` 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. - `Bot param.Field[[]string]` Filters results by bot name. - `BotCategory param.Field[[]BotSummaryParamsBotCategory]` Filters results by bot category. - `const BotSummaryParamsBotCategorySearchEngineCrawler BotSummaryParamsBotCategory = "SEARCH_ENGINE_CRAWLER"` - `const BotSummaryParamsBotCategorySearchEngineOptimization BotSummaryParamsBotCategory = "SEARCH_ENGINE_OPTIMIZATION"` - `const BotSummaryParamsBotCategoryMonitoringAndAnalytics BotSummaryParamsBotCategory = "MONITORING_AND_ANALYTICS"` - `const BotSummaryParamsBotCategoryAdvertisingAndMarketing BotSummaryParamsBotCategory = "ADVERTISING_AND_MARKETING"` - `const BotSummaryParamsBotCategorySocialMediaMarketing BotSummaryParamsBotCategory = "SOCIAL_MEDIA_MARKETING"` - `const BotSummaryParamsBotCategoryPagePreview BotSummaryParamsBotCategory = "PAGE_PREVIEW"` - `const BotSummaryParamsBotCategoryAcademicResearch BotSummaryParamsBotCategory = "ACADEMIC_RESEARCH"` - `const BotSummaryParamsBotCategorySecurity BotSummaryParamsBotCategory = "SECURITY"` - `const BotSummaryParamsBotCategoryAccessibility BotSummaryParamsBotCategory = "ACCESSIBILITY"` - `const BotSummaryParamsBotCategoryWebhooks BotSummaryParamsBotCategory = "WEBHOOKS"` - `const BotSummaryParamsBotCategoryFeedFetcher BotSummaryParamsBotCategory = "FEED_FETCHER"` - `const BotSummaryParamsBotCategoryAICrawler BotSummaryParamsBotCategory = "AI_CRAWLER"` - `const BotSummaryParamsBotCategoryAggregator BotSummaryParamsBotCategory = "AGGREGATOR"` - `const BotSummaryParamsBotCategoryAIAssistant BotSummaryParamsBotCategory = "AI_ASSISTANT"` - `const BotSummaryParamsBotCategoryAISearch BotSummaryParamsBotCategory = "AI_SEARCH"` - `const BotSummaryParamsBotCategoryArchiver BotSummaryParamsBotCategory = "ARCHIVER"` - `BotKind param.Field[[]BotSummaryParamsBotKind]` Filters results by bot kind. - `const BotSummaryParamsBotKindAgent BotSummaryParamsBotKind = "AGENT"` - `const BotSummaryParamsBotKindBot BotSummaryParamsBotKind = "BOT"` - `BotOperator param.Field[[]string]` Filters results by bot operator. - `BotVerificationStatus param.Field[[]BotSummaryParamsBotVerificationStatus]` Filters results by bot verification status (Verified vs. Unverified). - `const BotSummaryParamsBotVerificationStatusVerified BotSummaryParamsBotVerificationStatus = "VERIFIED"` - `Continent param.Field[[]string]` Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA. - `DateEnd param.Field[[]Time]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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). - `DateStart param.Field[[]Time]` Start of the date range. - `Format param.Field[BotSummaryParamsFormat]` Format in which results will be returned. - `const BotSummaryParamsFormatJson BotSummaryParamsFormat = "JSON"` - `const BotSummaryParamsFormatCsv BotSummaryParamsFormat = "CSV"` - `LimitPerGroup param.Field[int64]` Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. - `Location param.Field[[]string]` Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT. - `Name param.Field[[]string]` Array of names used to label the series in the response. ### Returns - `type BotSummaryResponse struct{…}` - `Meta BotSummaryResponseMeta` Metadata for the results. - `ConfidenceInfo BotSummaryResponseMetaConfidenceInfo` - `Annotations []BotSummaryResponseMetaConfidenceInfoAnnotation` - `DataSource BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAll BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBGP BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBots BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceCT BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNS BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDos BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFw BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceIQI BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceNet BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType BotSummaryResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const BotSummaryResponseMetaConfidenceInfoAnnotationsEventTypeEvent BotSummaryResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const BotSummaryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral BotSummaryResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const BotSummaryResponseMetaConfidenceInfoAnnotationsEventTypeOutage BotSummaryResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const BotSummaryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection BotSummaryResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const BotSummaryResponseMetaConfidenceInfoAnnotationsEventTypePipeline BotSummaryResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const BotSummaryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly BotSummaryResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []BotSummaryResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization BotSummaryResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const BotSummaryResponseMetaNormalizationPercentage BotSummaryResponseMetaNormalization = "PERCENTAGE"` - `const BotSummaryResponseMetaNormalizationMin0Max BotSummaryResponseMetaNormalization = "MIN0_MAX"` - `const BotSummaryResponseMetaNormalizationMinMax BotSummaryResponseMetaNormalization = "MIN_MAX"` - `const BotSummaryResponseMetaNormalizationRawValues BotSummaryResponseMetaNormalization = "RAW_VALUES"` - `const BotSummaryResponseMetaNormalizationPercentageChange BotSummaryResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const BotSummaryResponseMetaNormalizationRollingAverage BotSummaryResponseMetaNormalization = "ROLLING_AVERAGE"` - `const BotSummaryResponseMetaNormalizationOverlappedPercentage BotSummaryResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const BotSummaryResponseMetaNormalizationRatio BotSummaryResponseMetaNormalization = "RATIO"` - `Units []BotSummaryResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Summary0 map[string, 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"), ) response, err := client.Radar.Bots.Summary( context.TODO(), radar.BotSummaryParamsDimensionBot, radar.BotSummaryParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "result": { "meta": { "confidenceInfo": { "annotations": [ { "dataSource": "ALL", "description": "Cable cut in Tonga", "endDate": "2019-12-27T18:11:19.117Z", "eventType": "EVENT", "isInstantaneous": true, "linkedUrl": "https://example.com", "startDate": "2019-12-27T18:11:19.117Z" } ], "level": 0 }, "dateRange": [ { "endTime": "2022-09-17T10:22:57.555Z", "startTime": "2022-09-16T10:22:57.555Z" } ], "lastUpdated": "2019-12-27T18:11:19.117Z", "normalization": "PERCENTAGE", "units": [ { "name": "*", "value": "requests" } ] }, "summary_0": { "Facebook": "10.274394", "GPTBot": "63.40249", "GoogleBot": "8.381743" } }, "success": true } ``` ## Get bots HTTP requests time series `client.Radar.Bots.Timeseries(ctx, query) (*BotTimeseriesResponse, error)` **get** `/radar/bots/timeseries` Retrieves bots HTTP request volume over time. ### Parameters - `query BotTimeseriesParams` - `AggInterval param.Field[BotTimeseriesParamsAggInterval]` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const BotTimeseriesParamsAggInterval15m BotTimeseriesParamsAggInterval = "15m"` - `const BotTimeseriesParamsAggInterval1h BotTimeseriesParamsAggInterval = "1h"` - `const BotTimeseriesParamsAggInterval1d BotTimeseriesParamsAggInterval = "1d"` - `const BotTimeseriesParamsAggInterval1w BotTimeseriesParamsAggInterval = "1w"` - `ASN param.Field[[]string]` 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. - `Bot param.Field[[]string]` Filters results by bot name. - `BotCategory param.Field[[]BotTimeseriesParamsBotCategory]` Filters results by bot category. - `const BotTimeseriesParamsBotCategorySearchEngineCrawler BotTimeseriesParamsBotCategory = "SEARCH_ENGINE_CRAWLER"` - `const BotTimeseriesParamsBotCategorySearchEngineOptimization BotTimeseriesParamsBotCategory = "SEARCH_ENGINE_OPTIMIZATION"` - `const BotTimeseriesParamsBotCategoryMonitoringAndAnalytics BotTimeseriesParamsBotCategory = "MONITORING_AND_ANALYTICS"` - `const BotTimeseriesParamsBotCategoryAdvertisingAndMarketing BotTimeseriesParamsBotCategory = "ADVERTISING_AND_MARKETING"` - `const BotTimeseriesParamsBotCategorySocialMediaMarketing BotTimeseriesParamsBotCategory = "SOCIAL_MEDIA_MARKETING"` - `const BotTimeseriesParamsBotCategoryPagePreview BotTimeseriesParamsBotCategory = "PAGE_PREVIEW"` - `const BotTimeseriesParamsBotCategoryAcademicResearch BotTimeseriesParamsBotCategory = "ACADEMIC_RESEARCH"` - `const BotTimeseriesParamsBotCategorySecurity BotTimeseriesParamsBotCategory = "SECURITY"` - `const BotTimeseriesParamsBotCategoryAccessibility BotTimeseriesParamsBotCategory = "ACCESSIBILITY"` - `const BotTimeseriesParamsBotCategoryWebhooks BotTimeseriesParamsBotCategory = "WEBHOOKS"` - `const BotTimeseriesParamsBotCategoryFeedFetcher BotTimeseriesParamsBotCategory = "FEED_FETCHER"` - `const BotTimeseriesParamsBotCategoryAICrawler BotTimeseriesParamsBotCategory = "AI_CRAWLER"` - `const BotTimeseriesParamsBotCategoryAggregator BotTimeseriesParamsBotCategory = "AGGREGATOR"` - `const BotTimeseriesParamsBotCategoryAIAssistant BotTimeseriesParamsBotCategory = "AI_ASSISTANT"` - `const BotTimeseriesParamsBotCategoryAISearch BotTimeseriesParamsBotCategory = "AI_SEARCH"` - `const BotTimeseriesParamsBotCategoryArchiver BotTimeseriesParamsBotCategory = "ARCHIVER"` - `BotKind param.Field[[]BotTimeseriesParamsBotKind]` Filters results by bot kind. - `const BotTimeseriesParamsBotKindAgent BotTimeseriesParamsBotKind = "AGENT"` - `const BotTimeseriesParamsBotKindBot BotTimeseriesParamsBotKind = "BOT"` - `BotOperator param.Field[[]string]` Filters results by bot operator. - `BotVerificationStatus param.Field[[]BotTimeseriesParamsBotVerificationStatus]` Filters results by bot verification status (Verified vs. Unverified). - `const BotTimeseriesParamsBotVerificationStatusVerified BotTimeseriesParamsBotVerificationStatus = "VERIFIED"` - `Continent param.Field[[]string]` Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA. - `DateEnd param.Field[[]Time]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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). - `DateStart param.Field[[]Time]` Start of the date range. - `Format param.Field[BotTimeseriesParamsFormat]` Format in which results will be returned. - `const BotTimeseriesParamsFormatJson BotTimeseriesParamsFormat = "JSON"` - `const BotTimeseriesParamsFormatCsv BotTimeseriesParamsFormat = "CSV"` - `Location param.Field[[]string]` Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT. - `Name param.Field[[]string]` Array of names used to label the series in the response. ### Returns - `type BotTimeseriesResponse struct{…}` - `Meta BotTimeseriesResponseMeta` Metadata for the results. - `AggInterval BotTimeseriesResponseMetaAggInterval` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const BotTimeseriesResponseMetaAggIntervalFifteenMinutes BotTimeseriesResponseMetaAggInterval = "FIFTEEN_MINUTES"` - `const BotTimeseriesResponseMetaAggIntervalOneHour BotTimeseriesResponseMetaAggInterval = "ONE_HOUR"` - `const BotTimeseriesResponseMetaAggIntervalOneDay BotTimeseriesResponseMetaAggInterval = "ONE_DAY"` - `const BotTimeseriesResponseMetaAggIntervalOneWeek BotTimeseriesResponseMetaAggInterval = "ONE_WEEK"` - `const BotTimeseriesResponseMetaAggIntervalOneMonth BotTimeseriesResponseMetaAggInterval = "ONE_MONTH"` - `ConfidenceInfo BotTimeseriesResponseMetaConfidenceInfo` - `Annotations []BotTimeseriesResponseMetaConfidenceInfoAnnotation` - `DataSource BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAll BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBots BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceCT BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDos BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFw BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceNet BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []BotTimeseriesResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization BotTimeseriesResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const BotTimeseriesResponseMetaNormalizationPercentage BotTimeseriesResponseMetaNormalization = "PERCENTAGE"` - `const BotTimeseriesResponseMetaNormalizationMin0Max BotTimeseriesResponseMetaNormalization = "MIN0_MAX"` - `const BotTimeseriesResponseMetaNormalizationMinMax BotTimeseriesResponseMetaNormalization = "MIN_MAX"` - `const BotTimeseriesResponseMetaNormalizationRawValues BotTimeseriesResponseMetaNormalization = "RAW_VALUES"` - `const BotTimeseriesResponseMetaNormalizationPercentageChange BotTimeseriesResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const BotTimeseriesResponseMetaNormalizationRollingAverage BotTimeseriesResponseMetaNormalization = "ROLLING_AVERAGE"` - `const BotTimeseriesResponseMetaNormalizationOverlappedPercentage BotTimeseriesResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const BotTimeseriesResponseMetaNormalizationRatio BotTimeseriesResponseMetaNormalization = "RATIO"` - `Units []BotTimeseriesResponseMetaUnit` Measurement units for the results. - `Name string` - `Value 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"), ) response, err := client.Radar.Bots.Timeseries(context.TODO(), radar.BotTimeseriesParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "result": { "meta": { "aggInterval": "FIFTEEN_MINUTES", "confidenceInfo": { "annotations": [ { "dataSource": "ALL", "description": "Cable cut in Tonga", "endDate": "2019-12-27T18:11:19.117Z", "eventType": "EVENT", "isInstantaneous": true, "linkedUrl": "https://example.com", "startDate": "2019-12-27T18:11:19.117Z" } ], "level": 0 }, "dateRange": [ { "endTime": "2022-09-17T10:22:57.555Z", "startTime": "2022-09-16T10:22:57.555Z" } ], "lastUpdated": "2019-12-27T18:11:19.117Z", "normalization": "PERCENTAGE", "units": [ { "name": "*", "value": "requests" } ] } }, "success": true } ``` ## Get time series distribution of bots HTTP requests by dimension. `client.Radar.Bots.TimeseriesGroups(ctx, dimension, query) (*BotTimeseriesGroupsResponse, error)` **get** `/radar/bots/timeseries_groups/{dimension}` Retrieves the distribution of HTTP requests from bots, grouped by the specified dimension over time. ### Parameters - `dimension BotTimeseriesGroupsParamsDimension` Specifies the attribute by which to group the results. - `const BotTimeseriesGroupsParamsDimensionBot BotTimeseriesGroupsParamsDimension = "BOT"` - `const BotTimeseriesGroupsParamsDimensionBotKind BotTimeseriesGroupsParamsDimension = "BOT_KIND"` - `const BotTimeseriesGroupsParamsDimensionBotOperator BotTimeseriesGroupsParamsDimension = "BOT_OPERATOR"` - `const BotTimeseriesGroupsParamsDimensionBotCategory BotTimeseriesGroupsParamsDimension = "BOT_CATEGORY"` - `query BotTimeseriesGroupsParams` - `AggInterval param.Field[BotTimeseriesGroupsParamsAggInterval]` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const BotTimeseriesGroupsParamsAggInterval15m BotTimeseriesGroupsParamsAggInterval = "15m"` - `const BotTimeseriesGroupsParamsAggInterval1h BotTimeseriesGroupsParamsAggInterval = "1h"` - `const BotTimeseriesGroupsParamsAggInterval1d BotTimeseriesGroupsParamsAggInterval = "1d"` - `const BotTimeseriesGroupsParamsAggInterval1w BotTimeseriesGroupsParamsAggInterval = "1w"` - `ASN param.Field[[]string]` 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. - `Bot param.Field[[]string]` Filters results by bot name. - `BotCategory param.Field[[]BotTimeseriesGroupsParamsBotCategory]` Filters results by bot category. - `const BotTimeseriesGroupsParamsBotCategorySearchEngineCrawler BotTimeseriesGroupsParamsBotCategory = "SEARCH_ENGINE_CRAWLER"` - `const BotTimeseriesGroupsParamsBotCategorySearchEngineOptimization BotTimeseriesGroupsParamsBotCategory = "SEARCH_ENGINE_OPTIMIZATION"` - `const BotTimeseriesGroupsParamsBotCategoryMonitoringAndAnalytics BotTimeseriesGroupsParamsBotCategory = "MONITORING_AND_ANALYTICS"` - `const BotTimeseriesGroupsParamsBotCategoryAdvertisingAndMarketing BotTimeseriesGroupsParamsBotCategory = "ADVERTISING_AND_MARKETING"` - `const BotTimeseriesGroupsParamsBotCategorySocialMediaMarketing BotTimeseriesGroupsParamsBotCategory = "SOCIAL_MEDIA_MARKETING"` - `const BotTimeseriesGroupsParamsBotCategoryPagePreview BotTimeseriesGroupsParamsBotCategory = "PAGE_PREVIEW"` - `const BotTimeseriesGroupsParamsBotCategoryAcademicResearch BotTimeseriesGroupsParamsBotCategory = "ACADEMIC_RESEARCH"` - `const BotTimeseriesGroupsParamsBotCategorySecurity BotTimeseriesGroupsParamsBotCategory = "SECURITY"` - `const BotTimeseriesGroupsParamsBotCategoryAccessibility BotTimeseriesGroupsParamsBotCategory = "ACCESSIBILITY"` - `const BotTimeseriesGroupsParamsBotCategoryWebhooks BotTimeseriesGroupsParamsBotCategory = "WEBHOOKS"` - `const BotTimeseriesGroupsParamsBotCategoryFeedFetcher BotTimeseriesGroupsParamsBotCategory = "FEED_FETCHER"` - `const BotTimeseriesGroupsParamsBotCategoryAICrawler BotTimeseriesGroupsParamsBotCategory = "AI_CRAWLER"` - `const BotTimeseriesGroupsParamsBotCategoryAggregator BotTimeseriesGroupsParamsBotCategory = "AGGREGATOR"` - `const BotTimeseriesGroupsParamsBotCategoryAIAssistant BotTimeseriesGroupsParamsBotCategory = "AI_ASSISTANT"` - `const BotTimeseriesGroupsParamsBotCategoryAISearch BotTimeseriesGroupsParamsBotCategory = "AI_SEARCH"` - `const BotTimeseriesGroupsParamsBotCategoryArchiver BotTimeseriesGroupsParamsBotCategory = "ARCHIVER"` - `BotKind param.Field[[]BotTimeseriesGroupsParamsBotKind]` Filters results by bot kind. - `const BotTimeseriesGroupsParamsBotKindAgent BotTimeseriesGroupsParamsBotKind = "AGENT"` - `const BotTimeseriesGroupsParamsBotKindBot BotTimeseriesGroupsParamsBotKind = "BOT"` - `BotOperator param.Field[[]string]` Filters results by bot operator. - `BotVerificationStatus param.Field[[]BotTimeseriesGroupsParamsBotVerificationStatus]` Filters results by bot verification status (Verified vs. Unverified). - `const BotTimeseriesGroupsParamsBotVerificationStatusVerified BotTimeseriesGroupsParamsBotVerificationStatus = "VERIFIED"` - `Continent param.Field[[]string]` Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA. - `DateEnd param.Field[[]Time]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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). - `DateStart param.Field[[]Time]` Start of the date range. - `Format param.Field[BotTimeseriesGroupsParamsFormat]` Format in which results will be returned. - `const BotTimeseriesGroupsParamsFormatJson BotTimeseriesGroupsParamsFormat = "JSON"` - `const BotTimeseriesGroupsParamsFormatCsv BotTimeseriesGroupsParamsFormat = "CSV"` - `LimitPerGroup param.Field[int64]` Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. - `Location param.Field[[]string]` Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT. - `Name param.Field[[]string]` Array of names used to label the series in the response. ### Returns - `type BotTimeseriesGroupsResponse struct{…}` - `Meta BotTimeseriesGroupsResponseMeta` Metadata for the results. - `AggInterval BotTimeseriesGroupsResponseMetaAggInterval` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const BotTimeseriesGroupsResponseMetaAggIntervalFifteenMinutes BotTimeseriesGroupsResponseMetaAggInterval = "FIFTEEN_MINUTES"` - `const BotTimeseriesGroupsResponseMetaAggIntervalOneHour BotTimeseriesGroupsResponseMetaAggInterval = "ONE_HOUR"` - `const BotTimeseriesGroupsResponseMetaAggIntervalOneDay BotTimeseriesGroupsResponseMetaAggInterval = "ONE_DAY"` - `const BotTimeseriesGroupsResponseMetaAggIntervalOneWeek BotTimeseriesGroupsResponseMetaAggInterval = "ONE_WEEK"` - `const BotTimeseriesGroupsResponseMetaAggIntervalOneMonth BotTimeseriesGroupsResponseMetaAggInterval = "ONE_MONTH"` - `ConfidenceInfo BotTimeseriesGroupsResponseMetaConfidenceInfo` - `Annotations []BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotation` - `DataSource BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAll BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBGP BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBots BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceCT BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNS BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDos BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFw BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceIQI BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceNet BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeEvent BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeOutage BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePipeline BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []BotTimeseriesGroupsResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization BotTimeseriesGroupsResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const BotTimeseriesGroupsResponseMetaNormalizationPercentage BotTimeseriesGroupsResponseMetaNormalization = "PERCENTAGE"` - `const BotTimeseriesGroupsResponseMetaNormalizationMin0Max BotTimeseriesGroupsResponseMetaNormalization = "MIN0_MAX"` - `const BotTimeseriesGroupsResponseMetaNormalizationMinMax BotTimeseriesGroupsResponseMetaNormalization = "MIN_MAX"` - `const BotTimeseriesGroupsResponseMetaNormalizationRawValues BotTimeseriesGroupsResponseMetaNormalization = "RAW_VALUES"` - `const BotTimeseriesGroupsResponseMetaNormalizationPercentageChange BotTimeseriesGroupsResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const BotTimeseriesGroupsResponseMetaNormalizationRollingAverage BotTimeseriesGroupsResponseMetaNormalization = "ROLLING_AVERAGE"` - `const BotTimeseriesGroupsResponseMetaNormalizationOverlappedPercentage BotTimeseriesGroupsResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const BotTimeseriesGroupsResponseMetaNormalizationRatio BotTimeseriesGroupsResponseMetaNormalization = "RATIO"` - `Units []BotTimeseriesGroupsResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Serie0 BotTimeseriesGroupsResponseSerie0` - `Timestamps []Time` ### 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"), ) response, err := client.Radar.Bots.TimeseriesGroups( context.TODO(), radar.BotTimeseriesGroupsParamsDimensionBot, radar.BotTimeseriesGroupsParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "result": { "meta": { "aggInterval": "FIFTEEN_MINUTES", "confidenceInfo": { "annotations": [ { "dataSource": "ALL", "description": "Cable cut in Tonga", "endDate": "2019-12-27T18:11:19.117Z", "eventType": "EVENT", "isInstantaneous": true, "linkedUrl": "https://example.com", "startDate": "2019-12-27T18:11:19.117Z" } ], "level": 0 }, "dateRange": [ { "endTime": "2022-09-17T10:22:57.555Z", "startTime": "2022-09-16T10:22:57.555Z" } ], "lastUpdated": "2019-12-27T18:11:19.117Z", "normalization": "PERCENTAGE", "units": [ { "name": "*", "value": "requests" } ] }, "serie_0": { "timestamps": [ "2023-08-08T10:15:00Z" ] } }, "success": true } ``` # Web Crawlers ## Get crawler HTTP request distribution by dimension `client.Radar.Bots.WebCrawlers.Summary(ctx, dimension, query) (*BotWebCrawlerSummaryResponse, error)` **get** `/radar/bots/crawlers/summary/{dimension}` Retrieves an aggregated summary of HTTP requests from crawlers, grouped by the specified dimension. ### Parameters - `dimension BotWebCrawlerSummaryParamsDimension` Specifies the attribute by which to group the results. - `const BotWebCrawlerSummaryParamsDimensionClientType BotWebCrawlerSummaryParamsDimension = "CLIENT_TYPE"` - `const BotWebCrawlerSummaryParamsDimensionUserAgent BotWebCrawlerSummaryParamsDimension = "USER_AGENT"` - `const BotWebCrawlerSummaryParamsDimensionReferer BotWebCrawlerSummaryParamsDimension = "REFERER"` - `const BotWebCrawlerSummaryParamsDimensionCrawlReferRatio BotWebCrawlerSummaryParamsDimension = "CRAWL_REFER_RATIO"` - `const BotWebCrawlerSummaryParamsDimensionVertical BotWebCrawlerSummaryParamsDimension = "VERTICAL"` - `const BotWebCrawlerSummaryParamsDimensionIndustry BotWebCrawlerSummaryParamsDimension = "INDUSTRY"` - `query BotWebCrawlerSummaryParams` - `BotOperator param.Field[[]string]` Filters results by bot operator. - `ClientType param.Field[[]BotWebCrawlerSummaryParamsClientType]` Filters results by agent type. - `const BotWebCrawlerSummaryParamsClientTypeHuman BotWebCrawlerSummaryParamsClientType = "HUMAN"` - `const BotWebCrawlerSummaryParamsClientTypeNonAIBot BotWebCrawlerSummaryParamsClientType = "NON_AI_BOT"` - `const BotWebCrawlerSummaryParamsClientTypeAIBot BotWebCrawlerSummaryParamsClientType = "AI_BOT"` - `const BotWebCrawlerSummaryParamsClientTypeMixedPurpose BotWebCrawlerSummaryParamsClientType = "MIXED_PURPOSE"` - `DateEnd param.Field[[]Time]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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). - `DateStart param.Field[[]Time]` Start of the date range. - `Format param.Field[BotWebCrawlerSummaryParamsFormat]` Format in which results will be returned. - `const BotWebCrawlerSummaryParamsFormatJson BotWebCrawlerSummaryParamsFormat = "JSON"` - `const BotWebCrawlerSummaryParamsFormatCsv BotWebCrawlerSummaryParamsFormat = "CSV"` - `Industry param.Field[[]string]` Filters results by industry. - `LimitPerGroup param.Field[int64]` Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. - `Name param.Field[[]string]` Array of names used to label the series in the response. - `Vertical param.Field[[]string]` Filters results by vertical. ### Returns - `type BotWebCrawlerSummaryResponse struct{…}` - `Meta BotWebCrawlerSummaryResponseMeta` Metadata for the results. - `ConfidenceInfo BotWebCrawlerSummaryResponseMetaConfidenceInfo` - `Annotations []BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotation` - `DataSource BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAll BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBGP BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBots BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceCT BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNS BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDos BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFw BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceIQI BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceNet BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsEventTypeEvent BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsEventTypeOutage BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsEventTypePipeline BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []BotWebCrawlerSummaryResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization BotWebCrawlerSummaryResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const BotWebCrawlerSummaryResponseMetaNormalizationPercentage BotWebCrawlerSummaryResponseMetaNormalization = "PERCENTAGE"` - `const BotWebCrawlerSummaryResponseMetaNormalizationMin0Max BotWebCrawlerSummaryResponseMetaNormalization = "MIN0_MAX"` - `const BotWebCrawlerSummaryResponseMetaNormalizationMinMax BotWebCrawlerSummaryResponseMetaNormalization = "MIN_MAX"` - `const BotWebCrawlerSummaryResponseMetaNormalizationRawValues BotWebCrawlerSummaryResponseMetaNormalization = "RAW_VALUES"` - `const BotWebCrawlerSummaryResponseMetaNormalizationPercentageChange BotWebCrawlerSummaryResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const BotWebCrawlerSummaryResponseMetaNormalizationRollingAverage BotWebCrawlerSummaryResponseMetaNormalization = "ROLLING_AVERAGE"` - `const BotWebCrawlerSummaryResponseMetaNormalizationOverlappedPercentage BotWebCrawlerSummaryResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const BotWebCrawlerSummaryResponseMetaNormalizationRatio BotWebCrawlerSummaryResponseMetaNormalization = "RATIO"` - `Units []BotWebCrawlerSummaryResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Summary0 map[string, 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"), ) response, err := client.Radar.Bots.WebCrawlers.Summary( context.TODO(), radar.BotWebCrawlerSummaryParamsDimensionClientType, radar.BotWebCrawlerSummaryParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "result": { "meta": { "confidenceInfo": { "annotations": [ { "dataSource": "ALL", "description": "Cable cut in Tonga", "endDate": "2019-12-27T18:11:19.117Z", "eventType": "EVENT", "isInstantaneous": true, "linkedUrl": "https://example.com", "startDate": "2019-12-27T18:11:19.117Z" } ], "level": 0 }, "dateRange": [ { "endTime": "2022-09-17T10:22:57.555Z", "startTime": "2022-09-16T10:22:57.555Z" } ], "lastUpdated": "2019-12-27T18:11:19.117Z", "normalization": "PERCENTAGE", "units": [ { "name": "*", "value": "requests" } ] }, "summary_0": { "Claude": "63.40249", "DuckDuckGo": "10.274394", "Google": "8.381743" } }, "success": true } ``` ## Get time series of crawler HTTP request distribution by dimension `client.Radar.Bots.WebCrawlers.TimeseriesGroups(ctx, dimension, query) (*BotWebCrawlerTimeseriesGroupsResponse, error)` **get** `/radar/bots/crawlers/timeseries_groups/{dimension}` Retrieves the distribution of HTTP requests from crawlers, grouped by the specified dimension over time. ### Parameters - `dimension BotWebCrawlerTimeseriesGroupsParamsDimension` Specifies the attribute by which to group the results. - `const BotWebCrawlerTimeseriesGroupsParamsDimensionClientType BotWebCrawlerTimeseriesGroupsParamsDimension = "CLIENT_TYPE"` - `const BotWebCrawlerTimeseriesGroupsParamsDimensionUserAgent BotWebCrawlerTimeseriesGroupsParamsDimension = "USER_AGENT"` - `const BotWebCrawlerTimeseriesGroupsParamsDimensionReferer BotWebCrawlerTimeseriesGroupsParamsDimension = "REFERER"` - `const BotWebCrawlerTimeseriesGroupsParamsDimensionCrawlReferRatio BotWebCrawlerTimeseriesGroupsParamsDimension = "CRAWL_REFER_RATIO"` - `const BotWebCrawlerTimeseriesGroupsParamsDimensionVertical BotWebCrawlerTimeseriesGroupsParamsDimension = "VERTICAL"` - `const BotWebCrawlerTimeseriesGroupsParamsDimensionIndustry BotWebCrawlerTimeseriesGroupsParamsDimension = "INDUSTRY"` - `query BotWebCrawlerTimeseriesGroupsParams` - `AggInterval param.Field[BotWebCrawlerTimeseriesGroupsParamsAggInterval]` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const BotWebCrawlerTimeseriesGroupsParamsAggInterval15m BotWebCrawlerTimeseriesGroupsParamsAggInterval = "15m"` - `const BotWebCrawlerTimeseriesGroupsParamsAggInterval1h BotWebCrawlerTimeseriesGroupsParamsAggInterval = "1h"` - `const BotWebCrawlerTimeseriesGroupsParamsAggInterval1d BotWebCrawlerTimeseriesGroupsParamsAggInterval = "1d"` - `const BotWebCrawlerTimeseriesGroupsParamsAggInterval1w BotWebCrawlerTimeseriesGroupsParamsAggInterval = "1w"` - `BotOperator param.Field[[]string]` Filters results by bot operator. - `ClientType param.Field[[]BotWebCrawlerTimeseriesGroupsParamsClientType]` Filters results by agent type. - `const BotWebCrawlerTimeseriesGroupsParamsClientTypeHuman BotWebCrawlerTimeseriesGroupsParamsClientType = "HUMAN"` - `const BotWebCrawlerTimeseriesGroupsParamsClientTypeNonAIBot BotWebCrawlerTimeseriesGroupsParamsClientType = "NON_AI_BOT"` - `const BotWebCrawlerTimeseriesGroupsParamsClientTypeAIBot BotWebCrawlerTimeseriesGroupsParamsClientType = "AI_BOT"` - `const BotWebCrawlerTimeseriesGroupsParamsClientTypeMixedPurpose BotWebCrawlerTimeseriesGroupsParamsClientType = "MIXED_PURPOSE"` - `DateEnd param.Field[[]Time]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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). - `DateStart param.Field[[]Time]` Start of the date range. - `Format param.Field[BotWebCrawlerTimeseriesGroupsParamsFormat]` Format in which results will be returned. - `const BotWebCrawlerTimeseriesGroupsParamsFormatJson BotWebCrawlerTimeseriesGroupsParamsFormat = "JSON"` - `const BotWebCrawlerTimeseriesGroupsParamsFormatCsv BotWebCrawlerTimeseriesGroupsParamsFormat = "CSV"` - `Industry param.Field[[]string]` Filters results by industry. - `LimitPerGroup param.Field[int64]` Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. - `Name param.Field[[]string]` Array of names used to label the series in the response. - `Vertical param.Field[[]string]` Filters results by vertical. ### Returns - `type BotWebCrawlerTimeseriesGroupsResponse struct{…}` - `Meta BotWebCrawlerTimeseriesGroupsResponseMeta` Metadata for the results. - `AggInterval BotWebCrawlerTimeseriesGroupsResponseMetaAggInterval` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const BotWebCrawlerTimeseriesGroupsResponseMetaAggIntervalFifteenMinutes BotWebCrawlerTimeseriesGroupsResponseMetaAggInterval = "FIFTEEN_MINUTES"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaAggIntervalOneHour BotWebCrawlerTimeseriesGroupsResponseMetaAggInterval = "ONE_HOUR"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaAggIntervalOneDay BotWebCrawlerTimeseriesGroupsResponseMetaAggInterval = "ONE_DAY"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaAggIntervalOneWeek BotWebCrawlerTimeseriesGroupsResponseMetaAggInterval = "ONE_WEEK"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaAggIntervalOneMonth BotWebCrawlerTimeseriesGroupsResponseMetaAggInterval = "ONE_MONTH"` - `ConfidenceInfo BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfo` - `Annotations []BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotation` - `DataSource BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAll BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBGP BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBots BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceCT BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNS BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDos BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFw BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceIQI BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceNet BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeEvent BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeOutage BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePipeline BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []BotWebCrawlerTimeseriesGroupsResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization BotWebCrawlerTimeseriesGroupsResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const BotWebCrawlerTimeseriesGroupsResponseMetaNormalizationPercentage BotWebCrawlerTimeseriesGroupsResponseMetaNormalization = "PERCENTAGE"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaNormalizationMin0Max BotWebCrawlerTimeseriesGroupsResponseMetaNormalization = "MIN0_MAX"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaNormalizationMinMax BotWebCrawlerTimeseriesGroupsResponseMetaNormalization = "MIN_MAX"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaNormalizationRawValues BotWebCrawlerTimeseriesGroupsResponseMetaNormalization = "RAW_VALUES"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaNormalizationPercentageChange BotWebCrawlerTimeseriesGroupsResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaNormalizationRollingAverage BotWebCrawlerTimeseriesGroupsResponseMetaNormalization = "ROLLING_AVERAGE"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaNormalizationOverlappedPercentage BotWebCrawlerTimeseriesGroupsResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const BotWebCrawlerTimeseriesGroupsResponseMetaNormalizationRatio BotWebCrawlerTimeseriesGroupsResponseMetaNormalization = "RATIO"` - `Units []BotWebCrawlerTimeseriesGroupsResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Serie0 BotWebCrawlerTimeseriesGroupsResponseSerie0` - `Timestamps []Time` ### 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"), ) response, err := client.Radar.Bots.WebCrawlers.TimeseriesGroups( context.TODO(), radar.BotWebCrawlerTimeseriesGroupsParamsDimensionClientType, radar.BotWebCrawlerTimeseriesGroupsParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "result": { "meta": { "aggInterval": "FIFTEEN_MINUTES", "confidenceInfo": { "annotations": [ { "dataSource": "ALL", "description": "Cable cut in Tonga", "endDate": "2019-12-27T18:11:19.117Z", "eventType": "EVENT", "isInstantaneous": true, "linkedUrl": "https://example.com", "startDate": "2019-12-27T18:11:19.117Z" } ], "level": 0 }, "dateRange": [ { "endTime": "2022-09-17T10:22:57.555Z", "startTime": "2022-09-16T10:22:57.555Z" } ], "lastUpdated": "2019-12-27T18:11:19.117Z", "normalization": "PERCENTAGE", "units": [ { "name": "*", "value": "requests" } ] }, "serie_0": { "timestamps": [ "2023-08-08T10:15:00Z" ] } }, "success": true } ```