---
title: Analytics Query
---

[Skip to content](#%5Ftop) 

[API Reference](https://developers.cloudflare.com/api/typescript)

Copy Markdown

Open in **Claude**

Open in **ChatGPT**

Open in **Cursor**

---

**Copy Markdown**

**View as Markdown**

# Analytics Query

##### [Query analytics summary](https://developers.cloudflare.com/api/typescript/resources/analytics%5Fquery/methods/summary)

client.analyticsQuery.summary(stringdataset, AnalyticsQuerySummaryParams { account\_id, filters, from, 3 more } params, RequestOptionsoptions?): [AnalyticsQuerySummaryResponse](https://developers.cloudflare.com/api/typescript/resources/analytics%5Fquery#%28resource%29%20analytics%5Fquery%20%3E%20%28model%29%20analytics%5Fquery%5Fsummary%5Fresponse%20%3E%20%28schema%29) { currentTotal, previousTotal } 

POST/accounts/{account\_id}/analytics/query/{dataset}/summary

##### [Query analytics timeseries](https://developers.cloudflare.com/api/typescript/resources/analytics%5Fquery/methods/timeseries)

client.analyticsQuery.timeseries(stringdataset, AnalyticsQueryTimeseriesParams { account\_id, filters, from, 4 more } params, RequestOptionsoptions?): [AnalyticsQueryTimeseriesResponse](https://developers.cloudflare.com/api/typescript/resources/analytics%5Fquery#%28resource%29%20analytics%5Fquery%20%3E%20%28model%29%20analytics%5Fquery%5Ftimeseries%5Fresponse%20%3E%20%28schema%29) { resolution, slots } 

POST/accounts/{account\_id}/analytics/query/{dataset}/timeseries

##### [Query analytics top-N](https://developers.cloudflare.com/api/typescript/resources/analytics%5Fquery/methods/top%5Fn)

client.analyticsQuery.topN(stringdataset, AnalyticsQueryTopNParams { account\_id, filters, from, 5 more } params, RequestOptionsoptions?): SinglePage<[AnalyticsQueryTopNResponse](https://developers.cloudflare.com/api/typescript/resources/analytics%5Fquery#%28resource%29%20analytics%5Fquery%20%3E%20%28model%29%20analytics%5Fquery%5Ftop%5Fn%5Fresponse%20%3E%20%28schema%29)\>

POST/accounts/{account\_id}/analytics/query/{dataset}/top-n

##### ModelsExpand Collapse 

AnalyticsQuerySummaryResponse { currentTotal, previousTotal } 

currentTotal: Array<Record<string, unknown\>\>

Aggregated stats for the requested time range.

previousTotal: Array<Record<string, unknown\>\>

Aggregated stats for the equivalent preceding time range, for trend comparison.

AnalyticsQueryTimeseriesResponse { resolution, slots } 

resolution: string

The resolution used for time bucketing.

slots: Array<Record<string, unknown\>\>

Time-bucketed result rows. Each slot contains a `time_bucket` field plus the requested stats and group-by dimensions.

AnalyticsQueryTopNResponse \= Record<string, unknown\>

Maps field names to values. Keys represent stat names and group-by column names. Values depend on the dataset (strings, numbers, booleans).

#### Analytics QueryData Security

#### Analytics QueryData SecurityContent Findings

##### [Top integrations by content findings](https://developers.cloudflare.com/api/typescript/resources/analytics%5Fquery/subresources/data%5Fsecurity/subresources/content%5Ffindings/methods/top%5Fn)

client.analyticsQuery.dataSecurity.contentFindings.topN(ContentFindingTopNParams { account\_id, filters, from, 2 more } params, RequestOptionsoptions?): SinglePage<[ContentFindingTopNResponse](https://developers.cloudflare.com/api/typescript/resources/analytics%5Fquery#%28resource%29%20analytics%5Fquery.data%5Fsecurity.content%5Ffindings%20%3E%20%28model%29%20content%5Ffinding%5Ftop%5Fn%5Fresponse%20%3E%20%28schema%29)\>

POST/accounts/{account\_id}/analytics/query/data-security/content-findings/top-n

##### ModelsExpand Collapse 

ContentFindingTopNResponse \= Record<string, unknown\>

Maps field names to values. Keys represent stat names and group-by column names. Values depend on the dataset (strings, numbers, booleans).

#### Analytics QueryData SecurityFindings

##### [Data security findings summary](https://developers.cloudflare.com/api/typescript/resources/analytics%5Fquery/subresources/data%5Fsecurity/subresources/findings/methods/summary)

client.analyticsQuery.dataSecurity.findings.summary(FindingSummaryParams { account\_id, filters, from, to } params, RequestOptionsoptions?): [FindingSummaryResponse](https://developers.cloudflare.com/api/typescript/resources/analytics%5Fquery#%28resource%29%20analytics%5Fquery.data%5Fsecurity.findings%20%3E%20%28model%29%20finding%5Fsummary%5Fresponse%20%3E%20%28schema%29) { currentTotal, previousTotal } 

POST/accounts/{account\_id}/analytics/query/data-security/findings/summary

##### [Data security findings timeseries](https://developers.cloudflare.com/api/typescript/resources/analytics%5Fquery/subresources/data%5Fsecurity/subresources/findings/methods/timeseries)

client.analyticsQuery.dataSecurity.findings.timeseries(FindingTimeseriesParams { account\_id, filters, from, to } params, RequestOptionsoptions?): [FindingTimeseriesResponse](https://developers.cloudflare.com/api/typescript/resources/analytics%5Fquery#%28resource%29%20analytics%5Fquery.data%5Fsecurity.findings%20%3E%20%28model%29%20finding%5Ftimeseries%5Fresponse%20%3E%20%28schema%29) { slots, resolution } 

POST/accounts/{account\_id}/analytics/query/data-security/findings/timeseries

##### ModelsExpand Collapse 

FindingSummaryResponse { currentTotal, previousTotal } 

currentTotal: Array<Record<string, unknown\>\>

Aggregated stats for the requested time range.

previousTotal: Array<Record<string, unknown\>\>

Aggregated stats for the equivalent preceding time range, for trend comparison.

FindingTimeseriesResponse { slots, resolution } 

Merged CASB and CDE findings timeseries result.

slots: Array<Record<string, unknown\>\>

Contains time-bucketed result rows. Each slot includes a `timestamp` plus `content` and `posture` maps with `cloud` and `saas` keys.

resolution?: string | null

Always null for this endpoint.