Skip to content
Start here

Get time series distribution of AI bots HTTP requests by dimension.

client.Radar.AI.Bots.TimeseriesGroups(ctx, dimension, query) (*AIBotTimeseriesGroupsResponse, error)
GET/radar/ai/bots/timeseries_groups/{dimension}

Retrieves the distribution of HTTP requests from AI bots, grouped by the specified dimension over time.

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 AIBotTimeseriesGroupsParamsDimensionUserAgent AIBotTimeseriesGroupsParamsDimension = "USER_AGENT"
const AIBotTimeseriesGroupsParamsDimensionCrawlPurpose AIBotTimeseriesGroupsParamsDimension = "CRAWL_PURPOSE"
const AIBotTimeseriesGroupsParamsDimensionIndustry AIBotTimeseriesGroupsParamsDimension = "INDUSTRY"
const AIBotTimeseriesGroupsParamsDimensionVertical AIBotTimeseriesGroupsParamsDimension = "VERTICAL"
const AIBotTimeseriesGroupsParamsDimensionContentType AIBotTimeseriesGroupsParamsDimension = "CONTENT_TYPE"
const AIBotTimeseriesGroupsParamsDimensionResponseStatus AIBotTimeseriesGroupsParamsDimension = "RESPONSE_STATUS"
const AIBotTimeseriesGroupsParamsDimensionResponseStatusCategory AIBotTimeseriesGroupsParamsDimension = "RESPONSE_STATUS_CATEGORY"
query AIBotTimeseriesGroupsParams
AggInterval param.Field[AIBotTimeseriesGroupsParamsAggInterval]Optional

Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to Aggregation intervals.

const AIBotTimeseriesGroupsParamsAggInterval15m AIBotTimeseriesGroupsParamsAggInterval = "15m"
const AIBotTimeseriesGroupsParamsAggInterval1h AIBotTimeseriesGroupsParamsAggInterval = "1h"
const AIBotTimeseriesGroupsParamsAggInterval1d AIBotTimeseriesGroupsParamsAggInterval = "1d"
const AIBotTimeseriesGroupsParamsAggInterval1w AIBotTimeseriesGroupsParamsAggInterval = "1w"
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[[]AIBotTimeseriesGroupsParamsContentType]Optional

Filters results by content type category.

const AIBotTimeseriesGroupsParamsContentTypeHTML AIBotTimeseriesGroupsParamsContentType = "HTML"
const AIBotTimeseriesGroupsParamsContentTypeImages AIBotTimeseriesGroupsParamsContentType = "IMAGES"
const AIBotTimeseriesGroupsParamsContentTypeJson AIBotTimeseriesGroupsParamsContentType = "JSON"
const AIBotTimeseriesGroupsParamsContentTypeJavascript AIBotTimeseriesGroupsParamsContentType = "JAVASCRIPT"
const AIBotTimeseriesGroupsParamsContentTypeCSS AIBotTimeseriesGroupsParamsContentType = "CSS"
const AIBotTimeseriesGroupsParamsContentTypePlainText AIBotTimeseriesGroupsParamsContentType = "PLAIN_TEXT"
const AIBotTimeseriesGroupsParamsContentTypeFonts AIBotTimeseriesGroupsParamsContentType = "FONTS"
const AIBotTimeseriesGroupsParamsContentTypeXml AIBotTimeseriesGroupsParamsContentType = "XML"
const AIBotTimeseriesGroupsParamsContentTypeYaml AIBotTimeseriesGroupsParamsContentType = "YAML"
const AIBotTimeseriesGroupsParamsContentTypeVideo AIBotTimeseriesGroupsParamsContentType = "VIDEO"
const AIBotTimeseriesGroupsParamsContentTypeAudio AIBotTimeseriesGroupsParamsContentType = "AUDIO"
const AIBotTimeseriesGroupsParamsContentTypeMarkdown AIBotTimeseriesGroupsParamsContentType = "MARKDOWN"
const AIBotTimeseriesGroupsParamsContentTypeDocuments AIBotTimeseriesGroupsParamsContentType = "DOCUMENTS"
const AIBotTimeseriesGroupsParamsContentTypeBinary AIBotTimeseriesGroupsParamsContentType = "BINARY"
const AIBotTimeseriesGroupsParamsContentTypeSerialization AIBotTimeseriesGroupsParamsContentType = "SERIALIZATION"
const AIBotTimeseriesGroupsParamsContentTypeOther AIBotTimeseriesGroupsParamsContentType = "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[AIBotTimeseriesGroupsParamsFormat]Optional

Format in which results will be returned.

const AIBotTimeseriesGroupsParamsFormatJson AIBotTimeseriesGroupsParamsFormat = "JSON"
const AIBotTimeseriesGroupsParamsFormatCsv AIBotTimeseriesGroupsParamsFormat = "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.

Normalization param.Field[AIBotTimeseriesGroupsParamsNormalization]Optional

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

const AIBotTimeseriesGroupsParamsNormalizationPercentage AIBotTimeseriesGroupsParamsNormalization = "PERCENTAGE"
const AIBotTimeseriesGroupsParamsNormalizationMin0Max AIBotTimeseriesGroupsParamsNormalization = "MIN0_MAX"
const AIBotTimeseriesGroupsParamsNormalizationPercentageChange AIBotTimeseriesGroupsParamsNormalization = "PERCENTAGE_CHANGE"
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[[]AIBotTimeseriesGroupsParamsResponseStatusCategory]Optional

Filters results by HTTP response status code category.

const AIBotTimeseriesGroupsParamsResponseStatusCategoryInformational AIBotTimeseriesGroupsParamsResponseStatusCategory = "INFORMATIONAL"
const AIBotTimeseriesGroupsParamsResponseStatusCategorySuccess AIBotTimeseriesGroupsParamsResponseStatusCategory = "SUCCESS"
const AIBotTimeseriesGroupsParamsResponseStatusCategoryRedirection AIBotTimeseriesGroupsParamsResponseStatusCategory = "REDIRECTION"
const AIBotTimeseriesGroupsParamsResponseStatusCategoryClientError AIBotTimeseriesGroupsParamsResponseStatusCategory = "CLIENT_ERROR"
const AIBotTimeseriesGroupsParamsResponseStatusCategoryServerError AIBotTimeseriesGroupsParamsResponseStatusCategory = "SERVER_ERROR"
UserAgent param.Field[[]string]Optional

Filters results by user agent.

Vertical param.Field[[]string]Optional

Filters results by vertical.

ReturnsExpand Collapse
type AIBotTimeseriesGroupsResponse struct{…}
Meta AIBotTimeseriesGroupsResponseMeta

Metadata for the results.

AggInterval AIBotTimeseriesGroupsResponseMetaAggInterval

Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to Aggregation intervals.

One of the following:
const AIBotTimeseriesGroupsResponseMetaAggIntervalFifteenMinutes AIBotTimeseriesGroupsResponseMetaAggInterval = "FIFTEEN_MINUTES"
const AIBotTimeseriesGroupsResponseMetaAggIntervalOneHour AIBotTimeseriesGroupsResponseMetaAggInterval = "ONE_HOUR"
const AIBotTimeseriesGroupsResponseMetaAggIntervalOneDay AIBotTimeseriesGroupsResponseMetaAggInterval = "ONE_DAY"
const AIBotTimeseriesGroupsResponseMetaAggIntervalOneWeek AIBotTimeseriesGroupsResponseMetaAggInterval = "ONE_WEEK"
const AIBotTimeseriesGroupsResponseMetaAggIntervalOneMonth AIBotTimeseriesGroupsResponseMetaAggInterval = "ONE_MONTH"
ConfidenceInfo AIBotTimeseriesGroupsResponseMetaConfidenceInfo
Annotations []AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotation
DataSource AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource

Data source for annotations.

One of the following:
const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAll AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"
const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"
const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"
const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBGP AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"
const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBots AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"
const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"
const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceCT AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CT"
const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNS AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"
const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"
const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"
const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDos AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"
const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"
const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"
const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFw AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW"
const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"
const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"
const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"
const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"
const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"
const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceIQI AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"
const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"
const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceNet AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "NET"
const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"
const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"
const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"
Description string
EndDate Time
formatdate-time
EventType AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType

Event type for annotations.

One of the following:
const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeEvent AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"
const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"
const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeOutage AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"
const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"
const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePipeline AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"
const AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "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 []AIBotTimeseriesGroupsResponseMetaDateRange
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 AIBotTimeseriesGroupsResponseMetaNormalization

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

One of the following:
const AIBotTimeseriesGroupsResponseMetaNormalizationPercentage AIBotTimeseriesGroupsResponseMetaNormalization = "PERCENTAGE"
const AIBotTimeseriesGroupsResponseMetaNormalizationMin0Max AIBotTimeseriesGroupsResponseMetaNormalization = "MIN0_MAX"
const AIBotTimeseriesGroupsResponseMetaNormalizationMinMax AIBotTimeseriesGroupsResponseMetaNormalization = "MIN_MAX"
const AIBotTimeseriesGroupsResponseMetaNormalizationRawValues AIBotTimeseriesGroupsResponseMetaNormalization = "RAW_VALUES"
const AIBotTimeseriesGroupsResponseMetaNormalizationPercentageChange AIBotTimeseriesGroupsResponseMetaNormalization = "PERCENTAGE_CHANGE"
const AIBotTimeseriesGroupsResponseMetaNormalizationRollingAverage AIBotTimeseriesGroupsResponseMetaNormalization = "ROLLING_AVERAGE"
const AIBotTimeseriesGroupsResponseMetaNormalizationOverlappedPercentage AIBotTimeseriesGroupsResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"
const AIBotTimeseriesGroupsResponseMetaNormalizationRatio AIBotTimeseriesGroupsResponseMetaNormalization = "RATIO"
Units []AIBotTimeseriesGroupsResponseMetaUnit

Measurement units for the results.

Name string
Value string
Serie0 AIBotTimeseriesGroupsResponseSerie0
Timestamps []Time

Get time series distribution of AI bots HTTP requests 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.TimeseriesGroups(
    context.TODO(),
    radar.AIBotTimeseriesGroupsParamsDimensionUserAgent,
    radar.AIBotTimeseriesGroupsParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.Meta)
}
{
  "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",
            "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"
        }
      ]
    },
    "serie_0": {
      "timestamps": [
        "2023-08-08T10:15:00Z"
      ]
    }
  },
  "success": true
}
Returns Examples
{
  "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",
            "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"
        }
      ]
    },
    "serie_0": {
      "timestamps": [
        "2023-08-08T10:15:00Z"
      ]
    }
  },
  "success": true
}