Run a custom insight query
analytics_insights_query[read-only] Read-only analytics query: one metric aggregated (median by default) over posts, broken down by up to a few dimensions (platform, weekday, hour, brand, campaign, postType, label:, arm), at a fixed post age window (48h / 7d / 30d / lifetime) so posts are compared fairly. Every row carries its sample size n; platforms that do not report the metric are listed in availability, never counted as 0. Pro plan or higher. Was query_insights (still callable for one release). Full description and schema: describe_tool {"name":"analytics_insights_query"}.
(Wraps POST /api/v2/insights/query.)
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "analytics_insights_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dateTo | No | e.g. "2026-11-20". ISO date or epoch ms. Default: now. | |
| format | No | e.g. "json". | json |
| metric | No | e.g. "impressions". Metric to measure. One of 19 values, e.g. "impressions", "views", "engagement". | impressions |
| window | No | e.g. "48h". | 7d |
| brandId | No | e.g. "brandId_123". | |
| filters | No | e.g. {"labels":["campaign:summer"]}. Fields: labels, excludeLabels, campaignId, experimentId, platforms. | |
| formula | No | e.g. {"series":{"A":{"metric":"impressions"}},"expression"… Fields: series, expression, format. | |
| dateFrom | No | e.g. "2026-11-01". ISO date or epoch ms (publish time). | |
| interval | No | e.g. "day". Adds a time series bucketed by publish date. | |
| breakdown | No | e.g. ["Example"]. | |
| aggregation | No | e.g. "sum". | median |
| tzOffsetMinutes | No | e.g. 1. |