get_post_analytics
Fetch post-level metrics like impressions and engagements for a date range, with optional tag, profile, and pagination filters.
Instructions
Get post-level analytics (impressions, engagements, etc.) for posts within a date range. Supports filtering by Sprout tags via tag_ids or tagged_only. Responses include internal.tags.id by default so posts can be grouped by tag. Supports sort (e.g. lifetime.impressions:desc), timezone, page, all_pages auto-pagination, and guid_cursor for walking past the ~10k page cap. For a Tag Performance Report-style rollup, prefer get_tag_performance. IMPORTANT: The page parameter must be in the request body, not as a URL query parameter.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number (default: 1). Must be in request body, NOT URL. Ignored when all_pages is true unless starting a page walk. | |
| sort | No | Sort expressions, e.g. ['lifetime.impressions:desc'] or ['created_time:asc']. Ignored when guid_cursor is set (cursor mode always sorts by guid:asc). | |
| limit | No | Results per page (default 50, max 50 for posts). | |
| fields | No | Additional fields to include. Valid: 'created_time', 'perma_link', 'text', 'post_type', 'network', 'customer_profile_id', 'guid', 'internal.tags.id'. Defaults to those fields if omitted. | |
| metrics | Yes | Metrics to retrieve. All platforms: 'lifetime.impressions', 'lifetime.engagements', 'lifetime.reactions', 'lifetime.video_views', 'lifetime.saves', 'lifetime.comments_count', 'lifetime.post_shares_count'. Facebook only: 'lifetime.post_link_clicks', 'lifetime.post_content_clicks', 'lifetime.post_content_clicks_other'. Instagram: click metrics are NOT available (silently ignored by the API). INVALID (will error): 'lifetime.reach', 'lifetime.comments', 'lifetime.shares'. | |
| tag_ids | No | Only return posts that have at least one of these Sprout tag IDs. Use get_tags to discover IDs. Filter uses internal.tags.id.eq(...). | |
| timezone | No | ICANN timezone for the created_time filter (e.g. 'America/New_York'). Response timestamps stay in UTC. | |
| all_pages | No | If true, follow pagination automatically and return every post up to max_pages. Uses page numbers, or guid_cursor walks when guid_cursor is provided. | |
| max_pages | No | Cap on pages fetched when all_pages is true (default 40, 50 posts per page). | |
| guid_cursor | No | Last post guid from a previous page. Uses guid.gt(...) so you can walk past the ~10k page-number cap. Pass the last guid from the prior response and keep calling until an empty page. | |
| profile_ids | Yes | Array of customer_profile_id values to filter posts by. | |
| tagged_only | No | If true, only return posts that have at least one tag. Ignored when tag_ids is provided. | |
| created_time_end | Yes | End of the date range in ISO 8601 format (e.g. '2026-03-30T00:00:00'). | |
| created_time_start | Yes | Start of the date range in ISO 8601 format (e.g. '2026-03-23T00:00:00'). |