YouTube Comments Scraper — Comments & Replies Export avatar

YouTube Comments Scraper — Comments & Replies Export

Pricing

from $0.20 / 1,000 results

Go to Apify Store
YouTube Comments Scraper — Comments & Replies Export

YouTube Comments Scraper — Comments & Replies Export

YouTube comments scraper that exports comments and full reply threads from videos, Shorts, playlists and channels: text, author, likes, parentId, pinned/hearted flags, time estimate. JSON, CSV, Excel. From $0.20 per 1,000 results.

Pricing

from $0.20 / 1,000 results

Rating

0.0

(0)

Developer

Alexandre Manguis

Alexandre Manguis

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

10 days ago

Last modified

Share

What does it do?

Overview

This YouTube comments scraper collects the public comments and their reply threads from YouTube videos, Shorts, playlists and channels, and returns one flat row per comment or reply. Every row links back to its parent (parentId, threadDepth), so conversations are easy to rebuild. Results can be downloaded as JSON, CSV, Excel, XML or HTML, or read through the Apify API.

It uses YouTube's own public web responses. No login, no cookies and no YouTube API key are needed. Only comments visible to any visitor are collected.

Use cases

  • Brand and community managers — read what viewers say under your videos and your competitors' videos.
  • Researchers and data teams — build comment datasets for sentiment analysis, topic modelling or LLM fine-tuning.
  • Creators and agencies — find questions, feature requests and pinned or creator-hearted comments.
  • Moderation and audits — export a full thread with author channel IDs for review.

Features

  • Top-level comments and replies in one dataset (replies on by default).
  • Accepts video URLs (watch, youtu.be, Shorts, embed), bare 11-character video IDs, playlist URLs and channel URLs (@handle, /channel/UC…). Playlists and channels expand to their latest videos.
  • Sort by Top or Newest, as offered by YouTube.
  • Thread fields: parentId, threadDepth, and threadText (the whole thread as plain text on each top-level comment, handy for LLM prompts).
  • Flags: isPinned, isHeartedByCreator, isChannelOwner, isVerifiedAuthor, isMember, isEdited.
  • publishedAtEstimate: YouTube only shows relative times ("6 years ago"), so an approximate ISO date is computed from it. It is an estimate, and only for English (language: "en").
  • Hard caps (maxResults, maxCommentsPerVideo, maxRepliesPerComment) to control cost.

Input

Configuration

FieldTypeDefaultDescription
startUrls (required)array—Video, Shorts, playlist or channel URLs, or bare video IDs.
maxVideosPerSourceinteger5Videos to expand per playlist or channel (1–500).
maxCommentsPerVideointeger100Max top-level comments per video (1–100000). Replies are counted separately.
includeRepliesbooleantrueFetch the reply thread under each comment.
maxRepliesPerCommentinteger50Max replies per top-level comment (0 = none).
sortBystringtoptop or newest.
maxResultsinteger200Hard cap on total rows (comments + replies) for the run.
languagestringenInterface language (hl). Date estimates only work for English.
proxyConfigurationobjectApify datacenterSwitch to residential only if YouTube shows consent or "unusual traffic" pages.

Example input

{
"startUrls": ["https://www.youtube.com/watch?v=jNQXAC9IVRw"],
"maxCommentsPerVideo": 20,
"includeReplies": true,
"maxRepliesPerComment": 5,
"sortBy": "top",
"maxResults": 60
}

Output

Example output

Each row is a comment or a reply. Sample (shortened, author data replaced by placeholders):

[
{
"type": "comment",
"commentId": "UgxExampleCommentId000",
"parentId": null,
"threadDepth": 0,
"videoId": "jNQXAC9IVRw",
"videoUrl": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
"videoTitle": "Me at the zoo",
"text": "Example comment text.",
"authorName": "@example-author",
"authorChannelId": "UCxxxxxxxxxxxxxxxxxxxxxx",
"authorChannelUrl": "https://www.youtube.com/channel/UCxxxxxxxxxxxxxxxxxxxxxx",
"isChannelOwner": false,
"isVerifiedAuthor": true,
"isMember": false,
"likeCount": 120,
"replyCount": 3,
"isHeartedByCreator": true,
"isPinned": true,
"isEdited": false,
"publishedTimeText": "6 years ago",
"publishedAtEstimate": "2020-10-04T00:00:00.000Z",
"threadText": "@example-author: Example comment text.\n@example-replier: Example reply. …",
"position": 1,
"sortBy": "top",
"scrapedAt": "2026-10-04T07:44:20.368Z",
"error": null
},
{
"type": "reply",
"commentId": "UgxExampleCommentId000.ExampleReplyId",
"parentId": "UgxExampleCommentId000",
"threadDepth": 1,
"text": "Example reply.",
"authorName": "@example-replier",
"likeCount": 5,
"replyCount": null,
"threadText": null,
"position": 2
}
]

Output fields and fill rates

Fill rates are measured on a real Apify run (41 rows, run rXFDAUvYaN4UMicDJ). Lower values are expected: parentId is only set on replies, and replyCount / threadText only on top-level comments.

FieldFill rateNotes
type, commentId, text, threadDepth, position, sortBy100%type is comment or reply.
videoId, videoUrl, videoTitle, sourceUrl100%
authorName, authorChannelId, authorChannelUrl100%
likeCount, publishedTimeText, publishedAtEstimate100%Date is an estimate.
isChannelOwner, isVerifiedAuthor, isMember, isPinned, isHeartedByCreator, isEdited100%
scrapedAt100%
replyCount80%Top-level comments only.
threadText80%Top-level comments only.
parentId20%Replies only.
error0%null on normal rows.

How to use via API

Calling the Actor

Replace YOUR_APIFY_TOKEN with your token. Actor ID: prosoralex~youtube-comments-replies-export (check the exact owner/name on the Actor page).

curl

curl -X POST "https://api.apify.com/v2/acts/prosoralex~youtube-comments-replies-export/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"startUrls":["https://www.youtube.com/watch?v=jNQXAC9IVRw"],"maxResults":60}'

JavaScript

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('prosoralex/youtube-comments-replies-export').call({
startUrls: ['https://www.youtube.com/watch?v=jNQXAC9IVRw'],
includeReplies: true,
maxResults: 60,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.length);

Python

from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("prosoralex/youtube-comments-replies-export").call(run_input={
"startUrls": ["https://www.youtube.com/watch?v=jNQXAC9IVRw"],
"includeReplies": True,
"maxResults": 60,
})
items = client.dataset(run["defaultDatasetId"]).list_items().items
print(len(items))

Pricing

Pay per result

Pay per result: you are charged per dataset row (a comment or a reply). The price per 1,000 results depends on your Apify plan:

PlanPrice per 1,000 results
Free$0.30
Bronze$0.26
Silver$0.23
Gold and above$0.20

Apify platform usage (compute) is billed separately by Apify. In our test runs it was a fraction of a cent for 25–41 rows. Set maxResults to cap your spending.

Troubleshooting

Common issues

  • Fewer rows than expected — maxResults, maxCommentsPerVideo or maxRepliesPerComment stopped the run, or the video has comments disabled or few comments.
  • Consent or "unusual traffic" pages — switch proxyConfiguration to Apify residential proxies.
  • publishedAtEstimate is empty — it is only computed for English; keep language at en.
  • Input error "startUrls is required" — provide at least one URL or video ID.
  • Private, deleted or age-restricted videos — only publicly visible comments are available; no login is used.

FAQ

Frequently asked questions

Do I need a YouTube API key? No.

Are replies included? Yes, by default. Set includeReplies to false to get top-level comments only.

Is the date exact? No. YouTube shows relative times, so publishedAtEstimate is approximate; the original text is in publishedTimeText.

Can I scrape a whole channel? Yes: give a channel URL and set maxVideosPerSource. The latest videos are expanded.

Is it legal? The Actor collects only publicly visible data. Comments contain personal data (names, channel IDs), so handle them according to GDPR and local law, and respect YouTube's terms. Use is at your own responsibility.

Keywords

youtube comments scraper, youtube replies scraper, youtube comments export, youtube comment replies, export youtube comments to csv, youtube comments dataset, youtube comments sentiment analysis, youtube comments api alternative, youtube shorts comments

Hashtags

#youtube #youtubecomments #commentsscraper #webscraping #sentimentanalysis #dataset #socialmedia #apify