PeumeAPI

Social publishing & inbox · YouTube

Get YouTube channel insights

Returns channel-scoped aggregate metrics from YouTube Analytics API v2. Saves you

$0.002 per callRuns on an account you connect

Call it

curl https://api.peume.com/v1/call/get-youtube-channel-insights \
  -H "Authorization: Bearer $PEUME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "accountId": "your accountId",
    "metricType": "total_value"
  }
}'

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-youtube-channel-insights.

Parameters

accountIdRequiredstring

The SocialAccount ID for the YouTube account.

metricsstring

Comma-separated list. Defaults to "views,estimatedMinutesWatched,subscribersGained,subscribersLost". Live YouTube Analytics v2 metrics: - views - estimatedMinutesWatched - averageViewDuration (ratio - weighted mean computed across days) - subscribersGained - subscribersLost - likes - comments - shares -synthesized from daily follower snapshots (cross-platform parity): - followers_gained - followers_lost

fromDatestring

Start date (YYYY-MM-DD). Defaults to 30 days ago.

toDatestring

End date (YYYY-MM-DD). Defaults to today. YouTube Analytics has a 2-3 day delay, so the fetch is internally clamped to 3 days ago; any requested range extending beyond that returns zero values for the tail days. The response's dateRange.until field reflects your requested value.

sincestring

Alias of fromDate, kept for existing callers

untilstring

Alias of toDate, kept for existing callers

metricTypestring

"total_value" (default) returns aggregated totals. "time_series" returns per-day values in the "values" array.

time_series · total_value

Example: total_value

Start free · $1 of calls included

Every API your product needs. One key.

7,267 endpoints, one bill, and you only pay for calls that work.