Skip to content
Start here

Get HTTP requests time series

client.radar.http.timeseries(HTTPTimeseriesParams { aggInterval, apiTraffic, asn, 18 more } query?, RequestOptionsoptions?): HTTPTimeseriesResponse { meta }
GET/radar/http/timeseries

Retrieves the HTTP requests 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: HTTPTimeseriesParams { aggInterval, apiTraffic, asn, 18 more }
aggInterval?: "15m" | "1h" | "1d" | "1w"

Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to Aggregation intervals. When omitted, the interval is auto-selected from the requested date range; finer intervals are only available for shorter ranges. If the requested interval is too granular for the date range, the request is rejected.

One of the following:
"15m"
"1h"
"1d"
"1w"
apiTraffic?: Array<"API" | "NON_API">

Filters results by API traffic classification. API traffic is identified by JSON or XML response content types on dynamic (non-cacheable) HTTP requests. Incompatible with the browserFamily, deviceType, httpProtocol, httpVersion, ipVersion, os, and tlsVersion filters/dimensions. When set, results can only be further filtered by location, continent, or Autonomous System.

One of the following:
"API"
"NON_API"
asn?: Array<string>

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.

botClass?: Array<"LIKELY_AUTOMATED" | "LIKELY_HUMAN">

Filters results by bot class. Refer to Bot classes.

One of the following:
"LIKELY_AUTOMATED"
"LIKELY_HUMAN"
browserFamily?: Array<"CHROME" | "EDGE" | "FIREFOX" | "SAFARI">

Filters results by browser family.

One of the following:
"CHROME"
"EDGE"
"FIREFOX"
"SAFARI"
contentType?: Array<"HTML" | "IMAGES" | "JSON" | 13 more>

Filters results by content type category. When set, results can only be further filtered by location, continent, or Autonomous System.

One of the following:
"HTML"
"IMAGES"
"JSON"
"JAVASCRIPT"
"CSS"
"PLAIN_TEXT"
"FONTS"
"XML"
"YAML"
"VIDEO"
"AUDIO"
"MARKDOWN"
"DOCUMENTS"
"BINARY"
"SERIALIZATION"
"OTHER"
continent?: Array<string>

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.

dateEnd?: Array<string>

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.

dateRange?: Array<string>

Filters results by relative date range ending at the current time, with each value producing a separate series. Use <n>d for days (up to 364d) or <n>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).

dateStart?: Array<string>

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.

deviceType?: Array<"DESKTOP" | "MOBILE" | "OTHER">

Filters results by device type.

One of the following:
"DESKTOP"
"MOBILE"
"OTHER"
format?: "JSON" | "CSV"

Format in which results will be returned.

One of the following:
"JSON"
"CSV"
geoId?: Array<string>

Filters results by Geolocation. Specify a comma-separated list of GeoNames IDs. Prefix with - to exclude geoIds from results. For example, -2267056,360689 excludes results from the 2267056 (Lisbon), but includes results from 5128638 (New York).

httpProtocol?: Array<"HTTP" | "HTTPS">

Filters results by HTTP protocol (HTTP vs. HTTPS).

One of the following:
"HTTP"
"HTTPS"
httpVersion?: Array<"HTTPv1" | "HTTPv2" | "HTTPv3">

Filters results by HTTP version.

One of the following:
"HTTPv1"
"HTTPv2"
"HTTPv3"
ipVersion?: Array<"IPv4" | "IPv6">

Filters results by IP version (Ipv4 vs. IPv6).

One of the following:
"IPv4"
"IPv6"
location?: Array<string>

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?: Array<string>

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

normalization?: "PERCENTAGE_CHANGE" | "MIN0_MAX"

Normalization method applied to the results. Refer to Normalization methods. PERCENTAGE_CHANGE requires exactly one comparison series (e.g. a control date range).

One of the following:
"PERCENTAGE_CHANGE"
"MIN0_MAX"
os?: Array<"WINDOWS" | "MACOSX" | "IOS" | 4 more>

Filters results by operating system.

One of the following:
"WINDOWS"
"MACOSX"
"IOS"
"ANDROID"
"CHROMEOS"
"LINUX"
"SMART_TV"
tlsVersion?: Array<"TLSv1_0" | "TLSv1_1" | "TLSv1_2" | 2 more>

Filters results by TLS version.

One of the following:
"TLSv1_0"
"TLSv1_1"
"TLSv1_2"
"TLSv1_3"
"TLSvQUIC"
ReturnsExpand Collapse
HTTPTimeseriesResponse { meta }
meta: Meta { aggInterval, confidenceInfo, dateRange, 3 more }

Metadata for the results.

aggInterval: "FIFTEEN_MINUTES" | "ONE_HOUR" | "ONE_DAY" | 2 more

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

One of the following:
"FIFTEEN_MINUTES"
"ONE_HOUR"
"ONE_DAY"
"ONE_WEEK"
"ONE_MONTH"
confidenceInfo: ConfidenceInfo { annotations, level }
annotations: Array<Annotation>
dataSource: "ALL" | "AI_BOTS" | "AI_GATEWAY" | 22 more

Data source for annotations.

One of the following:
"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: string
endDate: string
formatdate-time
eventType: "EVENT" | "GENERAL" | "OUTAGE" | 3 more

Event type for annotations.

One of the following:
"EVENT"
"GENERAL"
"OUTAGE"
"PARTIAL_PROJECTION"
"PIPELINE"
"TRAFFIC_ANOMALY"
isInstantaneous: boolean

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

linkedUrl: string
formaturi
startDate: string
formatdate-time
tags?: Array<string>
level: number

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

dateRange: Array<DateRange>
endTime: string

Adjusted end of date range.

formatdate-time
startTime: string

Adjusted start of date range.

formatdate-time
lastUpdated: string

Timestamp of the last dataset update.

formatdate-time
normalization: "PERCENTAGE" | "MIN0_MAX" | "MIN_MAX" | 5 more

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

One of the following:
"PERCENTAGE"
"MIN0_MAX"
"MIN_MAX"
"RAW_VALUES"
"PERCENTAGE_CHANGE"
"ROLLING_AVERAGE"
"OVERLAPPED_PERCENTAGE"
"RATIO"
units: Array<Unit>

Measurement units for the results.

name: string
value: string

Get HTTP requests time series

import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});

const response = await client.radar.http.timeseries();

console.log(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
}