Content
YouTube Comments Scraper
youtube.com
YouTube comments are served through a dedicated plugin endpoint rather than the generic page fetch. Give it a video - a bare id like dQw4w9WgXcQ or any watch URL - and it returns the comments already parsed: for each one the author name and channel id, the comment text, the like count and reply count, the published time, the comment id and the pinned, hearted, verified and uploader flags, plus the video's title and total comment count. Sort by top or newest and collect as many as you need across pages. It reads YouTube's own comment data, so there is no InnerTube API to reverse-engineer and no login or cookies involved.
What you can extract
- Comment author name and channel id
- Comment text and comment id
- Like count and reply count
- Published time
- Pinned, hearted, verified and uploader flags
- Video title and total comment count
Dedicated endpoints
/content/youtube-comments A video's comments
A video's comments by id or watch URL: each with author (name / channel id / thumbnail), text, like count, reply count, published time, comment id and pinned / hearted / verified / uploader flags, plus the video title and total comment count. Sort by top or newest; collect up to max_results across pages.
How to scrape it
curl -X POST \
-H "X-ScrapeUnblocker-Key: $SU_API_KEY" \
"https://api.scrapeunblocker.com/content/youtube-comments?video=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DdQw4w9WgXcQ"import requests
resp = requests.post(
"https://api.scrapeunblocker.com/content/youtube-comments",
headers={"X-ScrapeUnblocker-Key": SU_API_KEY},
params={"video": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"},
)
print(resp.text)import { ScrapeUnblockerClient } from 'scrapeunblocker';
const su = new ScrapeUnblockerClient({ apiKey: process.env.SU_API_KEY });
const data = await su.youtubeComments('https://www.youtube.com/watch?v=dQw4w9WgXcQ', { sort: 'top', maxResults: 100 });
console.log(data); Requests are POST and take their parameters in the query string. Browser rendering always happens - there is no flag to enable.
Frequently asked questions
Is it legal to scrape YouTube comments?
Collecting publicly available YouTube comment data such as comment text, like counts and reply counts is lawful in many jurisdictions, but the rules depend on your country, the data you collect and how you use it. Some of it can be personal data, so follow the privacy rules that apply to you. ScrapeUnblocker returns the public page; what you collect and how you use it is your responsibility.
How do I scrape YouTube comments without getting blocked?
YouTube is protected by Google's own anti-bot systems. ScrapeUnblocker rotates residential and ISP exits and handles challenges, and the YouTube Comments plugin returns the comments as parsed JSON. In ScrapeUnblocker's benchmark it returned real content on 98.7% of 1,058 calls, about 2.7s per call.
What YouTube comment data can I get?
For each comment: author name and channel id, the comment text and comment id, like count and reply count, published time, and the pinned, hearted, verified and uploader flags, plus the video's title and total comment count. Sort by top or newest and collect up to max_results across pages, about 20 comments per page.
Do I need a YouTube API key or account?
No. The YouTube Comments plugin returns a video's comments as JSON without a YouTube API account, login or cookies. Pass a bare video id such as dQw4w9WgXcQ or any watch URL. A video with comments turned off returns 404 rather than an empty list.
Can I collect YouTube comments at scale?
Yes. One call collects the comments of one video up to max_results, and calls run in parallel up to your plan's concurrency limit: 20 to 100 concurrent requests on Pay as you go, Starter and Pro, and 200 to 400 on Business, Scale and Ultimate. That covers sentiment work across many videos.
How much does it cost to scrape YouTube comments?
Pricing is per request: 1 request = 1 credit, from EUR 1.00 per 1,000 on pay as you go to about EUR 0.55 per 1,000 on the Ultimate plan. Plugin calls use the same plan quota as any other request. One call returns one video's comments, collected across pages up to max_results. Blocks, timeouts and errors on ScrapeUnblocker's side are not billed, and the free trial includes 500 requests with no card.
Related scrapers
Start scraping this site today
Free tier included. No credit card required to test it.