YouTube Comments Scraper
Pricing
from $0.25 / 1,000 comments
YouTube Comments Scraper
Scrape comments and replies from YouTube videos and Shorts: text, author, likes, reply count, pinned and creator-hearted flags. Fast HTTP scraper, no browser, no login and no API key.
Pricing
from $0.25 / 1,000 comments
Rating
0.0
(0)
Developer
Novi
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
2 days ago
Last modified
Categories
Features
Share
Scrape comments and replies from any public YouTube video or Short. Every comment comes with its text, author, like count, reply count, publish time and pinned / creator-hearted flags, plus the video title and channel. Paste video URLs or IDs and download the results as JSON, CSV, Excel or through the API.
Video tutorial
Prefer reading? Follow the step-by-step guide with screenshots.
What can this YouTube Comments Scraper do?
- 💬 Comments and replies: top-level comments, plus up to N replies per comment, linked through
parentCommentId - ↕️ Sort order: get YouTube's Top comments or Newest first
- 📌 Rich flags: pinned comments, comments hearted by the creator, comments written by the channel owner, verified authors, edited comments
- 👤 Author details: handle, channel ID, channel URL and avatar for every commenter
- 📺 Video context: video title, channel name, channel ID and the total comment count on every row
- 🔗 Bulk input: many videos in one run, using
watch?v=links,youtu.belinks, Shorts, live and embed links - ⚡ Fast and light: plain HTTP requests, no browser, so it runs in 256 MB of memory and returns hundreds of comments in seconds
- 🛡️ Keeps going on errors: unavailable videos or videos with comments turned off return a row with an
errormessage and the run continues
What can I use YouTube comments for?
- Sentiment analysis and brand monitoring: see how viewers react to your product, campaign or competitor
- Audience research: find questions, pain points and content ideas in your niche
- Influencer vetting: check engagement quality on a creator's videos before a partnership
- AI and LLM datasets: feed real conversations into classification, summarization or RAG pipelines
- Community management: export comments to reply, moderate or report on them
How to scrape YouTube comments
- Click Try for free and open the actor in Apify Console.
- Add one or more YouTube video URLs or IDs to Video URLs.
- Set Max comments per video and choose Top comments or Newest first.
- Turn on Include replies if you also want the reply threads.
- Click Start, then download the dataset in JSON, CSV, Excel or HTML.
Input
| Field | Type | Description |
|---|---|---|
startUrls | array | YouTube video or Shorts URLs (watch?v=, youtu.be/, /shorts/, /live/, /embed/). |
maxComments | integer | Maximum number of top-level comments per video. Replies are not counted. Default 100. |
sortBy | string | top (default) or newest. |
includeReplies | boolean | Also scrape replies. Each reply is a separate row. Default false. |
maxRepliesPerComment | integer | Maximum replies per comment when replies are on. Default 10. |
proxyConfiguration | object | Optional. Leave it off: when YouTube blocks a request, the scraper retries it through Apify Proxy automatically. Set your own proxy only if you need a specific one. |
Input example
{"startUrls": [{ "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" },{ "url": "https://www.youtube.com/shorts/0e3GPea1Tyg" },{ "url": "https://youtu.be/jNQXAC9IVRw" }],"maxComments": 200,"sortBy": "top","includeReplies": true,"maxRepliesPerComment": 5}
Output
Each comment or reply is one row in the dataset.
| Field | Description |
|---|---|
type | comment or reply |
commentId | YouTube comment ID |
parentCommentId | For replies, the ID of the comment it answers; null for top-level comments |
commentUrl | Direct link that highlights the comment on YouTube |
text | Full comment text |
authorName | Commenter's handle, e.g. @MrBeast |
authorChannelId / authorChannelUrl / authorAvatarUrl | Commenter's channel and avatar |
authorIsVerified | Commenter has a verified badge |
authorIsChannelOwner | Comment was written by the video's channel |
likeCount | Number of likes (YouTube rounds large numbers, e.g. 1.1M becomes 1100000) |
replyCount | Number of replies to the comment |
isPinned | Comment is pinned by the creator |
isHeartedByCreator | Comment received a heart from the creator |
isEdited | Comment was edited |
publishedTimeText | Relative publish time as shown on YouTube, e.g. 3 years ago |
publishedAt | Approximate publish date (ISO 8601), calculated from publishedTimeText |
videoId / videoUrl / videoTitle | The video the comment belongs to |
channelName / channelId | The video's channel |
totalCommentsText | Total comment count shown on the video, e.g. 2,462,957 |
error | Only on error rows: why no comments were returned for this video |
Output example
{"type": "comment","commentId": "UgzH8vliQSJKHQMGZjx4AaABAg","parentCommentId": null,"commentUrl": "https://www.youtube.com/watch?v=0e3GPea1Tyg&lc=UgzH8vliQSJKHQMGZjx4AaABAg","text": "Like I said in the video, subscribe if you haven’t already and you could win $10,000!","authorName": "@MrBeast","authorChannelId": "UCX6OQ3DkcsbYNE6H8uQQuVA","authorChannelUrl": "https://www.youtube.com/channel/UCX6OQ3DkcsbYNE6H8uQQuVA","authorIsVerified": true,"authorIsChannelOwner": true,"likeCount": 1100000,"replyCount": 741,"isPinned": true,"isHeartedByCreator": false,"isEdited": false,"publishedTimeText": "5 years ago","publishedAt": "2021-12-02T00:30:14.455Z","videoId": "0e3GPea1Tyg","videoUrl": "https://www.youtube.com/watch?v=0e3GPea1Tyg","videoTitle": "$456,000 Squid Game In Real Life!","channelName": "MrBeast","channelId": "UCX6OQ3DkcsbYNE6H8uQQuVA","totalCommentsText": "662,258"}
Use it from code
Python
from apify_client import ApifyClientclient = ApifyClient("<YOUR_APIFY_TOKEN>")run = client.actor("novi/youtube-comments-scraper").call(run_input={"startUrls": [{"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"}],"maxComments": 100,"sortBy": "newest",})for comment in client.dataset(run["defaultDatasetId"]).iterate_items():print(comment["authorName"], comment["text"])
JavaScript
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: 100,includeReplies: true,});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);
How much does it cost to scrape YouTube comments?
You pay only for the comments you get: $0.30 per 1,000 comments (each reply counts as one comment), with lower prices on higher Apify plans. Each run also has a small start fee of $0.0005, and rows for unavailable videos are free.
For example, 10,000 comments cost about $3, and the free monthly credit on the Apify Free plan covers roughly 16,000 comments.
FAQ
Do I need a YouTube API key or login? No. The scraper reads the same public data you see in a browser, without an API key, login or quota.
Why is likeCount a round number?
YouTube only shows rounded like counts for popular comments (for example 73K). The scraper converts them to numbers.
Why are there fewer comments than the video's total? The total on YouTube includes replies and comments that YouTube hides as spam or held for review. Turn on Include replies to get the reply threads too.
Is scraping YouTube comments legal? This actor only collects publicly available data. Comments can contain personal data, so make sure your use complies with GDPR and other regulations that apply to you, and use the data for legitimate purposes.