Get post metrics
get_post_metricsHow the published posts did: one row per post and platform with views, reach, likes, comments, shares, saves and profileVisits as the platform reports them (a number it doesn't report is left out: Instagram reports profileVisits for feed posts and carousels, never for Reels), engagement (likes + comments + shares + saves), and lastSyncedAt. Each row also says what the post was made as: postType (single, carousel, video), style (the carousel style its slides were drawn in, if any) and durationSeconds (a video's length). The numbers are read live from Instagram, TikTok and X on every call, as the Analytics page does. A row with error could not be read this time (the account needs a reconnect, or TikTok has not given the video an id yet); its numbers are the last good ones. overview totals the posts Simplo published in the range. With groupBy (postType or style), overview.groups breaks it down: per format or carousel style, postCount (rows), totals and medians of each number over the rows that reported it, over every row in the range and not only the ones returned (style "none" holds pictures, videos and plain slides). Compare medians: one big post skews totals. With includeOutside: true, outside also lists the posts on the connected accounts that Simplo did not publish (made in the platform's app or another tool), with their numbers, sorted and limited the same way; they have a platformPostId and url instead of a postId. outside.accounts says which accounts were read and why any could not be (read: false with a reason, such as a reconnect; only Instagram and TikTok are read). On TikTok, unmatchedSimploPosts counts Simplo posts TikTok has not given a video id yet, which may appear among the outside posts. Use it before planning to see what worked: sort by engagement or reach, and pass includeOutside to count every post on the account; order: "asc" lists the posts that did worst first. Follower counts are in get_account_summary.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Posts published in the last 7, 30 or 90 days | |
| sort | No | recent (newest first), engagement, reach or views (highest first) | recent |
| limit | No | Rows to return (and outside rows, separately) | |
| order | No | desc (highest or newest first) or asc (lowest or oldest first: the posts that did worst); rows without the number come last either way | desc |
| postId | No | Only this post (published within days) | |
| groupBy | No | Break the overview down by postType (carousels against Reels and pictures) or style (one carousel style against another) | |
| platform | No | Only this platform | |
| projectId | Yes | Simplo project id (from list_projects) | |
| includeOutside | No | Also list the posts on the accounts that Simplo did not publish |