YouTube API endpoint
Lists the videos on a YouTube channel's Videos tab. `id` accepts a channel id, `@handle`, `/c` or `/user` path, or a full channel URL. Each item has its video id, title, URL, duration, view count, published text, thumbnail, badges and live flag. Pass the returned `continuation_token` to fetch the next page.
/youtube/channel/{id}/videosReturns video items from a channel's Videos tab.
Path parameter id accepts:
UC...@handle/c/.../user/...youtube.com channel URLsQuery parameters:
continuation_token: fetch the next page from a previous response| Field | Filled in, of 30 checked | Values in the sample |
|---|---|---|
| type | 30 | |
| position | 30 | 1 to 30, median 15 |
| title | 30 | |
| url | 30 | youtube.com |
| thumbnail | 30 | i.ytimg.com |
| video_id | 30 | |
| duration | 30 | |
| duration_seconds | 30 | 45 to 2,844, median 204 |
| published_text | 30 | |
| short_view_count | 30 |
| 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/videos" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"channel_id": "UCXZCJLdBC09xxGZ6gcdrc6A",
"channel_title": "OpenAI",
"handle": "@OpenAI",
"channel_url": "https://www.youtube.com/@OpenAI",
"items": [
{
"type": "video",
"position": 1,
"title": "Channel Video 1",
"video_id": "abc123xyz89",
"duration": "10:05"
}
],
"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. | |||
| data.items[].badges | array | No | HD,CC | Badge labels shown on the video, such as `HD` or `CC`. | ||
| data.items[].channel_id | string | No | UCXZCJLdBC09xxGZ6gcdrc6A | YouTube channel ID, starting with `UC`. | ||
| data.items[].channel_thumbnail | string | No | https://yt3.ggpht.com/example=s68-c-k-c0x00ffffff-no-rj | URL of the publishing channel's avatar image. | ||
| data.items[].channel_title | string | No | OpenAI | Name of the channel that published the video or playlist. | ||
| data.items[].description_snippet | string | No | A concise walkthrough of GPT features. | Short excerpt of the video or channel description shown in the results. | ||
| data.items[].duration | string | No | 12:34 | Video length as YouTube displays it, such as `12:34`. | ||
| data.items[].duration_seconds | integer | No | 754 | Video length in seconds. | ||
| data.items[].handle | string | No | @OpenAI | Channel handle, starting with `@`. Set for channel results. | ||
| data.items[].is_live | boolean | No | Whether the video is a live stream. | |||
| data.items[].is_short | boolean | No | Whether the video is a YouTube Short. | |||
| data.items[].is_verified | boolean | No | Whether the channel carries a verified badge. | |||
| data.items[].playlist_id | string | No | PL1234567890abcdef | YouTube playlist ID. Set for playlist results. | ||
| data.items[].position | integer | No | 1 | Position of the item on this page of results, starting at 1. | ||
| data.items[].published_text | string | No | 2 days ago | Upload time as YouTube displays it, such as `2 days ago`. | ||
| data.items[].short_view_count | string | No | 123K views | Abbreviated view count as YouTube displays it, such as `123K views`. | ||
| data.items[].subscriber_count | string | No | 1.93M subscribers | Subscriber count as YouTube displays it, such as `1.93M subscribers`. | ||
| data.items[].thumbnail | string | No | https://i.ytimg.com/vi/abc123/hq720.jpg | URL of the item's thumbnail image. | ||
| data.items[].title | string | No | ChatGPT Explained | Video or playlist title, or channel name. | ||
| data.items[].type | string | No | video | Kind of result: `video`, `channel` or `playlist`. | ||
| data.items[].url | string | No | https://www.youtube.com/watch?v=abc123 | Link to the video, channel or playlist on YouTube. | ||
| data.items[].video_count | string | No | 9 lessons | Number of videos as YouTube displays it, such as `12 videos`. Set for channel and playlist results. | ||
| data.items[].video_id | string | No | abc123xyz89 | YouTube video ID. Set for video results. | ||
| data.items[].view_count | string | No | 123,456 views | View count as YouTube displays it, such as `123,456 views`. | ||
| 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/videos" \
-H "x-api-key: $CRAWLORA_API_KEY"