https://videomentions.com/api/v1/channel-videos?id=${CHANNEL_ID}&continuation=${CONTINUATION}
This endpoint can be used for fetching a YouTube channel’s videos
id
- string. YouTube channel ID.continuation
- string. (optional) Continuation string to get the next page of results.items
- array. Array of objects representing the channel’s videos.
id
- string. Video ID.title
- string. Video title.descriptionSnippet
- string. A truncated video description.thumbnails
- array. Video thumbnails.
url
- string. Thumbnail URL.width
- integer. Thumbnail width in pixels.height
- integer. Thumbnail height in pixels.duration
- integer. Length of the video in seconds.viewCount
- integer. Number of views.publishedText
- string|null. Human-readable text indicating when the video was published. null
if data is unavailable.continuation
- string|null. Continuation string to be included in subsequent requests for paginated data. This value is null
when no more pages remain.items
array typically includes about 30 records, but the number of records per page can vary slightly.id
or continuation
parameter is provided, a 400 Bad Request
error response will be returned.Below is an example request for getting the playlists belonging to the YouTube channel with an ID of UCddiUEpeqJcYeBxX1IVBKvQ
.
curl -X GET
-H "API-Key: your-api-key"
-H "API-Secret: your-api-secret"
https://videomentions.com/api/v1/channel-videos?id=UCddiUEpeqJcYeBxX1IVBKvQ
{
"items": [
{
"id": "wVAN-dlocsA",
"title": "The future of Surface is incredibly unclear with these new devices",
"descriptionSnippet": "Microsoft wrapped up its Surface and AI event, where it made several major announcements. In addition to revealing the Surface Laptop Studio 2, Microsoft announced some updates to Copilot....",
"thumbnails": [
{
"url": "https://i.ytimg.com/vi/wVAN-dlocsA/hqdefault.jpg?sqp=-oaymwEjCNACELwBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLCKBGnm8t8bH0BD9cl1Y0pktaOrng",
"width": 336,
"height": 188
},
{
"url": "https://i.ytimg.com/vi/wVAN-dlocsA/hqdefault.jpg?sqp=-oaymwEjCPYBEIoBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLBhESz3EBiuLf-eaXJttvQ3wosXdg",
"width": 246,
"height": 138
},
{
"url": "https://i.ytimg.com/vi/wVAN-dlocsA/hqdefault.jpg?sqp=-oaymwEiCMQBEG5IWvKriqkDFQgBFQAAAAAYASUAAMhCPQCAokN4AQ==&rs=AOn4CLDSlc-I9TdpIaC2aJ6yjELnLyc10A",
"width": 196,
"height": 110
},
{
"url": "https://i.ytimg.com/vi/wVAN-dlocsA/hqdefault.jpg?sqp=-oaymwEiCKgBEF5IWvKriqkDFQgBFQAAAAAYASUAAMhCPQCAokN4AQ==&rs=AOn4CLDchXvfZwRN1_-UmvQOAV4-LOwOxg",
"width": 168,
"height": 94
}
],
"duration": 369,
"viewCount": 134546,
"publishedText": "2 days ago"
},
{
"id": "Ek2nUYzlLlo",
"title": "Apple Watch Series 9 & Ultra 2 review: quietly the best",
"descriptionSnippet": "The Apple Watch Series 9 and Ultra 2 don’t look a whole lot different from their predecessors. That’s because hardware isn’t the star of the show this year. That is, unless you’re talking...",
"thumbnails": [
{
"url": "https://i.ytimg.com/vi/Ek2nUYzlLlo/hqdefault.jpg?sqp=-oaymwEjCNACELwBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLCYPfVHM2zFktH9L6yA10Y95d8LfQ",
"width": 336,
"height": 188
},
{
"url": "https://i.ytimg.com/vi/Ek2nUYzlLlo/hqdefault.jpg?sqp=-oaymwEjCPYBEIoBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLAUidlvG846pbkX_cpxlqclKrYU6Q",
"width": 246,
"height": 138
},
{
"url": "https://i.ytimg.com/vi/Ek2nUYzlLlo/hqdefault.jpg?sqp=-oaymwEiCMQBEG5IWvKriqkDFQgBFQAAAAAYASUAAMhCPQCAokN4AQ==&rs=AOn4CLAtYXHFOtF5ztMBJBfBqdNvqdGAUA",
"width": 196,
"height": 110
},
{
"url": "https://i.ytimg.com/vi/Ek2nUYzlLlo/hqdefault.jpg?sqp=-oaymwEiCKgBEF5IWvKriqkDFQgBFQAAAAAYASUAAMhCPQCAokN4AQ==&rs=AOn4CLAHyvnCapHlrfZxqcHoZEciTSSLv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bHJKdXVOVzZrb21GX2JtWnVjcVRMMFNzY3F3SFpPRVdtb3pxNTFnZ1pLRUdPQ084aXl6eEYyNlptMkFFWkVLZmVFb3hMNVRIaGVCVVZMejN5UjNVcFB0b1Q2SzhTQUpHcER1N3lYUW04ZDg2N0VSamRXNW1nVVVSNjRERkdON2VOamZ6QVpZSTdpMUt3Tk9udENkdWpvUWJMa1QxU1dJaWpzcEY5TDhVd1I2Nkl0czVPeTVvQzlsZ1gydlJTeUtjNENaNENYXzJWeUlwdURHRXFQdGJzakxkczd4Q1lmUlVlVEt1RnlvU0pEWTFNbU14WmpFM0xUQXdNREF0TW1FMU9TMDVOMlprTFRVNE1qUXlPV05tWVRSbU5CZ0I%3D"
}
Below is an example showing how to get paginated results in JavaScript/TypeScript.
Notice that the continuation
string from page 1 is provided as a parameter to get page 2. This process can be repeated to get pages 3, 4, etc. When no more pages remain, the value of continuation
will be null
.
const channelId = 'UCddiUEpeqJcYeBxX1IVBKvQ';
// Fetch page 1
const pageOneResponse = await fetch(
`https://videomentions.com/api/v1/channel-videos?id=${channelId}`,
{
headers: {
'API-Key': 'your-api-key',
'API-Secret': 'your-api-secret',
},
}
);
const pageOneData = await pageOneResponse.json();
console.log('Page 1 results:', pageOneData.items);
// Verify that a next page exists
const haveNextPage = pageOneData.continuation !== null;
if (!haveNextPage) {
// Don't attempt to fetch the next page if no more pages remain
return;
}
// Fetch page 2
const pageTwoResponse = await fetch(
`https://videomentions.com/api/v1/channel-videos?id=${channelId}&continuation=${pageOneData.continuation}`,
{
headers: {
'API-Key': 'your-api-key',
'API-Secret': 'your-api-secret',
},
}
);
const pageTwoData = await pageTwoResponse.json();
console.log('Page 2 results:', pageTwoData.items);