YouTube channel Shorts API
A channel's Shorts, newest first or most popular: id, title and view count.
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
- 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).
1curl -G "https://api.socialscrape.dev/v1/youtube/channel/shorts" \2 -H "x-api-key: $SOCIALSCRAPE_API_KEY" \3 --data-urlencode "handle=NASA"1import os2import requests34params = {5 "handle": "NASA",6}7res = requests.get(8 "https://api.socialscrape.dev/v1/youtube/channel/shorts",9 headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},10 params=params,11)12body = res.json()1314if body["ok"]:15 print(body["data"])16else:17 print(body["error"]["code"], body["error"]["message"])1const url = new URL("https://api.socialscrape.dev/v1/youtube/channel/shorts");2url.search = new URLSearchParams({3 "handle": "NASA"4}).toString();5const res = await fetch(url, {6 headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },7});8const body = await res.json();910if (body.ok) {11 console.log(body.data);12} else {13 console.error(body.error.code, body.error.message);14}1{2 "nodes": [3 {4 "name": "SocialScrape YouTube channel Shorts",5 "type": "n8n-nodes-base.httpRequest",6 "typeVersion": 4.2,7 "position": [8 0,9 010 ],11 "parameters": {12 "method": "GET",13 "url": "https://api.socialscrape.dev/v1/youtube/channel/shorts",14 "sendQuery": true,15 "queryParameters": {16 "parameters": [17 {18 "name": "handle",19 "value": "NASA"20 }21 ]22 },23 "sendHeaders": true,24 "headerParameters": {25 "parameters": [26 {27 "name": "x-api-key",28 "value": "={{ $env.SOCIALSCRAPE_API_KEY }}"29 }30 ]31 }32 }33 }34 ],35 "connections": {}36}Example response#
This is a sample from a recorded response, lists and long text are shortened. Status 200.
1{2 "ok": true,3 "credits_charged": 1,4 "credits_remaining": 4999,5 "cached": false,6 "cached_at": null,7 "request_id": "req_f8732e2d53fce6b21728fefe",8 "data": {9 "object": "list",10 "items": [11 {12 "object": "post",13 "platform": "youtube",14 "id": "-62C9R_41Sc",15 "url": "https://www.youtube.com/shorts/-62C9R_41Sc",16 "type": "short",17 "author": {18 "id": "UCLA_DiR1FfKNvjuUpBHmylQ",19 "handle": "NASA",20 "name": "NASA",21 "url": "https://www.youtube.com/@NASA",22 "avatar_url": null,23 "verified": null24 },25 "title": "From the Moon to the 50-Yard Line",26 "text": null,27 "published_at": null,28 "duration_seconds": null,29 "language": null,30 "hashtags": null,31 "mentions": null,32 "stats": {33 "views": 51000,34 "likes": null,35 "comments": null,36 "shares": null,37 "saves": null,38 "dislikes": null39 },40 "media": {41 "thumbnail_url": "https://i.ytimg.com/vi/-62C9R_41Sc/mqdefault.jpg",42 "video_url": null,43 "audio_url": null,44 "image_urls": null,45 "width": null,46 "height": null47 },48 "song": null,49 "location": null,50 "is_pinned": null,51 "is_sponsored": null,52 "extra": null53 },54 {55 "object": "post",56 "platform": "youtube",57 "id": "myZ9kn9MIWQ",58 "url": "https://www.youtube.com/shorts/myZ9kn9MIWQ",59 "type": "short",60 "author": {61 "id": "UCLA_DiR1FfKNvjuUpBHmylQ",62 "handle": "NASA",63 "name": "NASA",64 "url": "https://www.youtube.com/@NASA",65 "avatar_url": null,66 "verified": null67 },68 "title": "2026 Solar Eclipse @ 50,000 Feet",69 "text": null,70 "published_at": null,71 "duration_seconds": null,72 "language": null,73 "hashtags": null,74 "mentions": null,75 "stats": {76 "views": 276000,77 "likes": null,78 "comments": null,79 "shares": null,80 "saves": null,81 "dislikes": null82 },83 "media": {84 "thumbnail_url": "https://i.ytimg.com/vi/myZ9kn9MIWQ/mqdefault.jpg",85 "video_url": null,86 "audio_url": null,87 "image_urls": null,88 "width": null,89 "height": null90 },91 "song": null,92 "location": null,93 "is_pinned": null,94 "is_sponsored": null,95 "extra": null96 }97 ],98 "cursor": "o30",99 "has_more": true,100 "parent": null101 },102 "cursor": "o30",103 "has_more": true104}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)