Channel Analytics
GET/v1/youtube/channel/analytics2 credits
Computes a channel's engagement from its subscriber count and recent videos: average and median likes, comments and views, engagement rates by subscribers and by views, and how often it uploads, with the sample size and window.
01Query parameters
| Name | Type | Description |
|---|---|---|
| handleoptional | string | Channel handle, e.g. `MrBeast` or `@MrBeast`. One of `handle`, `channelId` or `url` is required. |
| channelIdoptional | string | Channel id (`UC…`). |
| urloptional | string | Channel URL (`/@handle`, `/channel/UC…`, `/c/…`, `/user/…`). |
| postsoptional | integer | How many recent posts to sample, 1 to 50. Videos from the Videos tab; Shorts and live streams are not sampled.Default: 30 |
| tzoptional | string | IANA time zone the `posting_times` weekdays and hours are read in, e.g. `Europe/Istanbul` or `America/New_York`. Daylight saving time follows each post's own date. Any other value is a free 400.Default: UTC |
02Pricing
1 credit for the channel plus 1 per page of 30 videos read: 2 credits for the default 30 videos, 3 for more. The most a request can cost (1 + ⌈posts/30⌉) must be in your balance; nothing is charged on failure.
03Request
curl "https://api.scrapesocial.ai/v1/youtube/channel/analytics?handle=MrBeast&tz=Europe%2FIstanbul" \ -H "x-api-key: $SCRAPESOCIAL_KEY"
04Responses
Real answers from the API. Lists are shortened to 2 items.
GET /v1/youtube/channel/analytics?handle=MrBeast&tz=Europe/Istanbul
{
"success": true,
"credits_remaining": 4980,
"credits_charged": 2,
"platform": "youtube",
"owner": {
"id": "UCX6OQ3DkcsbYNE6H8uQQuVA",
"username": "MrBeast",
"display_name": "MrBeast"
},
"followers": 523000000,
"sample": {
"posts": 30,
"from": "2025-08-30T16:00:11Z",
"to": "2026-10-17T16:00:18Z",
"posts_read": 30,
"pinned_excluded": 0,
"reposts_excluded": 0
},
"likes": {
"posts": 30,
"missing": 0,
"total": 81303427,
"average": 2710114.23,
"median": 2543769
},
"comments": {
"posts": 30,
"missing": 0,
"total": 4405000,
"average": 146833.33,
"median": 96500
},
"views": {
"posts": 30,
"missing": 0,
"total": 4780014593,
"average": 159333819.77,
"median": 145852029
},
"engagement_rate_by_followers": 0.5463,
"engagement_rate_by_views": 1.7931,
"posts_per_week": 0.49,
"posting_times": {
"timezone": "Europe/Istanbul",
"metric": "engagement",
"posts": 30,
"by_weekday": [
{
"weekday": "monday",
"posts": 0,
"average_engagement": null
},
{
"weekday": "tuesday",
"posts": 0,
"average_engagement": null
}
],
"by_hour": [
{
"hour": 0,
"posts": 0,
"average_engagement": null
},
{
"hour": 1,
"posts": 0,
"average_engagement": null
}
],
"best_weekday": "saturday",
"best_hour": 19,
"best_slot": {
"weekday": "saturday",
"hour_from": 18,
"hour_to": 21
},
"min_posts": 2
},
"formula_version": 2,
"formulas": {
"average": "total / posts, over the sampled posts that have the value",
"median": "the middle value of the sampled posts that have the value; the mean of the two middle values when their number is even",
"engagement_rate_by_followers": "100 * average(likes + comments) / followers, over the sampled posts whose likes and comments are both known; null when followers is 0 or unknown",
"engagement_rate_by_views": "100 * sum(likes + comments) / sum(views), over the sampled posts whose likes, comments and views are all known; null when that sum of views is 0",
"posts_per_week": "(sample.posts - 1) / ((sample.to - sample.from) in days / 7); null with fewer than 2 posts or when they share one timestamp",
"posting_times": "engagement = likes + comments of each sampled post whose likes, comments and exact time are known (a time worked back from \"3 weeks ago\" is not); each such post counts in its weekday, its hour and its weekday's 3-hour slot (00-03, 03-06, ... 21-24) in the asked time zone; average_engagement = total engagement / posts of the bucket, null without posts; best_weekday, best_hour, best_slot = the highe…"
}
}Common to every endpoint
Any route can answer these: a missing or wrong key, no credits left, the platform not answering, or a failure on our side. None of them costs credits.
GET /v1/cosmos/profile?handle=design
{
"success": false,
"message": "Invalid API key"
}05Notes
Our own endpoint: ScrapeCreators has no analytics route. The answer: `platform`, `owner` (`id`, `username`, `display_name`), `followers`, `sample` (`posts`, `from`, `to` in ISO 8601 UTC, `posts_read`, `pinned_excluded`, `reposts_excluded`), `likes`, `comments` and `views` (each `posts`, `missing`, `total`, `average`, `median`), `engagement_rate_by_followers` = 100 × average(likes + comments) / followers, `engagement_rate_by_views` = 100 × sum(likes + comments) / sum(views), `posts_per_week`, `formula_version` and `formulas` (every formula as text). Pinned posts and reposts are left out of the sample. A count the platform does not give (hidden likes, a photo's views) is left out and counted in `missing`, never taken as 0; a rate is `null` when followers or views are 0 or unknown. An account without posts answers its profile with an empty sample. `followers` is YouTube's rounded subscriber count. An unknown channel is a free 404. `posting_times` (formula_version 2) says when the sampled posts drew the most engagement, in the time zone `tz` names, from the same posts at no extra cost: `timezone`, `metric` (`engagement` = likes + comments of a post), `posts` (the sampled posts with both counts and a time), `by_weekday` (Monday to Sunday) and `by_hour` (0 to 23), each item with `posts` and `average_engagement` (null without posts), then `best_weekday`, `best_hour` and `best_slot` (`weekday`, `hour_from`, `hour_to`: one of the fixed 3-hour windows 00–03 … 21–24) and `min_posts`. The best bucket has the highest average among those with at least `min_posts` (2) posts; a tie goes to the bucket with more posts, then to the earlier one; null when none has enough. There is no weekday-by-hour grid: 168 cells for 12 to 50 posts would describe single posts. A sample this small is a hint, not a schedule. A video whose exact publish time YouTube does not give (only “3 weeks ago”) is left out of `posting_times`.
06Errors & credits
Every error has success: false, a real HTTP status and costs no credits.
400missing_parameter
A required parameter is missing or invalid.
403private_account
The account is private or age-restricted.
404not_found
No such account.
503upstream_error
The platform did not answer; retry shortly.