Query Segmentation Report
Get data for an event, segmented and filtered by properties. The Query API has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries.
Request
- Base URLhttps://mixpanel.com/api/query
- Auth
- HTTP basic
- or HTTP basic
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
Required if using service account to authenticate request.
The id of the workspace if applicable.
The event that you wish to get data for. Note: this is a single event name, not an array.
The date in yyyy-mm-dd format to begin querying from. This date is inclusive.
The date in yyyy-mm-dd format to query to. This date is inclusive.
The property expression to segment the event on. See the expression to segment below.
This can be "minute", "hour", "day", or "month". This determines the buckets into which the property values that you segment on are placed. The default value is "day".
Optional parameter in lieu of 'unit' when 'type' is not 'general'. Determines the number of days your results are bucketed into can be used with or without 'from_date' and 'to_date' parameters.
An expression to filter events by. See the expression to segment below.
Return the top property values. Defaults to 60. Maximum value 10,000. This parameter does nothing if "on" is not specified.
This can be "general", "unique", or "average". If this is set to "unique", we return the unique count of events or property values. If set to "general", we return the total, including repeats. If set to "average", we return the average count. The default value is "general".
Can be set to "csv".
Response
Success.
Changes
No recorded changes to this operation across all 1 revision of this API.