YouTube Scraper — Videos, Channels & Search Results avatar

YouTube Scraper — Videos, Channels & Search Results

Pricing

Pay per usage

Go to Apify Store
YouTube Scraper — Videos, Channels & Search Results

YouTube Scraper — Videos, Channels & Search Results

Extract YouTube video data from search results and channel pages. Scrape titles, view counts, durations, thumbnails, publish dates, channel info, subscriber counts, and descriptions. Sort by relevance, date, views, or rating. Perfect for content research, competitor analysis, influencer discovery, a

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Ricardo Akiyoshi

Ricardo Akiyoshi

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

an hour ago

Last modified

Categories

Share

Extract YouTube video data and channel metadata without the YouTube API. Search for videos by keyword, scrape channel pages for video listings, and export structured data to JSON, CSV, or Excel.

Features

  • Video search — search YouTube by keyword and extract all video results
  • Channel scraping — scrape any channel's video catalog and metadata
  • Rich video data — title, view count, duration, thumbnail, publish date, channel, description snippet
  • Channel metadata — subscriber count, total views, video count, description, avatar, banner, join date
  • Sort options — sort search results by relevance, upload date, view count, or rating
  • Smart parsing — converts "1.2M views" to 1200000, "12:34" durations, relative dates to ISO format
  • No API key — works without YouTube Data API credentials
  • Proxy support — optional Apify proxy configuration for large-scale scrapes
  • Pay-per-event — charged per video or channel scraped

Use Cases

Content Research

Find trending videos and popular content in any niche. Analyze titles, view counts, and publishing patterns to inform your content strategy.

Competitor Analysis

Monitor competitor YouTube channels. Track their upload frequency, view counts, and which videos perform best. Identify content gaps and opportunities.

Influencer Discovery

Search for creators in your industry. Compare subscriber counts, average view counts, and content focus to find the right partners for influencer marketing campaigns.

Video Marketing Intelligence

Analyze search results for your target keywords. Understand what content ranks, what titles get clicks, and what durations perform best.

Market Research

Track product reviews, tutorials, and unboxing videos for competitive intelligence. Monitor brand mentions and sentiment through video content.

Academic Research

Collect structured data on video publishing trends, viewership patterns, and content creation dynamics for media studies research.

Input

FieldTypeDefaultDescription
searchQueriesString[][]List of YouTube search queries
channelUrlsString[][]List of YouTube channel URLs or handles
maxVideosInteger20Maximum videos per search query or channel
sortByEnumrelevanceSort order: relevance, date, view_count, rating
scrapeChannelInfoBooleantrueAlso extract channel metadata when scraping channels
maxConcurrencyInteger3Parallel requests (lower = safer from blocks)
proxyConfigurationObject(none)Apify proxy settings

Channel URL Formats

The scraper accepts multiple channel URL formats:

  • @mkbhd — just the handle
  • https://www.youtube.com/@mkbhd — full handle URL
  • https://www.youtube.com/channel/UCBcRF18a7Qf58cCRy5xuWwQ — channel ID URL
  • UCBcRF18a7Qf58cCRy5xuWwQ — bare channel ID

Input Examples

Search for videos about machine learning

{
"searchQueries": ["machine learning tutorial 2026"],
"maxVideos": 50,
"sortBy": "view_count"
}

Scrape a channel's videos and info

{
"channelUrls": ["@mkbhd"],
"maxVideos": 100,
"scrapeChannelInfo": true
}

Multi-query competitive research

{
"searchQueries": [
"web scraping tutorial",
"data extraction automation",
"apify actor tutorial"
],
"maxVideos": 20,
"sortBy": "relevance"
}

Monitor multiple channels

{
"channelUrls": [
"@mkbhd",
"@LinusTechTips",
"@veritasium"
],
"maxVideos": 30,
"scrapeChannelInfo": true,
"maxConcurrency": 2
}

Output

Video Result

Each video is saved to the default dataset with the following fields:

{
"type": "video",
"title": "How to Build a Web Scraper in 10 Minutes",
"videoId": "dQw4w9WgXcQ",
"videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"thumbnailUrl": "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg",
"viewCount": 1523847,
"viewCountText": "1.5M views",
"duration": "10:23",
"publishedDate": "2026-02-15",
"publishedText": "2 weeks ago",
"channelName": "Code With Me",
"channelUrl": "https://www.youtube.com/@codewithme",
"descriptionSnippet": "Learn how to build a web scraper using Python and BeautifulSoup in just 10 minutes...",
"scrapedAt": "2026-03-01T12:00:00.000Z"
}

Channel Result

When scrapeChannelInfo is enabled, channel metadata is also saved:

{
"type": "channel",
"channelName": "MKBHD",
"channelUrl": "https://www.youtube.com/@mkbhd",
"description": "MKBHD: Quality Tech Videos | YouTuber | Geek | Consumer Electronics | Tech Head...",
"subscriberCount": 19200000,
"subscriberCountText": "19.2M subscribers",
"videoCount": 1850,
"videoCountText": "1,850 videos",
"totalViews": 4500000000,
"totalViewsText": "4,500,000,000 views",
"avatarUrl": "https://yt3.googleusercontent.com/...",
"bannerUrl": "https://yt3.googleusercontent.com/...",
"joinDate": "Joined Mar 21, 2008",
"country": "United States",
"keywords": "MKBHD tech reviews smartphones",
"scrapedAt": "2026-03-01T12:00:00.000Z"
}

How It Works

YouTube embeds all page data in a JavaScript variable called ytInitialData inside the HTML. This scraper:

  1. Fetches the page HTML using CheerioCrawler (no browser needed)
  2. Extracts the ytInitialData JSON from the <script> tags
  3. Parses the nested renderer objects to extract video and channel data
  4. Converts human-readable numbers (1.2M, 542K) to integers
  5. Converts relative dates ("2 weeks ago") to ISO date strings

This approach is fast and lightweight compared to browser-based scrapers, but relies on YouTube's HTML structure remaining consistent.

Performance Tips

  1. Start small — test with maxVideos: 5 to verify the scraper works before scaling up.
  2. Use proxies for large scrapes — YouTube will serve consent walls or CAPTCHAs after many requests. Apify residential proxies work best.
  3. Lower concurrencymaxConcurrency: 2 is safest. Increase only if using proxies.
  4. Sort by view_count — when researching popular content, sorting by views gives you the most valuable results first.
  5. Combine search + channels — use search queries to discover channels, then scrape those channels directly for complete video catalogs.

Limitations

  • YouTube's initial page data typically includes 20-30 videos per page. For channels with thousands of videos, only the first page of results is returned per request.
  • Live streams, Shorts, and premieres may appear in results but their metadata format can differ slightly.
  • YouTube frequently A/B tests page layouts, which may affect data extraction. The scraper handles multiple known layouts.
  • Consent walls in some regions may block scraping. Use proxies with US/UK locations for best results.

Pricing (Pay Per Event)

This actor uses Apify's pay-per-event model. You are charged for each video or channel successfully scraped and saved to the dataset.

This actor is provided as a technical tool. Users are responsible for ensuring their use complies with YouTube's Terms of Service and all applicable laws. The actor is designed for personal research and analysis purposes.

Integration — Python

from apify_client import ApifyClient
client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("sovereigntaylor/youtube-scraper").call(run_input={
"searchTerms": ["machine learning tutorial"],
"maxResults": 50
})
for video in client.dataset(run["defaultDatasetId"]).iterate_items():
print(f"{video['title']}{video.get('viewCount', 0):,} views")

Integration — JavaScript

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('sovereigntaylor/youtube-scraper').call({
searchTerms: ['machine learning tutorial'],
maxResults: 50
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach(v => console.log(`${v.title}${v.viewCount?.toLocaleString()} views`));