YouTube Comments Scraper: Get Public Comments without Login or Cookies
Scraping YouTube comments is a notorious headache for developers. You often run into bot detection, being forced to log in, or spending a fortune on heavy headless browsers just to get a list of text.
If you need structured JSON data from public videos for social listening, sentiment analysis, or research, you need a way to bypass these hurdles without managing complex proxy rotation or fragile Playwright/Selenium scripts.
The youtube-comments-scraper from the Steadfetch collection on Apify solves this. It uses lightning-fast HTTP requests to hit YouTube's own public comment endpoints, delivering typed JSON data at a fraction of the cost of browser-based alternatives.
Why it's different
Unlike traditional scrapers that load the whole heavy YouTube page, this Actor interacts directly with the public engagement API. This means:
- No Login/Cookies Required: It reads only what any logged-out user can see.
- Extreme Speed & Low Cost: Since it doesn't use a browser, it's incredibly fast and much cheaper to run.
- Reliable Data: You get clean, structured JSON for every comment, including author handles and likes, without the risk of "broken selectors" when YouTube updates its UI.
Quickstart Guide
Ready to get started? Here is how you can scrape comments in minutes.
1. Access the Actor
Head over to the Apify Store and locate the YouTube Comments Scraper.
2. Configure your input
To get started, you only need two main fields:
-
startUrls: An array of public YouTube video URLs or video IDs. -
maxComments: The total number of comments you want to collect.
Here is a sample input for a standard run:
{
"startUrls": [{ "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }],
"maxComments": 50,
"sortCommentsBy": "TOP_COMMENTS"
}
3. Run and View Results
Click "Run" on the Apify platform. Once the run is complete, you can export your data in formats like JSON or CSV, or pipe it directly into your own application via the Apify API.
Example Output
The Actor returns a high-fidelity dataset. Here is what a typical comment entry looks like:
{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"title": "Rick Astley - Never Gonna Give You Up",
"scrapedAt": "2026-11-29T10:00:00.000Z",
"type": "Comment",
"cid": "UgzKYksqeQ5gA3t0g0F4AaABAg",
"comment": "Classic! Never gets old.",
"author": "@musiclover",
"authorHandle": "@musiclover",
"authorChannelId": "UC1234567890abcdefghijklmnop",
"authorAvatar": "https://yt3.ggpht.com/example=s88-c-k-c0x00ffffff-no-rj",
"authorIsChannelOwner": false,
"hasCreatorHeart": null,
"videoId": "dQw4w9WgXcQ",
"pageUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"commentsCount": 109000,
"replyCount": 742,
"voteCount": 109000,
"likes": 109000,
"publishedTime": "14 years ago",
"publishedTimeEdited": false,
"publishedDateApprox": "2012-06-15T12:00:00.000Z",
"replyToCid": null
}
Conclusion
Stop wrestling with bot detection and high browser costs. Use a tool designed for high-performance, schema-validated web data.
Get started now: https://apify.com/steadfetch/youtube-comments-scraper
Top comments (0)