YouTube API endpoint
Lists the playlists on a YouTube channel's Playlists tab. `id` accepts a channel id, `@handle`, `/c` or `/user` path, or a full channel URL. Each item has its playlist id, title, video count, thumbnail and URL. Pass the returned `continuation_token` back as `continuation_token` to get the next page.
/youtube/channel/{id}/playlistsReturns playlist items from a channel's Playlists tab.
Query parameters:
continuation_token: fetch the next page from a previous response| Field | Filled in, of 27 checked | Values in the sample |
|---|---|---|
| type | 27 | |
| position | 27 | 1 to 27, median 14 |
| title | 27 | |
| url | 27 | youtube.com |
| thumbnail | 27 | i.ytimg.com |
| channel_title | 27 | |
| channel_id | 27 | |
| video_count | 27 | |
| playlist_id | 27 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| id (path) | string | Yes | Channel ID, @handle, /c path, /user path, or full YouTube channel URL | UCXZCJLdBC09xxGZ6gcdrc6A | |
| continuation_token | string | No | Pagination token returned by a previous request | ||
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/youtube/channel/UCXZCJLdBC09xxGZ6gcdrc6A/playlists" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"channel_id": "UCXZCJLdBC09xxGZ6gcdrc6A",
"channel_title": "OpenAI",
"handle": "@OpenAI",
"items": [
{
"type": "playlist",
"position": 1,
"title": "OpenAI Podcast",
"playlist_id": "PL1234567890abcdef",
"video_count": "12 videos"
}
],
"continuation_token": "NEXT_TOKEN"
}
}Request schema
No body schema
Response schema
#/definitions/youtube.channelFeedResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | youtube.ChannelFeedResponse | No | ||||
| data.channel_id | string | No | UCXZCJLdBC09xxGZ6gcdrc6A | YouTube channel ID, starting with `UC`. | ||
| data.channel_title | string | No | OpenAI | Channel name as shown on YouTube. | ||
| data.channel_url | string | No | https://www.youtube.com/@OpenAI | Link to the channel on YouTube. | ||
| data.continuation_token | string | No | NEXT_TOKEN | Token to pass in the next request to get the following page. Omitted on the last page. | ||
| data.handle | string | No | @OpenAI | Channel handle, starting with `@`. | ||
| data.items | array | No | Videos or other items from the channel, in the order YouTube lists them. SearchItem record, 23 fields: badges, channel_id, channel_thumbnail, channel_title, description_snippet, duration, duration_seconds, handle, is_live, is_short, is_verified, playlist_id and 11 more. Described under Search YouTube API. | |||
| data.query | string | No | gpt | Search text used to look inside the channel. Omitted when no search was run. | ||
| data.thumbnail | string | No | https://yt3.googleusercontent.com/example=s176-c-k-c0x00ffffff-no-rj | URL of the channel's avatar image. | ||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 400 | Missing or invalid parameters | #/definitions/app.Response |
| 429 | Rate limit exceeded | #/definitions/app.Response |
| 500 | Internal server error | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/youtube/channel/UCXZCJLdBC09xxGZ6gcdrc6A/playlists" \
-H "x-api-key: $CRAWLORA_API_KEY"