Analytics

Get cross-platform analytics

Read private saved reports for all collected destinations, without a 50-post sample or live provider calls. Cold or invalidated reports use a globally limited read-only builder; busy admission returns 429 with Retry-After: 60 and database failures return 503. Same-filter saved results can be retained with snapshot.stale=true. measuredAt is collection time and snapshot.generatedAt is preparation time. Production reads check the durable generation directly, without an additional edge-cache delay after collection completes. Period mode reports observed counter growth, including older content; Content mode reports lifetime performance of content published in the range. Totals, current, chart and breakdown share mode and filters. Rankings contain up to twenty destinations. POST /v1/analytics/refresh queues collection; GET that route reports progress. GET /v1/analytics/methodology defines reconciliation and freshness.

get/v1/analytics

Request

  • Base URL: https://api.postlake.dev
  • URL: https://api.postlake.dev/v1/analytics
  • Auth: bearerAuth (a scheme the document does not define)

Query parameters

periodstring
profilestring

Profile username. Omit for the whole workspace.

mode'period' | 'content'

Observed period activity, or lifetime performance of content published in the range.

sort'views' | 'likes' | 'comments' | 'engagement' | 'engagementRate' | 'impressions' | 'clicks'

Rank the complete matching destination population before limiting to 20. Unavailable readings sort last. Rates require a positive reported audience count.

channelstring

Connected social account ID. Shared posts contribute only matching destinations.

networkstring

Optional platform name.

fromstring date

Inclusive first UTC date, YYYY-MM-DD.

tostring date

Inclusive last UTC date, YYYY-MM-DD. Maximum range 365 days.

agentstring

Stable creator client ID, not display name. Unknown historical attribution is not inferred.

origin'dashboard' | 'api' | 'agent'

Recorded interface, separate from creator identity. Account-wide supplements are omitted for actor/interface filters.

Response

Success

periodstring required
sincestring date-time required
mode'period' | 'content'
untilstring date
measuredAtstring date-time nullable
rankingScope'destinations'
rankingMetric'views' | 'likes' | 'comments' | 'engagement' | 'engagementRate' | 'impressions' | 'clicks'
nativeExtrasBasis'latest_lifetime'

Supplemental native extras are lifetime counters, never period activity.

postsinteger required

Distinct posts with collected readings published in the range, not every published post.

methodologyUrlstring uri

Machine-readable metric and reconciliation definitions.

currentobject nullable

Selected-mode totals for the requested window. Period: observed activity. Content: lifetime results of published content.

previousobject nullable

Same mode and filters in the preceding equal-length window. Null means no usable observations.

timeseriesobject[]

UTC daily observed growth in Period mode, or lifetime results by publication date in Content mode. Includes likes, comments and engagementRate. A daily rate is null without usable audience counts, not zero.

byChannelobject[]

One row per social account with readings. Optional connected distinguishes live connections from retained disconnected history; disconnected accounts can have available post metrics. Same verified identity/destination in the same profile reuses its channel ID on reconnection. Native profile insights in account are separate from post totals. Optional accountPeriod gives days (30) and capturedAt for the independent rolling profile window; followers is current or null. Threads account.views means profile views. Profile-only rows have posts=0, available=false and empty reports for post metrics. Native readings are omitted with custom dates, agent or origin filters. fieldCoverage describes returned post counters, not historical daily coverage.

topPostsobject[]

Up to 20 ranked destinations across the complete matching population, with optional thumbnailUrl. A shared post can appear more than once.

derivedobject

Engagement, blended engagement rate and CTR. See methodology for denominators.

Changes

No recorded changes to this operation across all 1 revision of this API.