Call it
curl https://api.peume.com/v1/call/get-instagram-insights \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"accountId": "your accountId",
"metricType": "total_value"
}
}'const res = await fetch("https://api.peume.com/v1/call/get-instagram-insights", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"accountId": "your accountId",
"metricType": "total_value"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/get-instagram-insights",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"accountId": "your accountId",
"metricType": "total_value"
}
},
)
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-instagram-insights.
Parameters
accountIdRequiredstringThe SocialAccount ID for the Instagram account
metricsstringComma-separated list of metrics. Defaults to "reach,views,accounts_engaged,total_interactions". Valid metrics: reach, views, accounts_engaged, total_interactions, comments, likes, saves, shares, replies, reposts, follows_and_unfollows, profile_links_taps, profile_views, website_clicks. Only "reach" supports metricType=time_series. All other metrics (including follows_and_unfollows, profile_views and website_clicks) are total_value only. This is an Instagram Graph API limitation, not a one: the IG API returns no time-series data for these metrics. For a daily running follower count, u
fromDatestringStart date (YYYY-MM-DD). Defaults to 30 days ago.
toDatestringEnd date (YYYY-MM-DD). Defaults to today.
sincestringAlias of fromDate, kept for existing callers
untilstringAlias of toDate, kept for existing callers
metricTypestring"total_value" (default) returns aggregated totals and supports breakdowns. "time_series" returns daily values but only works with the "reach" metric.
time_series · total_value
Example: total_value
breakdownstringBreakdown dimension (only valid with metricType=total_value). Valid values per metric: reach and views take follow_type or media_product_type; follows_and_unfollows takes follow_type; profile_links_taps takes contact_button_type; comments, likes, saves, shares and total_interactions take media_product_type.
