How to Export YouTube Comments and Replies: Step-by-Step Tutorial with Screenshots
YouTube Comments Scraper collects comments and replies from any public YouTube video or Short. You paste video links, pick how many comments you want and whether to include replies, and every row comes back with the text, author, like count, reply count, publish time, pinned and creator-hearted flags, plus the video title and channel. No YouTube API key, login or quota.
For this walkthrough I ran it on one video, Rick Astley’s Never Gonna Give You Up (almost 2.5 million comments), with 40 top comments and up to 3 replies each. The run returned 143 rows (40 comments + 103 replies) in 5 seconds. One of those rows is a top comment with 414K likes: “My professor sent us this link as the ‘final exam key’”. Watch the 92-second flow first:
Below are the same steps with screenshots from that run.
Input options at a glance
| Field | Type | Default | What it controls |
|---|---|---|---|
startUrls |
array |
— | YouTube video or Shorts URLs: watch?v=, youtu.be/, /shorts/, /live/ and /embed/ links |
maxComments |
integer |
100 |
Maximum top-level comments per video (replies are not counted) |
sortBy |
string |
top |
top for YouTube’s Top comments, newest for Newest first |
includeReplies |
boolean |
false |
Also scrape replies; each reply is its own row |
maxRepliesPerComment |
integer |
10 |
Maximum replies per comment when replies are on |
proxyConfiguration |
object |
off | Optional. Leave it off: blocked requests are retried through Apify Proxy automatically |
Step 1: Open the Actor and click “Try for free”
Go to YouTube Comments Scraper on Apify and click Try for free. If you don’t have an Apify account yet, sign up for free; the Free plan comes with monthly credit.
Step 2: Paste your video links and set the limits
In Video URLs, paste one or more links. Use Bulk edit to paste a list, one link per line. Shorts, youtu.be short links, live and embed links all work.
Then set the three controls below it:
- Max comments per video:
40for this run. - Sort comments by: Top comments (or Newest first to monitor fresh reactions).
- Include replies: On, with Max replies per comment set to
3.

The same input as JSON (the JSON tab, or the API):
{
"startUrls": [
{ "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }
],
"maxComments": 40,
"sortBy": "top",
"includeReplies": true,
"maxRepliesPerComment": 3
}
Step 3: Run it and read the comments
Click Save & start. The run finished in 5 seconds with 143 rows: 40 top-level comments and 103 replies across 35 threads.

The Comments view shows type, text, authorName, likeCount, replyCount, publishedTimeText, isPinned, isHeartedByCreator and commentUrl. Switch to All fields for author channel IDs, verified / channel-owner flags, publishedAt, the video title and the video’s total comment count.
Sort by likeCount and the top comment of this run has 1,000,000 likes. Here is the “final exam key” comment and a reply, as they appear in the dataset (shortened):
[
{
"type": "comment",
"commentId": "UgyaEE4RK3LmE06FeJp4AaABAg",
"parentCommentId": null,
"text": "My professor sent us this link as the \"final exam key\"........",
"likeCount": 414000,
"replyCount": 963,
"isPinned": false,
"isHeartedByCreator": false,
"publishedTimeText": "7 years ago",
"videoTitle": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
"channelName": "Rick Astley",
"totalCommentsText": "2,462,966"
},
{
"type": "reply",
"commentId": "Ugzemy2nvw_7EyaIWj54AaABAg.91V-vzraTSC91_znUCa41-",
"parentCommentId": "Ugzemy2nvw_7EyaIWj54AaABAg",
"text": "WOAH YOUTUBE! Thanks for making this the 8th most liked comment on YouTube, and thank you for 1 million likes! ...",
"likeCount": 39000,
"replyCount": 0,
"isEdited": true
}
]
Top-level comments have "parentCommentId": null. Every reply carries the commentId of the comment it answers, so you can rebuild the threads in a spreadsheet or a database.
Step 4: Export to CSV, Excel or JSON
Click Export on the run page, pick CSV, Excel, JSON, JSONL, XML, HTML Table or RSS, and click Download (or Copy shareable link). Choose the All fields view in the dialog if you want every column.
Run it from code
Grab your API token from Settings > API & Integrations in Apify Console and call novi/youtube-comments-scraper.
Python (pip install apify-client):
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("novi/youtube-comments-scraper").call(run_input={
"startUrls": [{"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"}],
"maxComments": 40,
"sortBy": "top",
"includeReplies": True,
"maxRepliesPerComment": 3,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item["type"], item.get("likeCount"), item.get("authorName"), item.get("text"))
Node.js (npm install apify-client):
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('novi/youtube-comments-scraper').call({
startUrls: [{ url: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' }],
maxComments: 40,
sortBy: 'top',
includeReplies: true,
maxRepliesPerComment: 3,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.length, 'comments and replies');
Pricing
YouTube Comments Scraper uses pay-per-event pricing: a small fee per run plus a fee per comment or reply delivered. Rows for unavailable videos are free.
| Event | Free | Bronze | Silver | Gold+ |
|---|---|---|---|---|
| Each comment or reply | $0.30 / 1,000 | $0.30 / 1,000 | $0.29 / 1,000 | $0.25 / 1,000 |
| Actor start | $0.0005 | $0.0005 | $0.00045 | $0.0004 |
At Free plan prices, the 143 rows from this run come to about $0.043, and 10,000 comments cost about $3.
Tips
- Replies don’t count toward
maxComments. 40 comments with up to 3 replies each can return up to 160 rows, so budget by rows, not bymaxComments. - Use Newest first for monitoring. Schedule the run daily with
sortBy: "newest"and a smallmaxCommentsto catch new reactions to a launch or a campaign. - Like counts are rounded by YouTube. Popular comments show
73Kor1.1Mon YouTube; the scraper converts them to numbers (73000,1100000). - Bad links don’t stop the run. A private video or one with comments turned off returns a single row with an
errormessage, and the other videos keep going.
FAQ
Do I need a YouTube API key or a login? No. The scraper reads the same public comments you see in a browser, without an API key, login or quota.
Why are there fewer comments than the video’s total? YouTube’s total includes replies and comments it hides as spam or holds for review. Turn on Include replies to get the reply threads too.
Does it work on Shorts? Yes. Paste the /shorts/ link like any other video link.
Ready to pull your first comment dataset? Try YouTube Comments Scraper free on Apify.