YouTube Comments Scraper
Pricing
from $0.90 / 1,000 results
YouTube Comments Scraper
Extract YouTube comments data from one or multiple YouTube videos: full comment text, posting date, author username, video title, videoId. Download YouTube comments in JSON, CSV, and Excel.
Pricing
from $0.90 / 1,000 results
Rating
0.0
(0)
Developer
Spectre
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 days ago
Last modified
Categories
Share
π¬ YouTube Comments Scraper
Extract YouTube video comments and replies at ultra-fast speeds using YouTube's internal InnerTube API β no official API key required, no quota limits.
Provide any YouTube video URL and instantly pull hundreds or thousands of comments along with all the metadata you need for analysis.
What is YouTube Comments Scraper?
YouTube Comments Scraper is a data extraction tool that goes beyond the limitations of the standard YouTube Data API. It scrapes comments directly through YouTube's internal InnerTube endpoints, giving you:
- β All comments and replies from any YouTube video
- β Sort by Newest First or Top Comments
- β Filter comments by date (only scrape comments newer than a given date)
- β Comment text, author handle, publish time, vote count, and reply count
- β Whether the comment has been hearted by the creator
- β Whether the commenter is the channel owner
- β Total comment count for the video
- β Scrape both regular videos and YouTube Shorts
Use Cases
- π Sentiment analysis β understand how audiences feel about a video or topic
- π Brand monitoring β track mentions of your brand in YouTube comments
- π Trend discovery β identify what topics and opinions are gaining traction
- π¨ Content moderation β detect harmful, spammy, or illegal comments at scale
- π§ͺ Research & academia β collect public comment datasets for NLP and social research
- π― Competitor analysis β analyze what audiences say about competitors' content
- π‘ Community insights β understand what your viewers think and feel
How to Use
- Create a free Apify account
- Open YouTube Comments Scraper on the Apify platform
- Enter one or more YouTube video URLs in the Start URLs field
- Set your desired Max Comments, Sort Order, and optional Date Filter
- Click Start and wait for the run to complete
- Download your data as JSON, CSV, Excel, XML, or HTML
β¬οΈ Input
The actor accepts the following input fields:
| Field | Type | Default | Description |
|---|---|---|---|
startUrls | Array | β | Required. One or more YouTube video or Shorts URLs to scrape |
maxComments | Integer | 100 | Maximum number of comments/replies to scrape per video |
sortCommentsBy | String | NEWEST_FIRST | Sort order: NEWEST_FIRST or TOP_COMMENTS |
oldestCommentDate | String | β | Only return comments on or after this date. Format: YYYY-MM-DD |
maxConcurrency | Integer | 3 | Number of concurrent workers (increase for faster runs) |
proxyConfiguration | Object | Apify Proxy | Proxy settings β residential proxies recommended for reliability |
Input Example (JSON)
{"startUrls": [{ "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }],"maxComments": 500,"sortCommentsBy": "TOP_COMMENTS","oldestCommentDate": "2024-01-01","maxConcurrency": 3,"proxyConfiguration": {"useApifyProxy": true}}
β¬οΈ Output
Each scraped comment or reply is stored as a separate item in the dataset. Results can be previewed in the Apify console and downloaded in multiple formats.
Output Fields
| Field | Type | Description |
|---|---|---|
comment | String | Full text of the comment |
cid | String | Unique comment ID |
publishedTimeText | String | Time since comment was posted (e.g. "2 days ago") |
author | String | Author's YouTube handle (e.g. @username) |
videoId | String | YouTube video ID |
pageUrl | String | Full URL of the video page |
commentsCount | Integer | Total number of comments on the video |
replyCount | Integer | Number of replies to this comment |
voteCount | Integer | Number of likes on the comment |
authorIsChannelOwner | Boolean | true if the commenter is the channel owner |
hasCreatorHeart | Boolean | true if the creator hearted this comment |
type | String | "comment" for top-level comments, "reply" for replies |
replyToCid | String | ID of the parent comment (only present for replies) |
title | String | Title of the YouTube video |
Output Example (JSON)
{"comment": "This is one of the best videos I've ever seen.","cid": "UgxRn0_LUxzRP2MybPR4AaABAg","publishedTimeText": "3 days ago","author": "@some_user","videoId": "dQw4w9WgXcQ","pageUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ","commentsCount": 84321,"replyCount": 12,"voteCount": 4200,"authorIsChannelOwner": false,"hasCreatorHeart": true,"type": "comment","replyToCid": null,"title": "Rick Astley - Never Gonna Give You Up (Official Music Video)"}
Error Items
If a video is unavailable, has comments disabled, or cannot be scraped for any reason, the actor pushes an error item to the dataset instead of silently skipping it. Normal output items are never affected β you can identify error items by the presence of an error field.
Integrations
YouTube Comments Scraper can be connected to virtually any tool or cloud service via the Apify platform integrations:
- Make (formerly Integromat)
- Zapier
- Slack
- Airbyte
- Google Drive
- GitHub
- Webhooks β trigger actions on every completed run
API Access
You can run and manage this actor programmatically using the Apify API.
Node.js:
const { ApifyClient } = require('apify-client');const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });const run = await client.actor('YOUR_ACTOR_ID').call({startUrls: [{ url: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' }],maxComments: 200,sortCommentsBy: 'TOP_COMMENTS',});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);
Python:
from apify_client import ApifyClientclient = ApifyClient("YOUR_API_TOKEN")run = client.actor("YOUR_ACTOR_ID").call(run_input={"startUrls": [{ "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }],"maxComments": 200,"sortCommentsBy": "TOP_COMMENTS",})for item in client.dataset(run["defaultDatasetId"]).iterate_items():print(item)
FAQ
Is YouTube comment scraping legal?
YouTube comments are publicly visible data. Scraping public data is generally legal, but you should ensure your use case complies with YouTube's Terms of Service and applicable data protection laws (e.g. GDPR). Never scrape private or personally sensitive data without a legitimate legal basis.
Do I need proxies?
Yes β for reliable scraping, residential proxies are strongly recommended. When running on the Apify platform, you can enable Apify Proxy directly in the input. Apify's Starter plan and above include residential proxy access.
Can I scrape multiple videos at once?
Yes. Add as many URLs as you want to the startUrls field. The actor will process them concurrently based on your maxConcurrency setting.
Can I filter comments by date?
Yes. Use the oldestCommentDate field (format: YYYY-MM-DD) to only return comments published on or after that date. Combine this with sortCommentsBy: NEWEST_FIRST for best results.
Can I scrape replies as well?
Yes. The actor scrapes both top-level comments and their replies. Replies are included in the same dataset and can be identified by "type": "reply" and the replyToCid field pointing to their parent comment.
Feedback & Issues
Found a bug or have a feature request? Open an issue on the Issues tab of this actor on Apify, or reach out directly. We're always working to improve speed, reliability, and data coverage.