100 free credits. No credit card required. Get a key

YouTube channel playlists API

A channel’s playlists with video counts, in the channel’s order, newest or last updated first.

GET /v1/youtube/channels/{channel}/playlistsBeta1 credit per callRefunded on failure
import os, requests

res = requests.get(
    "https://api.groundsocial.dev/v1/youtube/channels/@mkbhd/playlists",
    headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()
Response
200 · 1 credit
{
"kind": "youtube#playlistListResponse",
"items": [
{
"kind": "youtube#playlist",
"id": "PLBsP89CPrMeMV1oP42Zn2DrWpnFoSaufA",
"snippet": {
"title": "Retro Tech",
"channelId": "UCBJycsmduvYEL83R_U4JriQ",
"channelTitle": "Marques Brownlee",
"thumbnails": {
"high": {
"url": "https://i9.ytimg.com/s_p/PLBsP89CPrMeMV1oP42Zn2DrWpnFoSaufA/landscape_maxresdefault.jpg?sqp=CPzCmNgGir7X7AMICI_G--4FEAE=…",
"width": 2560,
"height": 1440
}
}
},
"contentDetails": {
"itemCount": 6
}
},
{
"kind": "youtube#playlist",
"id": "PLBsP89CPrMeP1Xi1zQX87mq3mhkvFHWZ4",
"snippet": {
"title": "Retro Tech",
"channelId": "UCBJycsmduvYEL83R_U4JriQ",
"channelTitle": "Marques Brownlee",
"thumbnails": {
"high": {
"url": "https://i.ytimg.com/vi/Oy8zSYKkczI/hqdefault.jpg?sqp=-oaymwEXCOADEI4CSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLCg6EpaTY_KSrK57S-…",
"width": 480,
"height": 270
}
}
},
"contentDetails": {
"itemCount": 1
}
},
"… 1 more"
],
"pageInfo": {
"resultsPerPage": 4
}
}

Parameters

NameTypeDescription
channelpath · requiredstringA channel id (UC…), a handle with or without the @, or any channel URL (/@handle, /channel/UC…, /c/name, /user/name). Example: @MrBeast.
sortquery"default" | "newest" | "last_video_added"default, newest or last_video_added. One of default, newest, last_video_added.
afterquerystringThe previous page’s nextPageToken. Tokens last 6 hours.
Response fields

200 with a YouTubePlaylistList, in the shape of YouTube Data API v3 resources.

FieldTypeDescription
kind"youtube#playlistListResponse"
itemsYouTubePlaylist[]
nextPageTokenstringPass as after for the next page. Absent on the last page. Lasts 6 hours.
pageInfoobject
Status codes
StatusMeaning
200A page of playlists.
400Invalid input. Nothing was charged.
401Missing or invalid API key.
402Not enough credits, a spend cap was reached, or payment is required.
403The target is private, or the account is suspended.
404The video, channel, playlist or post does not exist, was removed, or has nothing there.
429Too many requests. Wait for Retry-After seconds.
503YouTube is temporarily unavailable. Retryable; nothing was charged.

Every error has code, message, hint and retryable. All error codes

Questions

Podcasts?

They have their own endpoint.

YouTube is a trademark of Google LLC. We are not affiliated with or endorsed by Google or YouTube.