Skip to content
Start here

Get AI bots HTTP requests time series

client.Radar.AI.Bots.Timeseries(ctx, query) (*AIBotTimeseriesResponse, error)
GET/radar/ai/bots/timeseries

Retrieves AI bots HTTP request volume 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
query AIBotTimeseriesParams
AggInterval param.Field[AIBotTimeseriesParamsAggInterval]Optional

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

const AIBotTimeseriesParamsAggInterval15m AIBotTimeseriesParamsAggInterval = "15m"
const AIBotTimeseriesParamsAggInterval1h AIBotTimeseriesParamsAggInterval = "1h"
const AIBotTimeseriesParamsAggInterval1d AIBotTimeseriesParamsAggInterval = "1d"
const AIBotTimeseriesParamsAggInterval1w AIBotTimeseriesParamsAggInterval = "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[[]AIBotTimeseriesParamsContentType]Optional

Filters results by content type category.

const AIBotTimeseriesParamsContentTypeHTML AIBotTimeseriesParamsContentType = "HTML"
const AIBotTimeseriesParamsContentTypeImages AIBotTimeseriesParamsContentType = "IMAGES"
const AIBotTimeseriesParamsContentTypeJson AIBotTimeseriesParamsContentType = "JSON"
const AIBotTimeseriesParamsContentTypeJavascript AIBotTimeseriesParamsContentType = "JAVASCRIPT"
const AIBotTimeseriesParamsContentTypeCSS AIBotTimeseriesParamsContentType = "CSS"
const AIBotTimeseriesParamsContentTypePlainText AIBotTimeseriesParamsContentType = "PLAIN_TEXT"
const AIBotTimeseriesParamsContentTypeFonts AIBotTimeseriesParamsContentType = "FONTS"
const AIBotTimeseriesParamsContentTypeXml AIBotTimeseriesParamsContentType = "XML"
const AIBotTimeseriesParamsContentTypeYaml AIBotTimeseriesParamsContentType = "YAML"
const AIBotTimeseriesParamsContentTypeVideo AIBotTimeseriesParamsContentType = "VIDEO"
const AIBotTimeseriesParamsContentTypeAudio AIBotTimeseriesParamsContentType = "AUDIO"
const AIBotTimeseriesParamsContentTypeMarkdown AIBotTimeseriesParamsContentType = "MARKDOWN"
const AIBotTimeseriesParamsContentTypeDocuments AIBotTimeseriesParamsContentType = "DOCUMENTS"
const AIBotTimeseriesParamsContentTypeBinary AIBotTimeseriesParamsContentType = "BINARY"
const AIBotTimeseriesParamsContentTypeSerialization AIBotTimeseriesParamsContentType = "SERIALIZATION"
const AIBotTimeseriesParamsContentTypeOther AIBotTimeseriesParamsContentType = "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[AIBotTimeseriesParamsFormat]Optional

Format in which results will be returned.

const AIBotTimeseriesParamsFormatJson AIBotTimeseriesParamsFormat = "JSON"
const AIBotTimeseriesParamsFormatCsv AIBotTimeseriesParamsFormat = "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[[]AIBotTimeseriesParamsResponseStatusCategory]Optional

Filters results by HTTP response status code category.

const AIBotTimeseriesParamsResponseStatusCategoryInformational AIBotTimeseriesParamsResponseStatusCategory = "INFORMATIONAL"
const AIBotTimeseriesParamsResponseStatusCategorySuccess AIBotTimeseriesParamsResponseStatusCategory = "SUCCESS"
const AIBotTimeseriesParamsResponseStatusCategoryRedirection AIBotTimeseriesParamsResponseStatusCategory = "REDIRECTION"
const AIBotTimeseriesParamsResponseStatusCategoryClientError AIBotTimeseriesParamsResponseStatusCategory = "CLIENT_ERROR"
const AIBotTimeseriesParamsResponseStatusCategoryServerError AIBotTimeseriesParamsResponseStatusCategory = "SERVER_ERROR"
UserAgent param.Field[[]string]Optional

Filters results by user agent.

Vertical param.Field[[]string]Optional

Filters results by vertical.

ReturnsExpand Collapse
type AIBotTimeseriesResponse struct{…}
Meta AIBotTimeseriesResponseMeta

Metadata for the results.

AggInterval AIBotTimeseriesResponseMetaAggInterval

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

One of the following:
const AIBotTimeseriesResponseMetaAggIntervalFifteenMinutes AIBotTimeseriesResponseMetaAggInterval = "FIFTEEN_MINUTES"
const AIBotTimeseriesResponseMetaAggIntervalOneHour AIBotTimeseriesResponseMetaAggInterval = "ONE_HOUR"
const AIBotTimeseriesResponseMetaAggIntervalOneDay AIBotTimeseriesResponseMetaAggInterval = "ONE_DAY"
const AIBotTimeseriesResponseMetaAggIntervalOneWeek AIBotTimeseriesResponseMetaAggInterval = "ONE_WEEK"
const AIBotTimeseriesResponseMetaAggIntervalOneMonth AIBotTimeseriesResponseMetaAggInterval = "ONE_MONTH"
ConfidenceInfo AIBotTimeseriesResponseMetaConfidenceInfo
Annotations []AIBotTimeseriesResponseMetaConfidenceInfoAnnotation
DataSource AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource

Data source for annotations.

One of the following:
const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAll AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"
const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"
const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"
const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"
const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBots AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"
const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"
const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceCT AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CT"
const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"
const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"
const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"
const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDos AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"
const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"
const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"
const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFw AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW"
const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"
const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"
const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"
const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"
const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"
const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"
const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"
const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceNet AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "NET"
const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"
const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"
const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"
Description string
EndDate Time
formatdate-time
EventType AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType

Event type for annotations.

One of the following:
const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"
const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"
const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"
const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"
const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"
const AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "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 []AIBotTimeseriesResponseMetaDateRange
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 AIBotTimeseriesResponseMetaNormalization

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

One of the following:
const AIBotTimeseriesResponseMetaNormalizationPercentage AIBotTimeseriesResponseMetaNormalization = "PERCENTAGE"
const AIBotTimeseriesResponseMetaNormalizationMin0Max AIBotTimeseriesResponseMetaNormalization = "MIN0_MAX"
const AIBotTimeseriesResponseMetaNormalizationMinMax AIBotTimeseriesResponseMetaNormalization = "MIN_MAX"
const AIBotTimeseriesResponseMetaNormalizationRawValues AIBotTimeseriesResponseMetaNormalization = "RAW_VALUES"
const AIBotTimeseriesResponseMetaNormalizationPercentageChange AIBotTimeseriesResponseMetaNormalization = "PERCENTAGE_CHANGE"
const AIBotTimeseriesResponseMetaNormalizationRollingAverage AIBotTimeseriesResponseMetaNormalization = "ROLLING_AVERAGE"
const AIBotTimeseriesResponseMetaNormalizationOverlappedPercentage AIBotTimeseriesResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"
const AIBotTimeseriesResponseMetaNormalizationRatio AIBotTimeseriesResponseMetaNormalization = "RATIO"
Units []AIBotTimeseriesResponseMetaUnit

Measurement units for the results.

Name string
Value string

Get AI bots HTTP requests time series

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.Timeseries(context.TODO(), radar.AIBotTimeseriesParams{

  })
  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"
        }
      ]
    }
  },
  "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"
        }
      ]
    }
  },
  "success": true
}