YouTube, comments
A YouTube comments scraper that bills per video, not per comment
Set how many top comments you want per video and they arrive inside that video's row, next to its views, likes and description. You pay $2 per 1,000 videos, whether a video carries no comments or five hundred.
- $2 per 1,000 videos
- Comments included in the row
- No API key
- Up to 5,000 comments per video
The cost math, worked through
Most YouTube comment tools bill every comment as its own result. That makes sense if you want millions of comments from a handful of videos. It gets expensive when you want a sample of what people say across many videos, which is what most sentiment, product research and content planning jobs actually need.
| Setup for 100 videos x 20 top comments | Billed rows | Apify Free plan | Apify Business plan |
|---|---|---|---|
| Yugenox YouTube Scraper | 100 video rows | $0.20 | $0.20 |
| streamers/youtube-scraper + streamers/youtube-comments-scraper | 100 videos + 2,000 comments | $4.40 | $2.04 |
Our price does not change by plan, and comments never create extra rows, so the gap holds from the Free plan to Business. The flip side is worth saying: if you want every comment on one viral video, a per-comment tool is the better shape. A single row holding thousands of comments is heavy and slow to pull, and our replies are capped per video (see below).
What you get in each row
Every row is one video with its usual fields: title, url, viewCount, the exact likes count, date and publishedAt, channelName, numberOfSubscribers, the full description in text, hashtags and descriptionLinks. When maxComments is above zero, the row also gets a comments array and a commentsCount with the number of comments returned. Each comment has:
text: the comment itselfauthorandauthorChannelId: the commenter's public channel name and IDauthorIsCreator: true when the video's own channel wrote it, handy for finding pinned creator replieslikesandreplyCountpublishedTime: as YouTube shows it, for example "2 years ago"commentId, so you can de-duplicate across runs
Where the videos come from
Comments work with every input, so you choose which videos you want first and the comments follow:
- Search terms, with an upload-date filter (last hour to this year) and sorting by relevance, date, views or rating. Example: the 100 most-viewed "standing desk review" videos this year, with 20 comments each.
- Channels by plain name,
@handleor URL. Example: the last 50 uploads from three competitors. - Playlists and single videos by URL, when you already know exactly which videos matter.
Things to know before you run it
- Replies are opt-in and capped. Set
maxRepliesand each comment gets its replies nested underreplies. The most-replied comments go first, and a video gets at most 20 reply pages, about 200 replies in total. - Top or newest.
commentsSortByistop(YouTube's top comments, the default) ornewest. - Short lists are flagged.
commentsTruncatedis true on a row whose comment list stopped early, for example a page YouTube wouldn't serve. - Relative dates.
publishedTimeis the relative text YouTube displays. If you need exact dates, keepscrapedAtand compute from it. - Comments turned off. The video row still comes back with an empty list and counts as one result ($0.002).
- Depth takes time. Comments load page by page, so 1,000 comments per video takes noticeably longer than 20.
- Personal data. Commenters' channel names are personal data under GDPR, PIPEDA and CCPA. Store and use them accordingly.
Export YouTube comments to Excel or CSV
Comments arrive inside each video's row, so a normal export gives one line per video. For one line per comment, add Apify's unwind option to the dataset export: every comment becomes its own row, with the video's title, URL and views repeated next to it.
https://api.apify.com/v2/datasets/<datasetId>/items?format=csv&unwind=commentshttps://api.apify.com/v2/datasets/<datasetId>/items?format=xlsx&unwind=commentsSend your Apify token as an Authorization: Bearer header, or download the same thing from the run's Output tab. Add &fields=title,url,comments to keep the file small. With commentsSortBy: "newest" and a schedule, each export picks up the latest comments; commentId lets you drop the ones you already have.
What people use it for
- Product research. Pull the comments under competitor reviews and list the complaints and feature requests that come up again and again.
- Content planning. Questions in the comments of your niche's top videos are a ready-made list of next video topics.
- Campaign sentiment. Sample comments across every video that mentions a launch, then score them with your own model or an LLM.
- Research datasets. Comments with like counts, joined to video stats and dislike estimates from Return YouTube Dislike, in one table.
Run it from code
This pulls the 100 most-viewed matching videos with 20 top comments each: 100 rows, $0.20. Set APIFY_TOKEN to your Apify API token first.
// Save as run.mjs, then: npm i apify-client && APIFY_TOKEN=... node run.mjs
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('yugenox/youtube-scraper').call({
searchTerms: [
"standing desk review"
],
sortBy: "views",
maxItems: 100,
maxComments: 20
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const item of items) console.log(item.title, item.commentsCount);import os
from apify_client import ApifyClient # pip install apify-client
client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("yugenox/youtube-scraper").call(run_input={
"searchTerms": ["standing desk review"],
"sortBy": "views",
"maxItems": 100,
"maxComments": 20,
})
if run is None:
raise RuntimeError("Run did not finish")
for item in client.dataset(run.default_dataset_id).iterate_items():
print(item.get("title"), item.get("commentsCount"))# Small jobs: runs the Actor and returns the rows in one call (up to 5 minutes).
curl -X POST "https://api.apify.com/v2/acts/yugenox~youtube-scraper/run-sync-get-dataset-items" \
-H "Authorization: Bearer $APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"searchTerms":["standing desk review"],"sortBy":"views","maxItems":100,"maxComments":20}'Questions people ask
Do I need a YouTube API key or a Google account?
No. The Actor reads the same public pages any visitor sees. There is no key, no OAuth and no daily quota.
Are comment replies included?
Only if you ask: set maxReplies and replies are nested under each comment, most-replied comments first, up to about 200 replies per video. Otherwise each comment carries its replyCount.
How many comments can I get per video?
Anything from 0 to 5,000 with maxComments. YouTube decides which comments count as "top", and some videos simply have fewer.
Does a video with comments turned off still cost money?
Yes. The video row itself is a result ($0.002), with an empty comments list.
Can I export YouTube comments to CSV or Google Sheets?
Yes. Export the dataset as CSV or Excel, or connect Apify's Google Sheets integration. Add unwind=comments to the export URL for one line per comment.
Is scraping YouTube comments legal?
The Actor only collects comments anyone can see without logging in. Commenters' names are personal data, though, so follow privacy laws such as GDPR, PIPEDA and CCPA and YouTube's terms, and ask a lawyer if you are unsure.
Run it on your own data
Open the Actor on Apify, paste your input and press Start. You pay per result from your own Apify account, with no subscription to us. Or connect it to your AI assistant and ask in plain English.
Last updated 2026-10-06.