YouTube API endpoint
Returns the first page of Shorts from a YouTube channel's Shorts tab. `id` accepts a channel id, `@handle`, `/c` or `/user` path, or a full channel URL. Each short has its position, video id, title, URL, thumbnail and view count text.
/youtube/channel/{id}/shorts| Field | Filled in, of 48 checked | Values in the sample |
|---|---|---|
| position | 48 | 1 to 48, median 24 |
| video_id | 48 | |
| title | 48 | |
| url | 48 | youtube.com |
| thumbnail | 48 | i.ytimg.com |
| view_count | 48 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| id (path) | string | Yes | Channel ID, @handle, /c path, /user path, or full YouTube channel URL | UCXZCJLdBC09xxGZ6gcdrc6A | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/youtube/channel/UCXZCJLdBC09xxGZ6gcdrc6A/shorts" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"channel_id": "UCXZCJLdBC09xxGZ6gcdrc6A",
"channel_title": "OpenAI",
"handle": "@OpenAI",
"shorts": [
{
"position": 1,
"video_id": "abc123xyz89",
"title": "OpenAI demo clip",
"url": "https://www.youtube.com/shorts/abc123xyz89",
"view_count": "1.2M views"
}
]
}
}Request schema
No body schema
Response schema
#/definitions/youtube.channelShortsResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | youtube.ChannelShortsResponse | 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.handle | string | No | @OpenAI | Channel handle, starting with `@`. | ||
| data.shorts | array | No | YouTube Shorts published by the channel. | |||
| data.shorts[].position | integer | No | 1 | Position of the Short in the channel's Shorts list, starting at 1. | ||
| data.shorts[].thumbnail | string | No | https://i.ytimg.com/vi/abc123xyz89/oar2.jpg | URL of the Short's thumbnail image. | ||
| data.shorts[].title | string | No | OpenAI demo clip | Title of the Short. | ||
| data.shorts[].url | string | No | https://www.youtube.com/shorts/abc123xyz89 | Link to the Short on YouTube. | ||
| data.shorts[].video_id | string | No | abc123xyz89 | YouTube video ID of the Short. | ||
| data.shorts[].view_count | string | No | 1.2M views | View count as YouTube displays it, such as `1.2M views`. | ||
| 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/shorts" \
-H "x-api-key: $CRAWLORA_API_KEY"