Skip to content
Start here

Get AI markdown for agents reduction ratio time series

client.Radar.AI.MarkdownForAgents.Timeseries(ctx, query) (*AIMarkdownForAgentTimeseriesResponse, error)
GET/radar/ai/markdown_for_agents/timeseries

Retrieves the median HTML-to-markdown reduction ratio over time for AI agent requests.

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 AIMarkdownForAgentTimeseriesParams
AggInterval param.Field[AIMarkdownForAgentTimeseriesParamsAggInterval]Optional

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

const AIMarkdownForAgentTimeseriesParamsAggInterval15m AIMarkdownForAgentTimeseriesParamsAggInterval = "15m"
const AIMarkdownForAgentTimeseriesParamsAggInterval1h AIMarkdownForAgentTimeseriesParamsAggInterval = "1h"
const AIMarkdownForAgentTimeseriesParamsAggInterval1d AIMarkdownForAgentTimeseriesParamsAggInterval = "1d"
const AIMarkdownForAgentTimeseriesParamsAggInterval1w AIMarkdownForAgentTimeseriesParamsAggInterval = "1w"
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[AIMarkdownForAgentTimeseriesParamsFormat]Optional

Format in which results will be returned.

const AIMarkdownForAgentTimeseriesParamsFormatJson AIMarkdownForAgentTimeseriesParamsFormat = "JSON"
const AIMarkdownForAgentTimeseriesParamsFormatCsv AIMarkdownForAgentTimeseriesParamsFormat = "CSV"
Name param.Field[[]string]Optional

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

ReturnsExpand Collapse
type AIMarkdownForAgentTimeseriesResponse struct{…}
Meta AIMarkdownForAgentTimeseriesResponseMeta

Metadata for the results.

AggInterval AIMarkdownForAgentTimeseriesResponseMetaAggInterval

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

One of the following:
const AIMarkdownForAgentTimeseriesResponseMetaAggIntervalFifteenMinutes AIMarkdownForAgentTimeseriesResponseMetaAggInterval = "FIFTEEN_MINUTES"
const AIMarkdownForAgentTimeseriesResponseMetaAggIntervalOneHour AIMarkdownForAgentTimeseriesResponseMetaAggInterval = "ONE_HOUR"
const AIMarkdownForAgentTimeseriesResponseMetaAggIntervalOneDay AIMarkdownForAgentTimeseriesResponseMetaAggInterval = "ONE_DAY"
const AIMarkdownForAgentTimeseriesResponseMetaAggIntervalOneWeek AIMarkdownForAgentTimeseriesResponseMetaAggInterval = "ONE_WEEK"
const AIMarkdownForAgentTimeseriesResponseMetaAggIntervalOneMonth AIMarkdownForAgentTimeseriesResponseMetaAggInterval = "ONE_MONTH"
ConfidenceInfo AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfo
Annotations []AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotation
DataSource AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource

Data source for annotations.

One of the following:
const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAll AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"
const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"
const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"
const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"
const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBots AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"
const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"
const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceCT AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CT"
const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"
const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"
const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"
const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDos AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"
const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"
const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"
const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFw AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW"
const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"
const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"
const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"
const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"
const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"
const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"
const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"
const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceNet AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "NET"
const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"
const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"
const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"
Description string
EndDate Time
formatdate-time
EventType AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsEventType

Event type for annotations.

One of the following:
const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"
const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"
const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"
const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"
const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"
const AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AIMarkdownForAgentTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"
IsInstantaneous bool

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

LinkedURL string
formaturi
StartDate Time
formatdate-time
Level int64

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

DateRange []AIMarkdownForAgentTimeseriesResponseMetaDateRange
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 AIMarkdownForAgentTimeseriesResponseMetaNormalization

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

One of the following:
const AIMarkdownForAgentTimeseriesResponseMetaNormalizationPercentage AIMarkdownForAgentTimeseriesResponseMetaNormalization = "PERCENTAGE"
const AIMarkdownForAgentTimeseriesResponseMetaNormalizationMin0Max AIMarkdownForAgentTimeseriesResponseMetaNormalization = "MIN0_MAX"
const AIMarkdownForAgentTimeseriesResponseMetaNormalizationMinMax AIMarkdownForAgentTimeseriesResponseMetaNormalization = "MIN_MAX"
const AIMarkdownForAgentTimeseriesResponseMetaNormalizationRawValues AIMarkdownForAgentTimeseriesResponseMetaNormalization = "RAW_VALUES"
const AIMarkdownForAgentTimeseriesResponseMetaNormalizationPercentageChange AIMarkdownForAgentTimeseriesResponseMetaNormalization = "PERCENTAGE_CHANGE"
const AIMarkdownForAgentTimeseriesResponseMetaNormalizationRollingAverage AIMarkdownForAgentTimeseriesResponseMetaNormalization = "ROLLING_AVERAGE"
const AIMarkdownForAgentTimeseriesResponseMetaNormalizationOverlappedPercentage AIMarkdownForAgentTimeseriesResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"
const AIMarkdownForAgentTimeseriesResponseMetaNormalizationRatio AIMarkdownForAgentTimeseriesResponseMetaNormalization = "RATIO"
Units []AIMarkdownForAgentTimeseriesResponseMetaUnit

Measurement units for the results.

Name string
Value string

Get AI markdown for agents reduction ratio time series

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

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