Youtube Scraper avatar

Youtube Scraper

Pricing

from $1.50 / 1,000 results

Go to Apify Store
Youtube Scraper

Youtube Scraper

Scrape YouTube videos, channels, playlists, and search results. Extract video metadata, view counts, comments, and channel statistics. Export as JSON, CSV, or Excel.

Pricing

from $1.50 / 1,000 results

Rating

0.0

(0)

Developer

Harald

Harald

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

10 hours ago

Last modified

Share

🎬 YouTube Video & Channel Scraper

Scrape YouTube search results, video details, and channel information — fast and cost-effective using lightweight HTML parsing with Crawlee's CheerioCrawler (no browser needed).

What it does

This actor extracts structured data from YouTube by parsing the server-rendered ytInitialData embedded in page HTML. No headless browser is required, making it significantly cheaper and faster than browser-based scrapers.

Supported inputs

  • Search keywords — search YouTube and extract video results with pagination
  • Channel URLs — get channel info (subscribers, video count, description) and list their videos
  • Video URLs — extract full video details (views, likes, duration, publish date, etc.)

Output

Video data

FieldDescription
videoIdYouTube video ID
titleVideo title
descriptionVideo description or snippet
viewCountNumber of views (numeric)
likesLike count (numeric, when available)
commentCountComment count (when available)
publishedAtPublish date (ISO format for video pages)
channelNameChannel name
channelIdChannel ID
durationVideo duration (human-readable)
thumbnailUrlHighest-res thumbnail URL
urlFull video URL
keywordsVideo tags/keywords (video pages only)
categoryVideo category (video pages only)

Channel data

FieldDescription
channelIdYouTube channel ID
nameChannel name
subscribersSubscriber count text
videoCountTotal video count
descriptionChannel description
joinedDateChannel creation date
totalViewsTotal channel views
urlChannel URL

Input example

{
"searchKeywords": ["machine learning tutorial", "cooking recipes"],
"channelUrls": ["https://www.youtube.com/@MrBeast"],
"videoUrls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
"maxResults": 50,
"maxSearchPages": 5
}

Input parameters

ParameterTypeDefaultDescription
searchKeywordsarray[]Search queries to find videos
channelUrlsarray[]Channel URLs to scrape
videoUrlsarray[]Video URLs to scrape
maxResultsinteger50Max results per search/channel
maxSearchPagesinteger5Max pagination pages per search

How it works

  1. Search — Fetches YouTube search results pages, extracts video renderers from ytInitialData, and follows continuation tokens for pagination
  2. Channels — Visits the channel's about page for metadata, then the videos tab to list uploads
  3. Videos — Extracts ytInitialData and ytInitialPlayerResponse for comprehensive video details

Cost estimation

  • ~1 CU per 100 search results
  • ~1 CU per channel (about + videos page)
  • ~0.5 CU per 100 individual video pages

Uses Apify residential proxy to avoid blocks.

Limitations

  • Comment counts may not always be available (loaded dynamically on some pages)
  • Likes are approximate (YouTube shows rounded numbers)
  • Search pagination uses YouTube's internal API continuation tokens
  • Very large channels may not return all videos in a single run

Tip

For best results, combine search keywords with direct video URLs for the most comprehensive data extraction. Search results provide discovery, while individual video pages give the most detailed metadata.