## Get bots HTTP requests distribution by dimension `radar.bots.summary(Literal["BOT", "BOT_KIND", "BOT_OPERATOR", "BOT_CATEGORY"]dimension, BotSummaryParams**kwargs) -> BotSummaryResponse` **get** `/radar/bots/summary/{dimension}` Retrieves an aggregated summary of bots HTTP requests grouped by the specified dimension. ### Parameters - `dimension: Literal["BOT", "BOT_KIND", "BOT_OPERATOR", "BOT_CATEGORY"]` Specifies the attribute by which to group the results. - `"BOT"` - `"BOT_KIND"` - `"BOT_OPERATOR"` - `"BOT_CATEGORY"` - `asn: Optional[Sequence[str]]` 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: Optional[Sequence[str]]` Filters results by bot name. - `bot_category: Optional[List[Literal["SEARCH_ENGINE_CRAWLER", "SEARCH_ENGINE_OPTIMIZATION", "MONITORING_AND_ANALYTICS", 13 more]]]` Filters results by bot category. - `"SEARCH_ENGINE_CRAWLER"` - `"SEARCH_ENGINE_OPTIMIZATION"` - `"MONITORING_AND_ANALYTICS"` - `"ADVERTISING_AND_MARKETING"` - `"SOCIAL_MEDIA_MARKETING"` - `"PAGE_PREVIEW"` - `"ACADEMIC_RESEARCH"` - `"SECURITY"` - `"ACCESSIBILITY"` - `"WEBHOOKS"` - `"FEED_FETCHER"` - `"AI_CRAWLER"` - `"AGGREGATOR"` - `"AI_ASSISTANT"` - `"AI_SEARCH"` - `"ARCHIVER"` - `bot_kind: Optional[List[Literal["AGENT", "BOT"]]]` Filters results by bot kind. Deprecated: the Verified Bot / Signed Agent distinction is being removed. - `"AGENT"` - `"BOT"` - `bot_operator: Optional[Sequence[str]]` Filters results by bot operator. - `bot_verification_status: Optional[List[Literal["VERIFIED"]]]` Filters results by bot verification status (Verified vs. Unverified). - `"VERIFIED"` - `continent: Optional[Sequence[str]]` 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. - `date_end: Optional[Sequence[Union[str, datetime]]]` End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected. - `date_range: Optional[Sequence[str]]` Filters results by relative date range ending at the current time, with each value producing a separate series. Use `d` for days (up to `364d`) or `w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters). - `date_start: Optional[Sequence[Union[str, datetime]]]` Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected. - `format: Optional[Literal["JSON", "CSV"]]` Format in which results will be returned. - `"JSON"` - `"CSV"` - `limit_per_group: Optional[int]` 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. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2. - `location: Optional[Sequence[str]]` 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: Optional[Sequence[str]]` Array of names used to label the series in the response. ### Returns - `class BotSummaryResponse: …` - `meta: Meta` Metadata for the results. - `confidence_info: MetaConfidenceInfo` - `annotations: List[MetaConfidenceInfoAnnotation]` - `data_source: Literal["ALL", "AI_BOTS", "AI_GATEWAY", 22 more]` Data source for annotations. - `"ALL"` - `"AI_BOTS"` - `"AI_GATEWAY"` - `"BGP"` - `"BOTS"` - `"CONNECTION_ANOMALY"` - `"CT"` - `"DNS"` - `"DNS_MAGNITUDE"` - `"DNS_AS112"` - `"DOS"` - `"EMAIL_ROUTING"` - `"EMAIL_SECURITY"` - `"FW"` - `"FW_PG"` - `"HTTP"` - `"HTTP_CONTROL"` - `"HTTP_CRAWLER_REFERER"` - `"HTTP_ORIGINS"` - `"IQI"` - `"LEAKED_CREDENTIALS"` - `"NET"` - `"ROBOTS_TXT"` - `"SPEED"` - `"WORKERS_AI"` - `description: str` - `end_date: datetime` - `event_type: Literal["EVENT", "GENERAL", "OUTAGE", 3 more]` Event type for annotations. - `"EVENT"` - `"GENERAL"` - `"OUTAGE"` - `"PARTIAL_PROJECTION"` - `"PIPELINE"` - `"TRAFFIC_ANOMALY"` - `is_instantaneous: bool` Whether event is a single point in time or a time range. - `linked_url: str` - `start_date: datetime` - `tags: Optional[List[str]]` - `level: int` Provides an indication of how much confidence Cloudflare has in the data. - `date_range: List[MetaDateRange]` - `end_time: datetime` Adjusted end of date range. - `start_time: datetime` Adjusted start of date range. - `last_updated: datetime` Timestamp of the last dataset update. - `normalization: Literal["PERCENTAGE", "MIN0_MAX", "MIN_MAX", 5 more]` Normalization method applied to the results. Refer to [Normalization methods](https://edgetunnel-b2h.pages.dev/radar/concepts/normalization/). - `"PERCENTAGE"` - `"MIN0_MAX"` - `"MIN_MAX"` - `"RAW_VALUES"` - `"PERCENTAGE_CHANGE"` - `"ROLLING_AVERAGE"` - `"OVERLAPPED_PERCENTAGE"` - `"RATIO"` - `units: List[MetaUnit]` Measurement units for the results. - `name: str` - `value: str` - `summary_0: Dict[str, str]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.radar.bots.summary( dimension="BOT", ) print(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", "tags": [ "BOT_CLASS" ] } ], "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 } ```