Call it
curl https://api.peume.com/v1/call/get-post-analytics \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"source": "all",
"limit": 50,
"page": 1,
"sortBy": "date",
"order": "desc",
"tags": "job"
}
}'const res = await fetch("https://api.peume.com/v1/call/get-post-analytics", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"source": "all",
"limit": 50,
"page": 1,
"sortBy": "date",
"order": "desc",
"tags": "job"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/get-post-analytics",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"source": "all",
"limit": 50,
"page": 1,
"sortBy": "date",
"order": "desc",
"tags": "job"
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: get-post-analytics.
Parameters
postIdstringReturns analytics for a single post. Accepts Post IDs, External Post IDs and the platform's native post ID. IDs are auto-resolved to External Post analytics.
platformstringFilter by platform (default "all"). Send one platform or a comma-separated list, such as instagram,twitter,linkedin.
accountIdstringFilter by account ID. With a native postId, selects that account's copy of the post.
sourcestringFilter by post source: late (posted via API), external (synced from platform), all (default)
all · late · external
Example: all
fromDatestringInclusive lower bound (YYYY-MM-DD). Defaults to 90 days ago if omitted. Max range is 366 days.
toDatestringInclusive upper bound (YYYY-MM-DD). Defaults to today if omitted.
limitintegerPage size (default 50)
Example: 50
pageintegerPage number (default 1)
Example: 1
sortBystringSort by date, engagement, or a specific metric. Platform-specific metrics (follows, reposts, reels_skip_rate, ig_reels_*, completion_rate, profile_views, website_clicks) sort a null value as 0.
date · engagement · impressions · reach · likes · comments · shares · saves · clicks · views · follows · ig_reels_avg_watch_time …
Example: date
orderstringSort order
asc · desc
Example: desc
tagsstringComma-separated tags (at most 20). Lists only posts created through that carry every listed tag, matched exactly and case-sensitively. Up to 200 published posts can match within the date range; more returns 400 asking to narrow fromDate and toDate. Ignored when postId is set.
Example: job
viewstringfull returns the listing as before. summary leaves out the accounts list, each platform entry's copy of analytics, the impressionSources, audienceTypes, audienceCountries and retentionCurve maps, and mediaItems (thumbnailUrl stays). Ignored when postId is set.
full · summary
Example: full
