YouTube channel Shorts
Beta GET /v1/youtube/channel/shorts
GET /v1/youtube/channel/shorts
A channel's Shorts, newest first or most popular: id, title and view count. YouTube's Shorts tab shows no length or date; include_extras adds them with likes and the description.
- Cost: 1 credit
- Status: Beta. Built and tested against recorded responses; the shape may still gain fields.
- Cache: Results are kept up to 30 days; send
max_age_daysto reuse them for free. - Timeout: A request still running after about 25 seconds answers
202with a job to poll (Batch and jobs).
Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
handle | string | one of | Channel handle, with or without @. Also accepted as username. |
id | string | one of | Channel id (UC...). Also accepted as channelId, channel_id. |
url | URL | one of | Any channel URL (/@handle, /channel/UC..., /c/name). Accepted hosts: youtube.com, youtu.be. |
sort | string | no | Order of results. Changing it restarts the cursor chain. One of latest, popular. Default latest. Also accepted as sort_by, sortBy, order. Also accepted values: newest for latest. |
include_extras | boolean | no | Also fetch length, publish date, likes and description per Short (slower, more errors). Default false. Also accepted as includeExtras. |
Send at least one of handle, id, url. If you send several, the first listed is used and the rest are ignored.
Every request also accepts:
cursor: the cursor from the previous page (Pagination).trim:truefor a smaller response withoutnullfields andextra.raw:trueto also get the platform's original object asraw.max_age_days: accept a cached result up to this many days old, for 0 credits (Caching).
Example request#
Set your key in the environment first (see Authentication).
curl -G "https://api.socialscrape.io/v1/youtube/channel/shorts" \
-H "x-api-key: $SOCIALSCRAPE_API_KEY" \
--data-urlencode "handle=NASA"import os
import requests
params = {
"handle": "NASA",
}
res = requests.get(
"https://api.socialscrape.io/v1/youtube/channel/shorts",
headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},
params=params,
)
body = res.json()
if body["ok"]:
print(body["data"])
else:
print(body["error"]["code"], body["error"]["message"])const url = new URL("https://api.socialscrape.io/v1/youtube/channel/shorts");
url.search = new URLSearchParams({
"handle": "NASA"
}).toString();
const res = await fetch(url, {
headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },
});
const body = await res.json();
if (body.ok) {
console.log(body.data);
} else {
console.error(body.error.code, body.error.message);
}{
"nodes": [
{
"name": "SocialScrape YouTube channel Shorts",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
0,
0
],
"parameters": {
"method": "GET",
"url": "https://api.socialscrape.io/v1/youtube/channel/shorts",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "handle",
"value": "NASA"
}
]
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "x-api-key",
"value": "={{ $env.SOCIALSCRAPE_API_KEY }}"
}
]
}
}
}
],
"connections": {}
}Example response#
This is a sample from a recorded response, lists and long text are shortened. Status 200.
{
"ok": true,
"credits_charged": 1,
"credits_remaining": 4999,
"cached": false,
"cached_at": null,
"request_id": "req_f8732e2d53fce6b21728fefe",
"data": {
"object": "list",
"items": [
{
"object": "post",
"platform": "youtube",
"id": "-62C9R_41Sc",
"url": "https://www.youtube.com/shorts/-62C9R_41Sc",
"type": "short",
"author": {
"id": "UCLA_DiR1FfKNvjuUpBHmylQ",
"handle": "NASA",
"name": "NASA",
"url": "https://www.youtube.com/@NASA",
"avatar_url": null,
"verified": null
},
"title": "From the Moon to the 50-Yard Line",
"text": null,
"published_at": null,
"duration_seconds": null,
"language": null,
"hashtags": null,
"mentions": null,
"stats": {
"views": 51000,
"likes": null,
"comments": null,
"shares": null,
"saves": null,
"dislikes": null
},
"media": {
"thumbnail_url": "https://i.ytimg.com/vi/-62C9R_41Sc/mqdefault.jpg",
"video_url": null,
"audio_url": null,
"image_urls": null,
"width": null,
"height": null
},
"song": null,
"location": null,
"is_pinned": null,
"is_sponsored": null,
"extra": null
},
{
"object": "post",
"platform": "youtube",
"id": "myZ9kn9MIWQ",
"url": "https://www.youtube.com/shorts/myZ9kn9MIWQ",
"type": "short",
"author": {
"id": "UCLA_DiR1FfKNvjuUpBHmylQ",
"handle": "NASA",
"name": "NASA",
"url": "https://www.youtube.com/@NASA",
"avatar_url": null,
"verified": null
},
"title": "2026 Solar Eclipse @ 50,000 Feet",
"text": null,
"published_at": null,
"duration_seconds": null,
"language": null,
"hashtags": null,
"mentions": null,
"stats": {
"views": 276000,
"likes": null,
"comments": null,
"shares": null,
"saves": null,
"dislikes": null
},
"media": {
"thumbnail_url": "https://i.ytimg.com/vi/myZ9kn9MIWQ/mqdefault.jpg",
"video_url": null,
"audio_url": null,
"image_urls": null,
"width": null,
"height": null
},
"song": null,
"location": null,
"is_pinned": null,
"is_sponsored": null,
"extra": null
}
],
"cursor": "o30",
"has_more": true,
"parent": null
},
"cursor": "o30",
"has_more": true
}Response#
A list of Post objects in data.items, with data.cursor and data.has_more.
See Data models for every field. The envelope around data is described in Responses.
Errors#
Failures are free: credits_charged is 0. Branch on error.code, never on the message.
| Code | HTTP | Retry | Meaning |
|---|---|---|---|
invalid_params | 400 | no | A parameter is missing, unknown or has the wrong type. |
unsupported_url | 400 | no | The URL is not one this endpoint accepts (wrong platform or form). |
not_found | 404 | no | The platform says this profile, post or item does not exist. |
Every request can also fail with the account and platform errors listed on the Errors page.
Related endpoints#
- YouTube channel details (
GET /v1/youtube/channel) - YouTube channel videos (
GET /v1/youtube/channel/videos) - Search inside a YouTube channel (
GET /v1/youtube/channel/search) - YouTube channel playlists (
GET /v1/youtube/channel/playlists) - YouTube channel live streams (
GET /v1/youtube/channel/lives) - YouTube channel community posts (
GET /v1/youtube/channel/community-posts) - YouTube video or Short details (
GET /v1/youtube/video) - YouTube video transcript (
GET /v1/youtube/video/transcript)