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

2

Total users

1

Monthly active users

2 days ago

Last modified

Categories

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

  • Market research — Track video performance, trending topics, and competitor channels
  • Content analysis — Analyze video metadata, engagement metrics, and publishing patterns
  • Sentiment analysis — Extract comments for NLP processing and audience feedback
  • SEO research — Study YouTube search results, keywords, and ranking patterns
  • Academic research — Collect structured data for social media studies
  • Brand monitoring — Track mentions, comments, and engagement on relevant videos
  • Influencer analytics — Gather channel stats, subscriber counts, and content output
  • Dataset building — Create training datasets from YouTube content metadata

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 much does it cost?

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.

API usage

Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('YOUR_USERNAME/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('YOUR_USERNAME/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/YOUR_USERNAME~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 results to a spreadsheet
  • Slack / Email — Get notified when scraping completes
  • Webhooks — Trigger downstream workflows on completion
  • Zapier / Make — Connect to 5,000+ apps
  • API — Full REST API for programmatic access
  • Scheduled runs — Set up recurring scrapes (hourly, daily, weekly)

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

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

Support

For questions, bug reports, or feature requests, open an issue on the actor's GitHub repository or contact support through the Apify Console.