YouTube API
YouTube Shorts Feed
Get a shorts sequence/feed for infinite scroll.
POST
$0.01/call/v1/youtube/shortsUsage
const res = await fetch('https://api.yepapi.com/v1/youtube/shorts', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({ params: 'continuation_token_here' }),
});
const { data } = await res.json();
console.log(data.data, data.continuation);curl -X POST https://api.yepapi.com/v1/youtube/shorts \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"params": "continuation_token_here"}'Request Body
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
params | string | Yes | Continuation token from previous response | — |
Response
{
"ok": true,
"data": {
"data": [
{
"type": "shorts",
"videoId": "abc123",
"title": "Wait for the ending...",
"viewCountText": "1.2M views",
"thumbnail": [
{ "url": "https://i.ytimg.com/vi/abc123/hqdefault.jpg", "width": 168, "height": 94 }
]
}
],
"continuation": "4qmF..."
}
}Response Fields
| Field | Type | Description |
|---|---|---|
ok | boolean | Whether the request succeeded |
data.data | object[] | Array of Shorts objects |
data.data[].type | string | Content type (typically shorts) |
data.data[].videoId | string | Unique YouTube video/Short identifier |
data.data[].title | string | Short title as displayed on YouTube |
data.data[].viewCountText | string | Human-readable view count (e.g. 1.2M views) |
data.data[].thumbnail | object[] | Thumbnail images at various resolutions |
data.continuation | string | Token to continue fetching the next batch of Shorts |