Youtube Video Comments Scraper
Pricing
from $1.50 / 1,000 results
Youtube Video Comments Scraper
Extract comments from one or more YouTube videos with the YouTube Comments Scraper. Collect comment text, authors, reply counts, vote counts, timestamps, video metadata, and structured results for audience research, content analysis, and dataset creation.
Pricing
from $1.50 / 1,000 results
Rating
5.0
(1)
Developer
Alpha Scraper
Maintained by CommunityActor stats
0
Bookmarked
8
Total users
0
Monthly active users
16 days ago
Last modified
Categories
Share
YouTube Comments Scraper
YouTube Comments Scraper extracts comments from YouTube video URLs and returns the collected comment data as structured results in an Apify dataset. It is designed for users who need to gather public YouTube comment information for research, content analysis, audience research, dataset creation, and other data workflows.
Provide one or more YouTube video URLs through the startUrls input. You can either request all available comments or set a maximum number of comments to collect for each video. Each processed video produces a structured result containing video information and an array of extracted comments.
The returned comment records can include the comment ID, comment text, author name, publication-time text, parsed publication timestamp when available, reply count, vote count, video ID, and source page URL.
What Is a YouTube Comments Scraper?
A YouTube comments scraper is a data collection tool that helps automate the process of gathering comment information from YouTube videos. Instead of manually opening videos and copying individual comments, this Actor processes the supplied video URLs and places the resulting information into structured dataset records.
This YouTube Comments Scraper accepts one or more URLs through the startUrls field. For each supplied video URL, it attempts to collect comments and returns them together with basic video-level information.
The Actor is particularly useful when the goal is to turn unstructured comment sections into a dataset that can be reviewed, analyzed, filtered, or used in another workflow.
Key Features
| Feature | Description | User Benefit |
|---|---|---|
| Multiple video URLs | Accepts one or more YouTube video URLs through startUrls. | Process several videos in a single Actor run. |
| Comment extraction | Collects comment records associated with each processed video. | Reduces repetitive manual comment collection. |
| Comment limit | maxComments can be used to limit the number of collected comments when all-comments mode is disabled. | Makes smaller test or targeted runs possible. |
| All-comments mode | getAllComments can request collection without applying the configured maximum comment limit. | Useful when a broader comment dataset is required. |
| Structured comment data | Returns normalized comment information inside a structured result. | Makes results easier to inspect and analyze. |
| Video-level metadata | Results can include the video URL, video ID, title, and comments count. | Provides useful context for each collected dataset item. |
| Configurable sort option | The input provides a choice between top comments and newest comments. | Gives users an intended way to control comment ordering. |
What Data Can You Extract?
The Actor returns one structured result for each processed video. The result contains information about the video as well as a comments array containing the collected comments.
Depending on what is available from the source, comment records can contain:
- Comment ID (
cid) - Comment text
- Author name
- Original publication-time text
- Parsed publication timestamp
- Reply count
- Vote or like count
- Video ID
- Source video URL
At the video level, the result can include:
videoUrl— the supplied video URL.videoId— the detected YouTube video identifier when it can be extracted.title— the video title when it can be determined.commentsCount— the discovered comment count when available, otherwise the number actually collected.comments— an array containing normalized comment records.scrapedCount— the number of comments collected for that video.
The exact availability of individual values can vary. For example, a publication timestamp is only populated when the available time text can be interpreted, and a video title may be unavailable when it cannot be determined from the page.
Why Use the YouTube Comments Scraper?
Manually collecting YouTube comments becomes increasingly repetitive when several videos or larger comment sections need to be reviewed. Automating the collection process creates a reusable dataset that can be inspected without repeatedly copying information from individual pages.
This Actor can support workflows involving audience research, comment analysis, content research, public-data collection, dataset preparation, and qualitative or quantitative review of YouTube discussions.
Because each video is returned as a structured dataset item, users can keep the relationship between the source video and its collected comments clear during later analysis.
Benefits
The main practical benefits include:
- Automated data collection: Reduce repetitive manual copying of comments.
- Structured results: Keep comment information organized in a consistent output structure.
- Multiple-video processing: Submit more than one video URL in a single run.
- Configurable collection size: Use
maxCommentsfor a bounded collection or enablegetAllComments. - Research-ready context: Keep video-level information alongside the associated comments.
- Dataset creation: Build reusable comment datasets for analysis and review.
- Flexible downstream use: Structured results are easier to filter, inspect, transform, or combine with other workflows.
How to Use the YouTube Comments Scraper
Using the Actor is straightforward:
- Add one or more supported YouTube video URLs to
startUrls. - Decide whether to collect all available comments or use a comment limit.
- Set
maxCommentswhen you want a bounded collection and leave all-comments mode disabled. - Review the
sortByoption available in the input configuration. - Start the Actor.
- Review the resulting dataset records and the comments associated with each video.
For large or uncertain jobs, starting with a smaller maxComments value is a practical way to verify that the selected URLs and expected output are correct before expanding the run.
Input
The Actor requires startUrls. The remaining fields are optional and control how comments are collected.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
startUrls | Array | Yes | — | One or more YouTube URLs supplied as URL objects. Use video URLs that the Actor can process. |
maxComments | Integer | No | 100 in the Actor UI prefill | Maximum number of comments to collect when getAllComments is disabled. |
getAllComments | Boolean | No | false | When true, the Actor does not apply the configured maximum comment limit. |
sortBy | String | No | top Comments | Input option offering top Comments or newest comments. |
The Actor's documented input specifically presents startUrls as a list of YouTube channel or video URLs, but the processing code is built around extracting a YouTube video ID and collecting comments for the supplied URL. For reliable use, provide direct YouTube video URLs.
The maxComments setting is applied when getAllComments is false. Values that are missing, invalid, zero, or negative are not used as a positive limit by the processing code.
Input Example
{"startUrls": [{"url": "https://www.youtube.com/watch?v=ngKmMb9YXkw"},{"url": "https://www.youtube.com/watch?v=VegKhno-BK8"}],"maxComments": 100,"getAllComments": false,"sortBy": "top Comments"}
Output
The Actor writes each processed video's result to the Apify dataset. Rather than creating one top-level dataset item for every individual comment, the Actor groups the comments for each video inside the video's comments array.
This makes each dataset item useful as a complete record for a single source video.
A typical result contains the video URL and ID, a title when available, a comment count, the collected comments, and the number of comments actually scraped.
Each comment record is normalized into a consistent structure. This includes both the original time text and a parsed Unix timestamp when parsing succeeds.
Output Fields
| Field | Description |
|---|---|
videoUrl | The YouTube video URL processed by the Actor. |
videoId | Extracted YouTube video ID when detected from the supported URL patterns. |
title | Video title when it can be determined. |
commentsCount | Comment count obtained when available; otherwise falls back to the number collected. |
comments | Array containing the normalized comment records. |
scrapedCount | Number of comment records collected for the video. |
comments[].cid | Comment identifier when available. |
comments[].type | Comment record type, returned as comment. |
comments[].publishedTimeText | Original publication-time text associated with the comment. |
comments[].publishedTimeTs | Parsed Unix timestamp when the publication time can be interpreted. |
comments[].comment | Comment text when available. |
comments[].author | Author name when available. |
comments[].replyCount | Normalized reply count. |
comments[].voteCount | Normalized vote or like count. |
comments[].videoId | Video ID associated with the comment. |
comments[].pageUrl | Source video URL associated with the comment. |
Output Example
{"videoUrl": "https://www.youtube.com/watch?v=ngKmMb9YXkw","videoId": "ngKmMb9YXkw","title": "Example YouTube Video","commentsCount": 125,"comments": [{"cid": "example-comment-id","type": "comment","publishedTimeText": "2 days ago","publishedTimeTs": 1760000000,"comment": "Example comment text.","author": "Example User","replyCount": 3,"voteCount": 18,"videoId": "ngKmMb9YXkw","pageUrl": "https://www.youtube.com/watch?v=ngKmMb9YXkw"}],"scrapedCount": 1}
The example demonstrates the structure only. Actual titles, comment identifiers, authors, counts, timestamps, and comment text depend on the processed video and the information available at collection time.
Use Cases
The Actor can fit a range of legitimate public-data workflows, including:
- Audience research: Review how viewers respond to specific video topics.
- Content research: Examine recurring questions, opinions, and discussion themes.
- Market research: Organize public comment data related to products, services, or topics.
- Competitive research: Study public audience discussions around relevant video content.
- Sentiment and text analysis: Prepare comments for downstream language or qualitative analysis.
- Dataset creation: Build structured YouTube comment datasets from selected videos.
- Academic research: Collect publicly available discussion data for research-oriented analysis where appropriate.
- Monitoring workflows: Repeat collection against selected videos to support broader data-review processes.
Advantages
The Actor's main strengths are its simple input structure, video-level organization, configurable collection size, and normalized comment output.
Because comments remain grouped under their source video, users can preserve context while analyzing the dataset. The inclusion of fields such as replyCount, voteCount, and publication-time information can also provide additional dimensions for filtering and analysis when those values are available.
Limitations
There are several practical limitations to keep in mind:
- The Actor is intended for YouTube video URLs. Direct video URLs are the safest input choice.
- Some output fields may be unavailable when corresponding source information cannot be determined.
- Relative publication-time text is converted into an approximate timestamp for supported time expressions; month and year conversions use approximate day counts.
- The
commentsCountvalue is best treated as a reported or fallback count rather than a guaranteed authoritative total. - The actual number of comments returned can be lower than expected when collection is interrupted or the source does not provide additional comments.
- The input interface offers
top Commentsandnewest commentsvalues, but the current processing logic should be validated with a small run when comment ordering is important.
Pros and Cons
| Pros | Cons |
|---|---|
| Processes multiple supplied video URLs | Direct video URLs are preferable to channel URLs |
| Structured video and comment output | Some fields may be unavailable |
| Configurable comment collection size | Collected results can be smaller than requested |
| Optional all-comments mode | Reported total comment count may fall back to scraped count |
| Useful metadata such as author, replies, and votes | Time parsing is approximate for relative dates |
| Suitable for comment datasets and research workflows | Ordering should be verified when using the sort option |
Comparison With Alternative Approaches
| Capability | This Actor | Manual / Typical Alternative |
|---|---|---|
| Automated comment collection | Supported | Usually manual |
| Multiple video processing | Supported through startUrls | Repeated manual work |
| Structured dataset records | Supported | Requires manual formatting |
| Comment limits | Supported through maxComments | Manually counted or copied |
| All-comments option | Supported through getAllComments | Manual collection can be time-consuming |
| Video-level context | Included with each result | Often maintained separately |
This comparison focuses on workflow characteristics rather than claiming superiority over other tools or services.
Competitive Advantages
For users who need a straightforward YouTube comment extraction workflow, the Actor provides several practical advantages: a required URL-list input, optional comment limits, an all-comments setting, and structured output that keeps comments associated with their source videos.
The normalized output also gives users a consistent structure for common fields such as author, comment text, reply count, vote count, and publication information.
Best Practices
Start with one video and a modest maxComments value to confirm that the input is valid and the resulting dataset matches your needs.
Use direct YouTube video URLs rather than relying on broader page types. When processing multiple videos, review the first results before increasing the scope of a run.
For analysis involving timestamps or totals, validate important values against the source because some metadata may be unavailable or approximated.
When the complete comment collection is required, use getAllComments: true and understand that the resulting dataset size depends on the comments made available for the processed video.
Troubleshooting
Invalid Input
Check that startUrls contains valid YouTube video URL objects and that each URL points to a video that can be identified by its video ID.
Empty Results
Verify the URL first and test the same video individually. An empty or very small result may indicate that comments were not available to the Actor for that input at collection time.
Partial Results
The Actor stops collection when maxComments is reached if all-comments mode is disabled. Partial output can also occur when comment collection encounters a temporary problem.
Missing Fields
Fields such as title, author, publication timestamp, or vote information may be unavailable. Review the returned value rather than assuming every field will always be populated.
Unexpected Ordering
The input exposes a top/newest selection. Because ordering depends on the current processing behavior, test the selected option with a small dataset when ordering is important to your workflow.
Frequently Asked Questions
What does the YouTube Comments Scraper do?
It collects comments from supplied YouTube video URLs and returns them as structured dataset records together with useful video-level information.
What input does the Actor require?
The required input is startUrls, containing one or more YouTube URLs. Direct video URLs are recommended for reliable processing.
Can I process multiple videos in one run?
Yes. startUrls is an array, so multiple video URL objects can be supplied in the same input.
Can I limit the number of comments?
Yes. Set maxComments to the desired maximum and keep getAllComments disabled.
How can I request all comments?
Set getAllComments to true. In this mode, the configured maximum comment limit is not applied.
What information is returned for each comment?
Depending on source availability, the comment record can contain an ID, comment text, author, publication-time information, reply count, and vote count, along with video context.
What format is the output?
Each processed video is returned as a structured object containing a comments array and video-level fields such as videoUrl, videoId, title, commentsCount, and scrapedCount.
Why is a publication timestamp sometimes missing?
The Actor converts supported relative time expressions into a Unix timestamp. When the available time text cannot be interpreted, publishedTimeTs can be null.
Is the comments count always exact?
Not necessarily. When a page-level comment count can be determined, it is used; otherwise the Actor falls back to the number of comments actually collected.
Is the Actor suitable for research and automation?
Yes. Its structured input and dataset output make it suitable for repeatable data-collection and analysis workflows, subject to the documented input and collection behavior.
NLP Keywords
- YouTube comment extraction
- YouTube comment data
- YouTube video comments
- YouTube comment scraper
- YouTube audience research
- YouTube comment analysis
- YouTube comment dataset
- YouTube comment collection
- YouTube public comments
- YouTube comment metadata
- YouTube video data
- comment text extraction
- comment author data
- comment reply count
- comment vote count
- comment timestamp
- video comment research
- audience feedback data
- structured comment data
- social video research
Related Keywords
- scrape YouTube comments
- extract YouTube comments
- YouTube comments extractor
- YouTube video comment scraper
- collect YouTube comments
- YouTube comment data scraper
- YouTube comments dataset
- YouTube audience comment scraper
- YouTube comment research tool
- YouTube public comment extraction
- YouTube comment collection tool
- YouTube video discussion data
- YouTube comment metadata scraper
- scrape comments from YouTube videos
- export YouTube comment data
- YouTube comment analysis data
- YouTube comment mining
- YouTube audience feedback extraction
- YouTube video comment dataset
- automated YouTube comment collection
Final Overview
The YouTube Comments Scraper provides a practical way to collect structured comment information from selected YouTube videos. By supplying one or more video URLs, users can gather comment text and associated metadata while keeping each dataset record connected to its source video.
With configurable comment limits, an all-comments option, normalized output fields, and Apify dataset results, the Actor can support audience research, content analysis, public-data research, and structured dataset creation.
For the most reliable workflow, use direct YouTube video URLs, begin with a small test run, review the returned fields, and then expand the collection according to the needs of your project.
Contact me: Alphascraper69@gmail.com