Guides

Analytics workflow

Read cached LinkedIn and X analytics through the Public API: accounts, KPI summaries, performance series, and top posts.

Public analytics endpoints are read-only and return cached/imported analytics from Postiv tables. Single-post analytics additionally attempts a live LinkedIn refresh. Its refresh object identifies the live fields and fetch time, or explicitly reports a cached fallback. Other analytics endpoints use cached data. LinkedIn data comes from imports and X data from the periodic X sync; no endpoint reads X live, and an X post is never refreshed live (its refresh object reports cached with reason x_periodic_sync).

accountId is required on every analytics endpoint: use an account id from GET /api/public/analytics/accounts (each maps to one LinkedIn profile, company page or X account) for per-account numbers, or accountId=all for an explicit workspace-wide aggregate. A workspace-wide answer is given per channel and never adds LinkedIn and X together; pass channel=linkedin or channel=x to narrow it.

Example

Top posts by impressions
curl "https://postiv.ai/api/public/analytics/top-posts?accountId=all&limit=10&sort=impressions" \
  -H "Authorization: Bearer pk_postiv_..."