Call it
curl https://api.peume.com/v1/call/get-facebook-page-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-facebook-page-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-facebook-page-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-facebook-page-insights.
Parameters
accountIdRequiredstringThe SocialAccount ID for the connected Facebook Page.
metricsstringComma-separated list of metrics. Defaults to "page_media_view,page_post_engagements,page_follows,followers_gained,followers_lost". **Live Meta metrics** (current names, post-Nov-2025): - page_media_view (replaces deprecated page_impressions) - page_total_media_view_unique (reach: unique viewers, replaces deprecated page_impressions_unique). The reach total sums daily unique viewers, not unique people over the range: a viewer seen on several days counts once per day. For a range of exactly 28 days it is Meta's 28-day unique viewers when Meta returns them. - page_views_total - page_post_engage
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 only. "time_series" returns daily values in the "values" array.
time_series · total_value
Example: total_value
