Query analytics
Ask for one or more query types over a date range and get one result per type.
{
"success": true,
"requestId": "req_abc123",
"queryId": "",
"data": [
{ "parameter": "summary_metrics", "success": true, "data": [{ "pageviews": 1250, "unique_visitors": 890, "sessions": 1100 }] },
{ "parameter": "top_pages", "success": true, "data": [{ "name": "/", "pageviews": 450, "visitors": 320 }] }
],
"meta": { "parameters": ["summary_metrics", "top_pages"], "total_parameters": 2, "page": 1, "limit": 10, "filters_applied": 1 }
}Build the request
Pass one of these in the URL of POST /v1/query:
Not every query type supports every granularity or filter. GET /v1/query/types?include_meta=true lists what each accepts.
Pick a date range
Give one parameter its own range with { "name": "top_pages", "start_date": "2026-11-01", "end_date": "2026-11-15", "id": "first-half" }.
Filter results
Common fields are country, device_type, browser_name, os_name, path and referrer. Event properties filter as properties.<key> where the query type lists them. A rejected filter's error lists what that type accepts.
Batch several queries
Send an array of up to 25 request bodies, with at most 100 parameters in total.
[
{ "id": "this-month", "parameters": ["summary_metrics"], "preset": "this_month" },
{ "id": "last-month", "parameters": ["summary_metrics"], "preset": "last_month" }
]The response is { "success": true, "batch": true, "results": [...] }, one entry per request with its queryId. Send Accept: text/event-stream to get each result as a result event as soon as it's ready, then a done event.
Share a public overview
When a website's dashboard is public, anyone can read its unfiltered overview without a key. GET /v1/query/types marks those query types publicAccess: true. Filters, custom events, errors, vitals, profiles and revenue still need a key with access. Page, referrer and campaign labels in a public overview are visible to everyone, so check them before you share.
Related
How is this guide?