YouTube channel analytics API
A YouTube channel, its latest uploads with exact counts and dates, and metrics over them: average and median views, like rate, views per subscriber, upload frequency.
GET /v1/youtube/channels/{channel}/fullBeta5 credits per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/youtube/channels/@mkbhd/full?videos=15",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 5 credits{ "kind": "youtube#channelProfile", "channel": { "kind": "youtube#channel", "id": "UCBJycsmduvYEL83R_U4JriQ", "snippet": { "title": "Marques Brownlee", "description": "MKBHD: Quality Tech Videos | YouTuber | Geek | Consumer Electronics | Tech Head …", "customUrl": "@mkbhd", "handle": "@mkbhd", "publishedAt": "2008-03-21T00:00:00.000Z", "thumbnails": { "default": { "…": "3 fields" }, "medium": { "…": "3 fields" }, "high": { "…": "3 fields" } }, "country": "United States" }, "statistics": { "viewCount": "5915397400", "subscriberCount": "21500000", "hiddenSubscriberCount": false, "videoCount": "1868" }, "brandingSettings": { "channel": { "keywords": "MKBHD MarquesBrownlee Marques Brownlee" }, "image": { "bannerExternalUrl": "https://yt3.googleusercontent.com/zi_48HwHU4s0Hnb6tZuvRzTfCPHrLEnrtIMDLzMauDEyDm…" } }, "contentDetails": { "relatedPlaylists": { "uploads": "UUBJycsmduvYEL83R_U4JriQ" } }, "status": { "isFamilySafe": true }, "isVerified": true, "links": [ { "title": "Twitter", "url": "http://twitter.com/MKBHD" }, "… 4 more" ], "emails": [ "business@MKBHD.com" ], "…": "1 more fields" }, "videos": [ { "kind": "youtube#video", "id": "cc5C8hRblBY", "snippet": { "publishedTimeText": "1 day ago", "publishedAt": "2026-11-23T12:00:00.000Z", "publishedAtIsApproximate": true, "channelId": "UCBJycsmduvYEL83R_U4JriQ", "channelTitle": "Marques Brownlee", "title": "I'm Starting Over", "thumbnails": { "…": "4 fields" }, "liveBroadcastContent": "none" }, "channel": { "id": "UCBJycsmduvYEL83R_U4JriQ", "title": "Marques Brownlee", "handle": "@mkbhd", "url": "https://www.youtube.com/@mkbhd" }, "statistics": { "viewCount": "3700000" }, "statisticsAreApproximate": true, "contentDetails": { "duration": "PT21M36S", "durationSeconds": 1296 } }, "… 2 more" ], "metrics": { "videosAnalyzed": 3, "averageViews": 4766667, "medianViews": 3900000, "viewsPerSubscriber": 0.1814, "averageDurationSeconds": 1023 }}Parameters
| Name | Type | Description |
|---|---|---|
channelpath · required | string | A channel id (UC…), a handle with or without the @, or any channel URL (/@handle, /channel/UC…, /c/name, /user/name). Example: @MrBeast. |
videosquery | integer | How many latest uploads (1–30, default 15). |
Response fields
200 with a YouTubeChannelProfile, in the shape of YouTube Data API v3 resources.
| Field | Type | Description |
|---|---|---|
kind | "youtube#channelProfile" | |
channel | YouTubeChannel | A channel: Data API v3 youtube#channel parts plus the about panel’s links. |
videos | YouTubeVideo[] | The latest uploads, with exact counts and dates. |
metrics | object | Computed by us over videos (not YouTube figures). |
Status codes
| Status | Meaning |
|---|---|
200 | The channel, its latest videos and metrics. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | The video, channel, playlist or post does not exist, was removed, or has nothing there. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | YouTube is temporarily unavailable. Retryable; nothing was charged. |
Every error has code, message, hint and retryable. All error codes
Questions
Are the metrics YouTube’s?
No: we compute them over the videos in the response.
YouTube is a trademark of Google LLC. We are not affiliated with or endorsed by Google or YouTube.