Channel Playlists
GET/v1/youtube/channel/playlists1 credit
Returns the playlists on a channel's Playlists tab, with each playlist's id, title, video count, first video and channel.
01Query parameters
| Name | Type | Description |
|---|---|---|
| handleoptional | string | Channel handle, with or without the leading `@` (e.g. `MrBeast`). One of `handle` or `channelId` is required, unless you send a `continuationToken`. |
| channelIdoptional | string | Channel id starting with `UC` (e.g. `UCX6OQ3DkcsbYNE6H8uQQuVA`). One of `handle` or `channelId` is required, unless you send a `continuationToken`. |
| continuationTokenoptional | string | The `continuationToken` from the previous page. It can be sent on its own, without the channel. |
| regionoptional | string | Two-letter country code that sets the YouTube region for the request (e.g. `US`, `GB`).Default: US |
02Request
curl "https://api.scrapesocial.ai/v1/youtube/channel/playlists?handle=TED" \ -H "x-api-key: $SCRAPESOCIAL_KEY"
03Responses
Real answers from the API. Lists are shortened to 2 items.
GET /v1/youtube/channel/playlists?handle=TED
{
"success": true,
"credits_remaining": 4980,
"credits_charged": 1,
"videos": [],
"channels": [],
"playlists": [
{
"type": "playlist",
"id": "PLQpQQFZKzl7o",
"title": "TED Talks on Mental Fitness",
"thumbnail": "https://i.ytimg.com/vi/xb0nLpdWttA/hqdefault.jpg?sqp=-oaymwEXCOADEI4CSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLD_A9XYBqmEWYXWbqtszpizQ4VCJw",
"playlistUrl": "https://www.youtube.com/playlist?list=PLQpQQFZKzl7o",
"videoId": "xb0nLpdWttA",
"videoUrl": "https://www.youtube.com/watch?v=xb0nLpdWttA",
"videoCount": 10,
"channel": {
"id": "UCAuUUnT6oDeKwE6v1NGQxug",
"title": "TED",
"handle": "TED",
"channelUrl": "https://www.youtube.com/@TED"
}
},
{
"type": "playlist",
"id": "PLUCPc-R61w-s",
"title": "Talks for when you want to start a new hobby",
"thumbnail": "https://i.ytimg.com/vi/rIRon8zJyps/hqdefault.jpg?sqp=-oaymwEXCOADEI4CSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLCSkyJnEt5B4Z1HvOrRfBwOd3sZRQ",
"playlistUrl": "https://www.youtube.com/playlist?list=PLUCPc-R61w-s",
"videoId": "rIRon8zJyps",
"videoUrl": "https://www.youtube.com/watch?v=rIRon8zJyps",
"videoCount": 11,
"channel": {
"id": "UCAuUUnT6oDeKwE6v1NGQxug",
"title": "TED",
"handle": "TED",
"channelUrl": "https://www.youtube.com/@TED"
}
}
],
"shorts": [],
"shelves": [],
"lives": [],
"continuationToken": "4qmFsgJ4EhhVQ0F1VVVuVDZvRGVLd0U2djFOR1F4dWcaKkVnbHdiR0Y1YkdsemRITVlBeUFBTUFFNEFlb0RCME5uVGtSUmFsRSUzRJoCL2Jyb3dzZS1mZWVkVUNBdVVVblQ2b0RlS3dFNnYxTkdReHVncGxheWxpc3RzMTA0"
}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"
}04Notes
About 27 playlists per page, in `playlists`. The answer always has six lists (`videos`, `channels`, `playlists`, `shorts`, `shelves`, `lives`) plus `continuationToken`; lists that do not apply are empty. Pass `continuationToken` back for the next page; it is null on the last page. An unknown channel answers 404; a channel that has nothing on this tab returns the empty lists for 0 credits. A token YouTube refuses is a 400.
05Errors & 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.