YouTube channel Shorts API
A channel’s Shorts, newest, popular or oldest first, about 48 a page, with titles and view counts.
GET /v1/youtube/channels/{channel}/shortsBeta1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/youtube/channels/@MrBeast/shorts?sort=popular",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 1 credit{ "kind": "youtube#videoListResponse", "items": [ { "kind": "youtube#video", "id": "MxRpi8BEN4Q", "snippet": { "channelId": "UCX6OQ3DkcsbYNE6H8uQQuVA", "channelTitle": "MrBeast", "title": "Turning A Kid’s Drawing Into Real Life", "thumbnails": { "default": { "url": "https://i.ytimg.com/vi/MxRpi8BEN4Q/default.jpg", "width": 120, "height": 90 }, "medium": { "url": "https://i.ytimg.com/vi/MxRpi8BEN4Q/mqdefault.jpg", "width": 320, "height": 180 }, "high": { "url": "https://i.ytimg.com/vi/MxRpi8BEN4Q/hqdefault.jpg", "width": 480, "height": 360 }, "standard": { "url": "https://i.ytimg.com/vi/MxRpi8BEN4Q/sddefault.jpg", "width": 640, "height": 480 } }, "liveBroadcastContent": "none" }, "isShort": true, "channel": { "id": "UCX6OQ3DkcsbYNE6H8uQQuVA", "title": "MrBeast", "url": "https://www.youtube.com/@MrBeast" }, "statistics": { "viewCount": "8300000" }, "statisticsAreApproximate": true }, { "kind": "youtube#video", "id": "dnbLdUyozKM", "snippet": { "channelId": "UCX6OQ3DkcsbYNE6H8uQQuVA", "channelTitle": "MrBeast", "title": "Closest To 50 Pounds Wins A Car", "thumbnails": { "default": { "url": "https://i.ytimg.com/vi/dnbLdUyozKM/default.jpg", "width": 120, "height": 90 }, "medium": { "url": "https://i.ytimg.com/vi/dnbLdUyozKM/mqdefault.jpg", "width": 320, "height": 180 }, "high": { "url": "https://i.ytimg.com/vi/dnbLdUyozKM/hqdefault.jpg", "width": 480, "height": 360 }, "standard": { "url": "https://i.ytimg.com/vi/dnbLdUyozKM/sddefault.jpg", "width": 640, "height": 480 } }, "liveBroadcastContent": "none" }, "isShort": true, "channel": { "id": "UCX6OQ3DkcsbYNE6H8uQQuVA", "title": "MrBeast", "url": "https://www.youtube.com/@MrBeast" }, "statistics": { "viewCount": "18000000" }, "statisticsAreApproximate": true }, "… 1 more" ], "pageInfo": { "resultsPerPage": 6 }}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. |
sortquery | "latest" | "popular" | "oldest" | latest (default), popular or oldest. One of latest, popular, oldest. |
afterquery | string | The previous page’s nextPageToken. Tokens last 6 hours. |
Response fields
200 with a YouTubeVideoList, in the shape of YouTube Data API v3 resources.
| Field | Type | Description |
|---|---|---|
kind | "youtube#videoListResponse" | |
items | YouTubeVideo[] | |
nextPageToken | string | Pass as after for the next page. Absent on the last page. Lasts 6 hours. |
pageInfo | object | |
missing | object[] | Batch only: requested ids that did not resolve, and why. |
Status codes
| Status | Meaning |
|---|---|
200 | A page of Shorts. |
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
Dates?
The Shorts tab shows none; send the ids to the bulk videos endpoint for exact dates.
YouTube is a trademark of Google LLC. We are not affiliated with or endorsed by Google or YouTube.