Youtube Scraper avatar

Youtube Scraper

Pricing

Pay per event

Go to Apify Store
Youtube Scraper

Youtube Scraper

Scrape YouTube videos, channels, and comments at scale. Search by keyword, get video details (views, likes, duration, category), channel profiles (subscribers, verification), and comments. Uses YouTube InnerTube API — no browser, no API key needed.

Pricing

Pay per event

Rating

0.0

(0)

Developer

Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

25

Total users

15

Monthly active users

a day ago

Last modified

Share

Scrape YouTube videos, channels, and comments at scale. Extract video metadata (titles, views, likes, duration, descriptions), channel info (subscribers, verification status), and comments (text, likes, replies). No YouTube API key required.

What does YouTube Scraper do?

YouTube Scraper extracts structured data from YouTube using four modes:

  • Search — Search YouTube by keyword and get video results with titles, views, duration, and thumbnails
  • Video details — Get full metadata for specific videos including likes, category, keywords, and comment counts
  • Channel info — Scrape channel profiles with subscriber counts, video counts, verification status, and descriptions
  • Comments — Extract comments from any video with author info, likes, reply counts, and hearted status

The scraper uses YouTube's internal API (InnerTube) for fast, reliable extraction without a browser. Results are returned as structured JSON ready for analysis.

Why use YouTube Scraper?

  • No API key needed — Works without YouTube Data API quotas or credentials
  • All-in-one — Search, video details, channels, and comments in a single tool
  • Rich metadata — Views, likes, duration, category, keywords, publish dates, and more
  • Fast extraction — Pure HTTP requests, no browser overhead (256 MB memory)
  • Pagination built-in — Automatically fetches multiple pages of results
  • Flexible input — Accepts URLs, video IDs, channel handles (@name), or channel IDs

Use cases

Marketing and brand teams

  • Market research — Track video performance, trending topics, and competitor channels
  • Brand monitoring — Track mentions, comments, and engagement on relevant videos
  • SEO research — Study YouTube search results, keywords, and ranking patterns

Agencies and content creators

  • Content analysis — Analyze video metadata, engagement metrics, and publishing patterns to inform content strategy
  • Influencer analytics — Gather channel stats, subscriber counts, and content output for partnership decisions
  • Competitive benchmarking — Compare video performance across channels in your niche

Research and data teams

  • Sentiment analysis — Extract comments for NLP processing and audience feedback
  • Academic research — Collect structured data for social media studies and trend analysis
  • Dataset building — Create training datasets from YouTube content metadata for ML models

Input parameters

ParameterTypeDefaultDescription
searchQueriesstring[][]Keywords to search on YouTube
videoUrlsstring[][]Video URLs or IDs for detailed scraping
channelUrlsstring[][]Channel URLs, handles, or IDs
maxResultsinteger100Max videos per query or channel
maxCommentsinteger0Max comments per video (0 = skip)
sortByenumrelevanceSort: relevance, date, viewCount, rating
languagestringenContent language (ISO code)
countrystringUSContent country (ISO code)

You can combine all three input types (search queries + video URLs + channel URLs) in a single run.

Output example

Video result

{
"type": "video",
"videoId": "dQw4w9WgXcQ",
"title": "Rick Astley - Never Gonna Give You Up (Official Video)",
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"channelName": "Rick Astley",
"channelId": "UCuAXFkgsw1L7xaCfnd5JJOw",
"channelUrl": "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw",
"viewCount": 1747977458,
"likeCount": 18828635,
"duration": "3:33",
"durationSeconds": 213,
"publishedAt": "2009-10-24T23:57:33-07:00",
"description": "The official video for \"Never Gonna Give You Up\" by Rick Astley...",
"thumbnailUrl": "https://i.ytimg.com/vi_webp/dQw4w9WgXcQ/maxresdefault.webp",
"category": "Music",
"keywords": ["rick astley", "Never Gonna Give You Up", "rickroll"],
"isLive": false,
"commentCount": 2400000,
"scrapedAt": "2026-03-05T02:31:42.157Z"
}

Channel result

{
"type": "channel",
"channelId": "UCsBjURrPoezykLs9EqgamOA",
"channelName": "Fireship",
"channelUrl": "https://www.youtube.com/@Fireship",
"handle": "@Fireship",
"subscriberCount": "4.11M subscribers",
"videoCount": "727 videos",
"description": "High-intensity code tutorials and tech news...",
"avatarUrl": "https://yt3.ggpht.com/...",
"bannerUrl": "https://yt3.googleusercontent.com/...",
"isVerified": true,
"scrapedAt": "2026-03-05T02:31:50.123Z"
}

Comment result

{
"type": "comment",
"videoId": "dQw4w9WgXcQ",
"commentId": "Ugzge340dBgB75hWBm54AaABAg",
"text": "can confirm: he never gave us up",
"authorName": "@YouTube",
"authorChannelId": "UCBR8-60-B28hp2BmDPdntcQ",
"likeCount": 192,
"replyCount": 960,
"publishedTimeText": "10 months ago",
"isHearted": true,
"scrapedAt": "2026-03-05T02:31:44.277Z"
}

How to scrape YouTube videos

  1. Open YouTube Scraper on Apify.
  2. Enter search keywords in searchQueries, video URLs in videoUrls, or channel URLs in channelUrls.
  3. Set maxResults to control how many videos to scrape per query or channel.
  4. Optionally set maxComments to extract comments from videos.
  5. Click Start and wait for the run to finish.
  6. Download results as JSON, CSV, or Excel from the Dataset tab.

How much does it cost to scrape YouTube?

YouTube Scraper uses pay-per-event pricing so you only pay for what you scrape:

EventPrice
Run start$0.005
Video scraped$0.003
Channel scraped$0.003
Comment scraped$0.0005

Cost examples

TaskItemsEstimated cost
Search 50 videos50 videos~$0.16
10 video details + comments (20 each)10 videos + 200 comments~$0.14
5 channels with 100 videos each5 channels + 500 videos~$1.52
Bulk 1,000 search results1,000 videos~$3.01

Platform compute costs (typically $0.001–0.01 per run) are included in these estimates.

Using the Apify API

Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('automation-lab/youtube-scraper').call({
searchQueries: ['machine learning tutorial'],
maxResults: 20,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Python

from apify_client import ApifyClient
client = ApifyClient('YOUR_API_TOKEN')
run = client.actor('automation-lab/youtube-scraper').call(run_input={
'searchQueries': ['machine learning tutorial'],
'maxResults': 20,
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)

cURL

curl "https://api.apify.com/v2/acts/automation-lab~youtube-scraper/runs" \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{"searchQueries": ["machine learning tutorial"], "maxResults": 20}'

Integrations

YouTube Scraper works with all Apify integrations out of the box:

  • Google Sheets — Auto-export video stats and channel data to a spreadsheet for tracking performance over time
  • Slack / Email — Get notified when scraping completes, or set up alerts for videos exceeding view thresholds
  • Webhooks — Send results to your API endpoint for custom processing or content pipelines
  • Zapier / Make — Connect to 5,000+ apps, e.g., save top-performing videos to Notion or trigger reports for new competitor uploads
  • Scheduled runs — Set up recurring scrapes (hourly, daily, weekly) to monitor channels or search queries
  • Data warehouses — Pipe data to BigQuery, Snowflake, or PostgreSQL for large-scale video analytics
  • AI/LLM pipelines — Feed video titles, descriptions, and comments into sentiment analysis or content recommendation models

Input examples

Search for videos

{
"searchQueries": ["python tutorial", "web development"],
"maxResults": 50,
"sortBy": "viewCount"
}

Get video details with comments

{
"videoUrls": [
"https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"https://youtu.be/jNQXAC9IVRw"
],
"maxComments": 100
}

Scrape channels

{
"channelUrls": [
"@Fireship",
"https://www.youtube.com/@mkbhd",
"UCsBjURrPoezykLs9EqgamOA"
],
"maxResults": 200
}

Tips and best practices

  • Combine modes — Use search queries, video URLs, and channel URLs in a single run to minimize startup costs
  • Start small — Test with maxResults: 10 before scaling up to hundreds
  • Comments are optional — Set maxComments: 0 (default) to skip comments and reduce costs
  • Flexible video input — Pass full URLs (youtube.com/watch?v=..., youtu.be/...) or just the 11-character video ID
  • Channel handles — Use @ChannelName format, full URL, or channel ID (starting with UC)
  • Sort options — Use viewCount to find popular videos or date for the latest uploads
  • Localization — Set language and country to get region-specific results

Use with AI agents via MCP

YouTube Scraper is available as a tool for AI assistants that support the Model Context Protocol (MCP). This lets you use natural language to scrape data — just ask your AI assistant and it will configure and run the scraper for you.

Setup for Claude Code

$claude mcp add --transport http apify "https://mcp.apify.com"

Setup for Claude Desktop, Cursor, or VS Code

Add this to your MCP config file:

{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com"
}
}
}

Your AI assistant will use OAuth to authenticate with your Apify account on first use.

Example prompts

Once connected, try asking your AI assistant:

  • "Scrape the top 50 videos for 'machine learning tutorial'"
  • "Get all comments from this YouTube video"
  • "Scrape channel info and videos from @mkbhd"

Learn more in the Apify MCP documentation.

Limitations

  • Comments are top-level only (no nested replies)
  • Live stream chat messages are not captured
  • Age-restricted videos may return limited metadata
  • YouTube may rate-limit very large scraping jobs; the scraper handles retries automatically

Legality

Scraping publicly available data is generally legal according to the US Court of Appeals ruling (HiQ Labs v. LinkedIn). This actor only accesses publicly available information and does not require authentication. Always review and comply with the target website's Terms of Service before scraping. For personal data, ensure compliance with GDPR, CCPA, and other applicable privacy regulations.

FAQ

Does this scraper require a YouTube API key? No. It uses YouTube's internal InnerTube API, so you don't need a YouTube Data API key or quota.

How many videos can I scrape per search query? Up to several hundred per query. YouTube's internal API paginates results, and the scraper follows pagination automatically up to your maxResults limit.

Can I scrape comments from any video? Yes, as long as comments are enabled on the video. Set maxComments to the number of comments you want per video. Comments are top-level only (no nested replies).

The scraper returns fewer results than expected — what's happening? YouTube may return fewer results than your maxResults setting if the search query has limited matches or if you're scraping a channel with fewer videos. For search queries, try broader keywords or different sortBy options.

Some videos show 0 likes — is the scraper broken? No. YouTube hides like counts on some videos at the creator's request. When like counts are hidden, the API returns 0.

How do you scrape YouTube without an API key?

YouTube's official Data API v3 has a daily quota of 10,000 units — enough for roughly 100 search queries or 10,000 video detail lookups. That quota resets once per day, and exceeding it requires applying for a quota increase (which Google often denies). For serious research or production pipelines, the official API is frequently too restrictive.

YouTube Scraper bypasses these limitations entirely by using YouTube's internal InnerTube API — the same API that the YouTube web app uses to load search results, video metadata, and comments. This API has no public quota system, no key requirement, and supports the full range of data available on the YouTube website.

The trade-off: YouTube can change its internal API at any time without notice, whereas the official Data API v3 is a stable, versioned product. For production use, be aware that internal API-based scrapers may need periodic updates when YouTube changes its front-end.

For cost comparison, YouTube Scraper charges $0.003 per video and $0.0005 per comment, with no monthly fees. The official API is "free" within quota but requires developer overhead, OAuth setup, and quota management — and research-grade quotas now require paid Google Cloud billing.

How do you scrape YouTube comments at scale?

YouTube comments are one of the richest sources of unfiltered consumer opinion on products, services, and topics. To extract them with YouTube Scraper:

  1. Set videoUrls to the list of videos you want comments from
  2. Set maxComments to the number of comments per video (e.g., 500 for a medium-depth scrape)
  3. Run the scraper — comments are returned as separate items with type: "comment" in the dataset

Practical limits to know:

  • Very popular videos can have millions of comments; YouTube's internal API paginates them in batches of ~20
  • Extracting 1,000 comments from a single video costs $0.50 (1,000 × $0.0005) plus the video metadata charge
  • YouTube shows comments in "top comments" order by default (highest engagement first) — this is generally what you want for sentiment analysis since it surfaces the most-reacted opinions

What you get per comment: text content, author username, author channel ID, like count, reply count, whether the creator hearted it, and publish timestamp (as relative text like "2 years ago").

Limitations: The scraper returns top-level comments only — nested replies within comment threads are not included. For most NLP and sentiment use cases, top-level comments are sufficient.

Scraping publicly available YouTube data — video metadata, channel statistics, and comments that any visitor can see without logging in — is generally legal under the US Ninth Circuit's ruling in hiQ Labs v. LinkedIn (2022), which held that scraping public web data does not violate the Computer Fraud and Abuse Act.

YouTube Scraper:

  • Does not require authentication or bypass any login
  • Only accesses data that is publicly visible on youtube.com
  • Does not circumvent age restrictions or geographic blocks
  • Does not download video files (only metadata, thumbnails, and text)

However, there are considerations:

  • Google's Terms of Service prohibit automated scraping of YouTube. For personal research and small-scale analysis, enforcement is rare. For large commercial operations, be aware of the ToS risk.
  • GDPR applies if you're collecting comment text linked to identifiable EU users for commercial purposes
  • Academic researchers scraping for non-commercial studies operate in a stronger legal position than commercial data aggregators

When in doubt, use the official YouTube Data API for projects with strict compliance requirements, and use YouTube Scraper where quota constraints make the official API impractical.

How do you track a YouTube channel's performance over time?

Tracking a channel's growth and video performance over time requires capturing snapshots at regular intervals and comparing them. Here's a practical setup:

Step 1: Set up a scheduled scrape Configure YouTube Scraper with the channel URLs you want to track and set maxResults to cover all recent videos (e.g., 50 for active channels). Use Apify Schedules to run weekly.

Step 2: Export to a time-series dataset Each run adds new data to a dataset. Export to Google Sheets or BigQuery, appending rows with each run. The scrapedAt timestamp lets you build time-series charts.

Step 3: Calculate growth metrics Compare subscriber count week-over-week for channel growth rate. For individual videos, compare view count between runs to measure velocity (views per day). Videos with accelerating view counts are being promoted by the algorithm.

Key metrics to track:

  • Subscriber count delta (channel growth)
  • View count velocity for recent videos (algorithm pickup)
  • Like/view ratio (engagement quality signal)
  • Upload frequency (content cadence)
  • Video length trends (format experimentation)

Cost for monitoring 10 channels with 50 videos each, weekly: 10 channels × $0.003 + 500 videos × $0.003 ≈ $1.53 per run, or about $6/month.

How do you do YouTube SEO research with a scraper?

YouTube SEO research involves understanding what keywords drive views, what video formats rank, and what content gaps competitors haven't filled. A scraper gives you the raw data to answer these questions systematically.

Keyword research via search results: Search a target keyword in YouTube Scraper with sortBy: "relevance" and collect the top 50–100 results. For each video, note: title patterns (which words appear in every top-ranking title), video length (do short or long videos dominate?), view counts (what's the floor for ranking in the top 20?), and upload age (how fresh does content need to be?).

Competitor channel analysis: Scrape competitor channels with maxResults: 200 to get their full video catalog. Sort by view count to find their top performers. Look for:

  • Topic clusters where they have many high-performing videos (they've established authority there)
  • Topics with only one or two videos despite strong performance (an opportunity to go deeper)
  • Upload cadence gaps (if they stopped covering a topic, that's your opening)

Comment mining for content ideas: Extract comments from top-performing videos in your niche. Search for questions in the comment text — phrases like "how do I", "what about", "can you make a video on". These are content requests your audience is already making.

Title and description patterns: Collect the title, description, and keywords fields from the top 20 videos for your target keyword. Identify which words appear in 50%+ of top-ranking titles — those are the terms YouTube's algorithm associates with relevance for that query.

Other YouTube and video scrapers on Apify