YouTube API
Channel Livestreams
List livestreams from a YouTube channel.
POST
$0.01/call/v1/youtube/channel-livestreamsUsage
const res = await fetch('https://api.yepapi.com/v1/youtube/channel-livestreams', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({ id: 'UCAuUUnT6oDeKwE6v1NGQxug' }),
});
const { data } = await res.json();
console.log(data.data, data.continuation);curl -X POST https://api.yepapi.com/v1/youtube/channel-livestreams \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"id": "UCAuUUnT6oDeKwE6v1NGQxug"}'Request Body
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
id | string | Yes | YouTube channel ID | — |
sort_by | string | No | Sort order | newest |
token | string | No | Pagination token | — |
geo | string | No | Country code for geo-specific results | — |
lang | string | No | Language code | — |
Response
{
"ok": true,
"data": {
"meta": {
"channelId": "UCAuUUnT6oDeKwE6v1NGQxug"
},
"data": [
{
"type": "video",
"videoId": "abc123",
"title": "TED Live: Innovation Summit",
"viewCountText": "250K views",
"publishedTimeText": "Streamed 3 days ago",
"lengthText": "2:15:30",
"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.meta | object | Channel metadata |
data.meta.channelId | string | Unique YouTube channel identifier |
data.data | object[] | Array of livestream video objects |
data.data[].type | string | Content type (typically video) |
data.data[].videoId | string | Unique YouTube video identifier |
data.data[].title | string | Livestream title as displayed on YouTube |
data.data[].viewCountText | string | Human-readable view count (e.g. 250K views) |
data.data[].publishedTimeText | string | Relative time (e.g. Streamed 3 days ago) |
data.data[].lengthText | string | Stream duration in H:MM:SS format |
data.data[].thumbnail | object[] | Video thumbnail images at various resolutions |
data.continuation | string | Token to fetch the next page of results |