Get analytics
get_analyticsRetrieve aggregated post analytics for a saved search or ad-hoc entity set, broken down per comparison group. Query volume, engagement, time-series, themes, policy, network, tone, and channel metrics.
Instructions
Aggregated analytics for a scope of entities, broken down per comparison group. Scope with exactly one of savedSearchId (recommended — its groups, platforms, date range, and keyword filters all apply) or entityIds (ad-hoc, treated as a single group); the other parameters filter or override the scope. Metrics: post-volume (post counts + share of voice), engagement (likes/shares/replies), time-series (engagement over time), themes (messaging-theme breakdown; requires taxonomy), policy-issues, policy-entities (mentioned policymakers/bills with stance), network-analysis (mentioned people/orgs/events), tone-voice (writing tone + brand voice), brand-positioning, content-breakdown (by content type), channel-presence (per-entity accounts with follower counts). Content-analysis metrics report over the analyzed-post subset, so their denominators are smaller than raw post counts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dateTo | No | Only include posts published on or before this date (ISO 8601). A date-only value (`2026-01-31`) includes that whole day, UTC. Overrides the saved search's range end; its range start is kept unless `dateFrom` is also provided. | |
| metric | Yes | Which analytics breakdown to fetch. | |
| dateFrom | No | Only include posts published on or after this date (ISO 8601). A date-only value (`2026-01-31`) means the start of that day, UTC. Overrides the saved search's range start; its range end is kept unless `dateTo` is also provided. | |
| keywords | No | Comma-separated keywords to filter post content by (e.g. `sustainability,net zero`). Replaces the saved search's keyword filters. Cannot be combined with `booleanQuery`. | |
| taxonomy | No | Required for the themes metric: which messaging taxonomy to aggregate (product themes, corporate social responsibility, political campaign, or executive messaging). | |
| timezone | No | For time-series: IANA timezone for date bucketing (default America/New_York). | |
| breakdown | No | For engagement and time-series: set to platform for per-platform numbers (default none). | |
| entityIds | No | Comma-separated entity IDs (max 100) for an ad-hoc scope, treated as a single comparison group. Provide either this or `savedSearchId`. | |
| platforms | No | Comma-separated platforms to include. Valid values: facebook, instagram, linkedin, x, youtube, tiktok, bluesky. Overrides the saved search's platform filter. Omit to use the saved search's platforms (or all platforms for an ad-hoc scope). | |
| granularity | No | For time-series: time bucket size (default month). | |
| booleanQuery | No | Boolean keyword query matching the app's advanced search mode (e.g. `"net zero" AND (solar OR wind)`). Syntax: AND/OR/NOT (upper case), parentheses, quoted phrases with optional proximity ("health care"~3 = up to 3 words between, any phrase length, max 20), NEAR/N (either order) and THEN/N (ordered) between terms or groups, wildcards (elect*, wom?n), fuzzy (medicaid~1, max 2). Always use explicit operators between terms. Mixing AND or NOT with OR at the same depth is an error — parenthesize to make precedence explicit ((a AND b) OR c, (a OR b) NOT c). NEAR/THEN bind tighter than AND/OR — parenthesize a proximity expression that sits next to AND/OR ((a NEAR/5 b) OR c, (a OR b) NEAR/5 c). NOT is not allowed inside NEAR/THEN; exclude outside the proximity expression. Matching is exact-token, case- and accent-insensitive (no stemming) — cover word variants with OR or a wildcard (tariff OR tariffs, tariff*). Korean attaches particles to words, so put a trailing wildcard on each Korean term (검색*). Hindi is written in Devanagari and romanized, so OR both forms ((दोस्त OR dost)); Devanagari and Tamil matching ignores vowel signs, so expect some unrelated matches. Comments are ignored by search: // to the end of the line, <<< >>> inline or across lines. Full syntax: https://docs.alidade-ai.com/search-syntax. Replaces the saved search's keyword filters. Cannot be combined with the keyword parameters. | |
| keywordMatch | No | Whether posts must match `any` (default) or `all` of `keywords`. | |
| savedSearchId | No | ID of a saved search to scope the request to. Its comparison groups, platform filter, date range, and keyword filters all apply. Only entities your workspace can access are included; a saved search with none returns 422. Provide either this or `entityIds`. | |
| excludeKeywords | No | Comma-separated keywords that matching posts must not contain (exact word/phrase match). Replaces the saved search's keyword filters. Cannot be combined with `booleanQuery`. | |
| keywordMatchType | No | `exact` (default) matches the exact words or phrases only; `stemmed` also matches English word variants (run/running). Applies to `keywords`. |