Analytics

Get top posts

Cached top posts with full metrics and time-limited media URLs, sortable including outlier sorts that surface posts that over-performed the account's own baseline.

GET/api/public/analytics/top-posts
cURLGET /api/public/analytics/top-posts
curl "https://postiv.ai/api/public/analytics/top-posts?accountId=all&limit=10&sort=date" \
  -H "Authorization: Bearer pk_postiv_..."
200Response
{
  "success": true,
  "posts": [
    {
      "id": "ap1...",
      "hook": "I lost my biggest client...",
      "postUrl": "https://linkedin.com/...",
      "mediaType": "text",
      "isLeadMagnet": false,
      "mediaUrls": [],
      "metrics": {
        "impressions": 12400,
        "engagements": 640,
        "engagementRate": 5.2
      },
      "outliers": {
        "engagementMultiplier": 2.1
      }
    }
  ]
}

Authorization

Requires an organization API key with the analytics:read scope, sent as Authorization: Bearer or x-api-key.

Query parameters

accountIduuid|'all'required

Alias: account_id.

limitintdefault: 25

1-100.

sortstringdefault: "date"
One of:dateengagementsimpressionsengagement_outlierreach_outliertype_outliertype_reach_outlier
periodint

Trailing days, 1-365. Default is all-time (no filter) if omitted and no start/end.

startstring
endstring

Response

Top posts with metrics and outlier scores.

posts[].iduuid
posts[].hook / postUrl / linkedinUrn / createdAt / mediaType / category / isLeadMagnet / lastFetchedAtmixed
posts[].mediaUrlsstring[]

Refreshed signed URLs.

posts[].metricsobject

{ impressions, engagements, engagementRate, reactions, comments, reshares, membersReached, postSaves, postSends, linkClicks, premiumCtaClicks, followersGainedFromContent, profileViewsFromContent, videoPlays, videoWatchTime, videoViewers }

posts[].outliersobject

{ weightedEngagementScore, impressionsMultiplier, engagementMultiplier, mediaTypeImpressionsMultiplier, mediaTypeEngagementMultiplier, calculatedAt, overallBaselineSampleSize, mediaTypeBaselineSampleSize }

posts[].metadataobject

{ postText, postLink }

Errors

400missing_account_id
404analytics_account_not_found

Good to know

  • Rows with no analytics id AND all-null impressions/engagements (queue-only, never imported) are filtered out: this only ranks posts that actually have analytics.