All scrapers

Content

YouTube Comments Scraper

youtube.com

Google Protection
Served by plugin endpoints

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(results);

Requests are POST and take their parameters in the query string. Browser rendering always happens - there is no flag to enable.

Read the API docs

Related scrapers

Start scraping this site today

Free tier included. No credit card required to test it.