Back to Blog
General

YouTube Videos Scraper API: Extract All Videos from Any Channel

January 10, 2026
4 min read
S
By SociaVault Team
youtubevideos scraperapicontent analysis

YouTube Videos Scraper API: Extract Channel Videos at Scale

Need to analyze YouTube video content? This guide shows you how to extract videos, metadata, and performance metrics from any YouTube channel.

What Video Data Can You Extract?

FieldDescription
Video IDUnique identifier
TitleVideo title
DescriptionFull description
ViewsView count
LikesLike count
CommentsComment count
DurationVideo length
Published DateUpload date
ThumbnailThumbnail URL
TagsVideo tags
CategoryContent category

Using the Videos API

const response = await fetch('https://api.sociavault.com/youtube/channel-videos', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    handle: 'MrBeast'
  })
});

const videos = await response.json();

Sample Response

{
  "videos": [
    {
      "id": "dQw4w9WgXcQ",
      "title": "I Gave Away $1,000,000",
      "description": "Today I'm giving away one million dollars...",
      "views": 125000000,
      "likes": 5200000,
      "comments": 89000,
      "duration": "18:30",
      "durationSeconds": 1110,
      "publishedAt": "2026-01-05T14:00:00Z",
      "thumbnail": "https://...",
      "tags": ["mrbeast", "challenge", "money"],
      "category": "Entertainment"
    }
  ],
  "hasMore": true,
  "cursor": "next_page_token"
}

Use Cases

Content Performance Analysis

Find top-performing videos:

const { videos } = await getChannelVideos('competitor');

// Sort by views
const topVideos = [...videos].sort((a, b) => b.views - a.views).slice(0, 10);

// Calculate averages
const avgViews = videos.reduce((s, v) => s + v.views, 0) / videos.length;
const avgLikes = videos.reduce((s, v) => s + v.likes, 0) / videos.length;
const avgEngagement = avgLikes / avgViews;

console.log(`Top video: ${topVideos[0].title}`);
console.log(`Average views: ${avgViews.toLocaleString()}`);
console.log(`Engagement rate: ${(avgEngagement * 100).toFixed(2)}%`);

Title Analysis

Study what titles perform best:

const { videos } = await getChannelVideos('channel');

// Analyze title patterns
const titlePatterns = {
  numbers: videos.filter(v => /\d/.test(v.title)),
  questions: videos.filter(v => v.title.includes('?')),
  howTo: videos.filter(v => /how to/i.test(v.title)),
  lists: videos.filter(v => /^\d+ |top \d+/i.test(v.title))
};

// Compare performance
for (const [pattern, patternVideos] of Object.entries(titlePatterns)) {
  const avgViews = patternVideos.reduce((s, v) => s + v.views, 0) / patternVideos.length;
  console.log(`${pattern}: ${avgViews.toLocaleString()} avg views`);
}

Duration Analysis

Find optimal video length:

const { videos } = await getChannelVideos('channel');

// Group by duration
const shortVideos = videos.filter(v => v.durationSeconds < 300); // < 5 min
const mediumVideos = videos.filter(v => v.durationSeconds >= 300 && v.durationSeconds < 900); // 5-15 min
const longVideos = videos.filter(v => v.durationSeconds >= 900); // 15+ min

const avgViews = (arr) => arr.reduce((s, v) => s + v.views, 0) / arr.length;

console.log(`Short videos: ${avgViews(shortVideos).toLocaleString()} avg views`);
console.log(`Medium videos: ${avgViews(mediumVideos).toLocaleString()} avg views`);
console.log(`Long videos: ${avgViews(longVideos).toLocaleString()} avg views`);

Tag Analysis

Extract and analyze video tags:

const { videos } = await getChannelVideos('channel');

const tagCounts = {};
videos.forEach(video => {
  video.tags?.forEach(tag => {
    tagCounts[tag] = (tagCounts[tag] || 0) + 1;
  });
});

const topTags = Object.entries(tagCounts)
  .sort((a, b) => b[1] - a[1])
  .slice(0, 20);

console.log('Most used tags:', topTags);

Pagination

Get all videos from a channel:

async function getAllVideos(handle) {
  let allVideos = [];
  let cursor = null;
  
  do {
    const response = await fetch('https://api.sociavault.com/youtube/channel-videos', {
      method: 'POST',
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({ handle, cursor })
    });
    
    const data = await response.json();
    allVideos = [...allVideos, ...data.videos];
    cursor = data.hasMore ? data.cursor : null;
    
  } while (cursor);
  
  return allVideos;
}

Frequently Asked Questions

How many videos can I get per request?

Each request returns up to 30 videos. Use pagination to retrieve more.

Can I filter by date range?

The API returns videos in chronological order (newest first). Filter by publishedAt client-side for date ranges.

Are YouTube Shorts included?

By default, both regular videos and Shorts are included. Use the Shorts endpoint for Shorts-only content.

Can I get videos from private/unlisted?

No, only public videos are accessible.

How far back can I get videos?

You can access a channel's entire video history going back to their first upload.

Get Started

Create your account and start extracting YouTube video data.

Documentation: /docs/api-reference/youtube/channel-videos

Found this helpful?

Share it with others who might benefit

Ready to Try SociaVault?

Start extracting social media data with our powerful API. No credit card required.