Skip to content
Start here

Get AI bots HTTP requests distribution by dimension

client.Radar.AI.Bots.SummaryV2(ctx, dimension, query) (*AIBotSummaryV2Response, error)
GET/radar/ai/bots/summary/{dimension}

Retrieves an aggregated summary of AI bots HTTP requests grouped by the specified dimension.

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

Specifies the attribute by which to group the results.

One of the following:
const AIBotSummaryV2ParamsDimensionUserAgent AIBotSummaryV2ParamsDimension = "USER_AGENT"
const AIBotSummaryV2ParamsDimensionCrawlPurpose AIBotSummaryV2ParamsDimension = "CRAWL_PURPOSE"
const AIBotSummaryV2ParamsDimensionIndustry AIBotSummaryV2ParamsDimension = "INDUSTRY"
const AIBotSummaryV2ParamsDimensionVertical AIBotSummaryV2ParamsDimension = "VERTICAL"
const AIBotSummaryV2ParamsDimensionContentType AIBotSummaryV2ParamsDimension = "CONTENT_TYPE"
const AIBotSummaryV2ParamsDimensionResponseStatus AIBotSummaryV2ParamsDimension = "RESPONSE_STATUS"
const AIBotSummaryV2ParamsDimensionResponseStatusCategory AIBotSummaryV2ParamsDimension = "RESPONSE_STATUS_CATEGORY"
query AIBotSummaryV2Params
ASN param.Field[[]string]Optional

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.

ContentType param.Field[[]AIBotSummaryV2ParamsContentType]Optional

Filters results by content type category.

const AIBotSummaryV2ParamsContentTypeHTML AIBotSummaryV2ParamsContentType = "HTML"
const AIBotSummaryV2ParamsContentTypeImages AIBotSummaryV2ParamsContentType = "IMAGES"
const AIBotSummaryV2ParamsContentTypeJson AIBotSummaryV2ParamsContentType = "JSON"
const AIBotSummaryV2ParamsContentTypeJavascript AIBotSummaryV2ParamsContentType = "JAVASCRIPT"
const AIBotSummaryV2ParamsContentTypeCSS AIBotSummaryV2ParamsContentType = "CSS"
const AIBotSummaryV2ParamsContentTypePlainText AIBotSummaryV2ParamsContentType = "PLAIN_TEXT"
const AIBotSummaryV2ParamsContentTypeFonts AIBotSummaryV2ParamsContentType = "FONTS"
const AIBotSummaryV2ParamsContentTypeXml AIBotSummaryV2ParamsContentType = "XML"
const AIBotSummaryV2ParamsContentTypeYaml AIBotSummaryV2ParamsContentType = "YAML"
const AIBotSummaryV2ParamsContentTypeVideo AIBotSummaryV2ParamsContentType = "VIDEO"
const AIBotSummaryV2ParamsContentTypeAudio AIBotSummaryV2ParamsContentType = "AUDIO"
const AIBotSummaryV2ParamsContentTypeMarkdown AIBotSummaryV2ParamsContentType = "MARKDOWN"
const AIBotSummaryV2ParamsContentTypeDocuments AIBotSummaryV2ParamsContentType = "DOCUMENTS"
const AIBotSummaryV2ParamsContentTypeBinary AIBotSummaryV2ParamsContentType = "BINARY"
const AIBotSummaryV2ParamsContentTypeSerialization AIBotSummaryV2ParamsContentType = "SERIALIZATION"
const AIBotSummaryV2ParamsContentTypeOther AIBotSummaryV2ParamsContentType = "OTHER"
Continent param.Field[[]string]Optional

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.

CrawlPurpose param.Field[[]string]Optional

Filters results by bot crawl purpose.

DateEnd param.Field[[]Time]Optional

End of the date range (inclusive).

DateRange param.Field[[]string]Optional

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]Optional

Start of the date range.

Format param.Field[AIBotSummaryV2ParamsFormat]Optional

Format in which results will be returned.

const AIBotSummaryV2ParamsFormatJson AIBotSummaryV2ParamsFormat = "JSON"
const AIBotSummaryV2ParamsFormatCsv AIBotSummaryV2ParamsFormat = "CSV"
Industry param.Field[[]string]Optional

Filters results by industry.

LimitPerGroup param.Field[int64]Optional

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]Optional

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]Optional

Array of names used to label the series in the response.

ResponseStatus param.Field[[]string]Optional

Filters results by HTTP response status code (e.g. 200, 403, 404). Only IANA-registered codes are accepted.

ResponseStatusCategory param.Field[[]AIBotSummaryV2ParamsResponseStatusCategory]Optional

Filters results by HTTP response status code category.

const AIBotSummaryV2ParamsResponseStatusCategoryInformational AIBotSummaryV2ParamsResponseStatusCategory = "INFORMATIONAL"
const AIBotSummaryV2ParamsResponseStatusCategorySuccess AIBotSummaryV2ParamsResponseStatusCategory = "SUCCESS"
const AIBotSummaryV2ParamsResponseStatusCategoryRedirection AIBotSummaryV2ParamsResponseStatusCategory = "REDIRECTION"
const AIBotSummaryV2ParamsResponseStatusCategoryClientError AIBotSummaryV2ParamsResponseStatusCategory = "CLIENT_ERROR"
const AIBotSummaryV2ParamsResponseStatusCategoryServerError AIBotSummaryV2ParamsResponseStatusCategory = "SERVER_ERROR"
UserAgent param.Field[[]string]Optional

Filters results by user agent.

Vertical param.Field[[]string]Optional

Filters results by vertical.

ReturnsExpand Collapse
type AIBotSummaryV2Response struct{…}
Meta AIBotSummaryV2ResponseMeta

Metadata for the results.

ConfidenceInfo AIBotSummaryV2ResponseMetaConfidenceInfo
Annotations []AIBotSummaryV2ResponseMetaConfidenceInfoAnnotation
DataSource AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource

Data source for annotations.

One of the following:
const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"
const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"
const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"
const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"
const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"
const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"
const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceCT AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CT"
const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"
const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"
const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"
const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"
const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"
const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"
const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW"
const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"
const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"
const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"
const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"
const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"
const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"
const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"
const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "NET"
const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"
const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"
const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"
Description string
EndDate Time
formatdate-time
EventType AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType

Event type for annotations.

One of the following:
const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"
const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"
const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"
const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"
const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"
const AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"
IsInstantaneous bool

Whether event is a single point in time or a time range.

LinkedURL string
formaturi
StartDate Time
formatdate-time
Tags []stringOptional
Level int64

Provides an indication of how much confidence Cloudflare has in the data.

DateRange []AIBotSummaryV2ResponseMetaDateRange
EndTime Time

Adjusted end of date range.

formatdate-time
StartTime Time

Adjusted start of date range.

formatdate-time
LastUpdated Time

Timestamp of the last dataset update.

formatdate-time
Normalization AIBotSummaryV2ResponseMetaNormalization

Normalization method applied to the results. Refer to Normalization methods.

One of the following:
const AIBotSummaryV2ResponseMetaNormalizationPercentage AIBotSummaryV2ResponseMetaNormalization = "PERCENTAGE"
const AIBotSummaryV2ResponseMetaNormalizationMin0Max AIBotSummaryV2ResponseMetaNormalization = "MIN0_MAX"
const AIBotSummaryV2ResponseMetaNormalizationMinMax AIBotSummaryV2ResponseMetaNormalization = "MIN_MAX"
const AIBotSummaryV2ResponseMetaNormalizationRawValues AIBotSummaryV2ResponseMetaNormalization = "RAW_VALUES"
const AIBotSummaryV2ResponseMetaNormalizationPercentageChange AIBotSummaryV2ResponseMetaNormalization = "PERCENTAGE_CHANGE"
const AIBotSummaryV2ResponseMetaNormalizationRollingAverage AIBotSummaryV2ResponseMetaNormalization = "ROLLING_AVERAGE"
const AIBotSummaryV2ResponseMetaNormalizationOverlappedPercentage AIBotSummaryV2ResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"
const AIBotSummaryV2ResponseMetaNormalizationRatio AIBotSummaryV2ResponseMetaNormalization = "RATIO"
Units []AIBotSummaryV2ResponseMetaUnit

Measurement units for the results.

Name string
Value string
Summary0 map[string, string]

Get AI bots HTTP requests distribution by dimension

package main

import (
  "context"
  "fmt"

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

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  response, err := client.Radar.AI.Bots.SummaryV2(
    context.TODO(),
    radar.AIBotSummaryV2ParamsDimensionUserAgent,
    radar.AIBotSummaryV2Params{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.Meta)
}
{
  "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": {
      "Amazonbot": "10.274394",
      "Bytespider": "8.381743",
      "facebookexternalhit": "63.40249"
    }
  },
  "success": true
}
Returns Examples
{
  "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": {
      "Amazonbot": "10.274394",
      "Bytespider": "8.381743",
      "facebookexternalhit": "63.40249"
    }
  },
  "success": true
}