analytics

access post statistics and engagement performance data. track likes, comments, shares, and impressions across all connected platforms.

get_post_stats

retrieve aggregated post statistics for a workspace. returns counts by status (draft, scheduled, published, failed).

> how many posts do i have?
  using antwork.get_post_stats

  [done] stats retrieved
  [info] 5 draft, 3 scheduled, 12 published, 1 failed
parameters
workspace_idstringoptional
workspace id or name. optional if user has only one workspace

get_performance

get LIFETIME engagement metrics on each published post. for per-day historical engagement (e.g. "what happened in the last 7 days"), use get_engagement_history instead.

> how are my posts performing lifetime?
  using antwork.get_performance

  [done] 15 published posts
  [info] 234 likes, 45 comments, 12 shares
parameters
workspace_idstringoptional
workspace id or name. optional if user has only one workspace
limitnumberoptional
max posts to return (default: 30, max: 50)

get_engagement_history

get historical per-day engagement for the workspace over the trailing N days. returns the REAL day-by-day engagement that actually happened during the window — not lifetime totals on posts published in the window. computed from daily snapshots of cumulative metrics.

> how many impressions did i get last week?
  using antwork.get_engagement_history

  [done] 7 days of data
  [info] this week: 12k impressions · last week: 8k
parameters
workspace_idstringoptional
workspace id or name. optional if user has only one workspace
daysnumberoptional
trailing window in days (1–365, default 30, includes today)

get_post_history

get the per-day historical metrics for a single post. each row contains cumulative lifetime totals as of that day plus deltas (engagement earned ON that day) per platform. perfect for "how did this post grow" or "did it stop earning likes".

> how did my mar 10 post grow over the first 7 days?
  using antwork.get_post_history

  [done] 7 history rows returned
  [info] peak day: mar 11 · +8 likes, +2 comments
parameters
post_idstringrequired
the post id to fetch history for
daysnumberoptional
optional trailing window in days (1–365). omit for full history.