Aggregate Event Counts

Get unique, total, or average data for a set of events over N days, weeks, or months. The Query API has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries.

Query Params
integer
required

Required if using service account to authenticate request.

integer

The id of the workspace if applicable.

string
required

The event or events that you wish to get data for, encoded as a JSON array. Example format: "["play song", "log in", "add playlist"]".

string
enum
required

The analysis type you would like to get data for - such as general, unique, or average events. Valid values: "general", "unique", or "average".

Allowed:
string
enum
required

This can be "minute", "hour", "day", "week", or "month". It determines the level of granularity of the data you get back. Note that you cannot get hourly uniques.

Allowed:
integer

The number of "units" to return data for - minutes, hours, days, weeks, or months. 1 will return data for the current unit (minute, hour, day, week or month). 2 will return the current and previous units, and so on. Specify either interval or from_date and to_date.

string
required

The date in yyyy-mm-dd format to begin querying from. This date is inclusive.

string
required

The date in yyyy-mm-dd format to query to. This date is inclusive.

string
enum

The data return format, such as JSON or CSV. Options: "json" (default), "csv".

Allowed:
Response

Language
Credentials
:
URL
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json