YouTube Comments and Replies Scraper
Pricing
from $0.40 / 1,000 results
YouTube Comments and Replies Scraper
Extract YouTube comments and threaded replies from video URLs without an API key. Cost-optimized 256 MB defaults, duplicate URL skipping, metadata rows, and structured dataset output for research, monitoring, and analysis.
Pricing
from $0.40 / 1,000 results
Rating
0.0
(0)
Developer
Inus Grobler
Maintained by CommunityActor stats
1
Bookmarked
13
Total users
3
Monthly active users
2 days ago
Last modified
Categories
Share
At a glance: what it does is scrape public YouTube comments and replies; input examples are watch, Shorts, youtu.be, embed URLs, or raw video IDs; output examples are video rows, comment rows, and reply rows; use cases include sentiment analysis and audience research; limitations, troubleshooting, and pricing/cost notes are covered below.
Scrape YouTube comments and threaded replies from one or more video URLs without a YouTube API key. This Actor is built for researchers, marketers, creators, agencies, and data teams that need structured YouTube comment data for sentiment analysis, audience research, brand monitoring, moderation, or competitive intelligence.
What You Can Use It For
- Collect comments from YouTube videos, Shorts, youtu.be links, embed links, or raw video IDs
- Export comments for sentiment analysis, topic modeling, dashboards, and reporting
- Monitor audience reactions to product launches, campaigns, creators, or competitors
- Capture replies when they are available from the selected source
- Save video metadata next to each comment dataset
- Deduplicate repeated video URLs automatically so duplicate inputs do not waste a run
Data It Extracts
The Actor writes two record types to the default dataset.
Video Rows
Each video row can include:
record_typevideo_idurltitlechannel_idchannel_namechannel_handlechannel_urlview_countlike_countcomment_countpublished_atfrom_instancescraped_at
Comment Rows
Each comment or reply row can include:
record_typevideo_idvideo_urlvideo_titlecomment_idparent_comment_iddepthauthor_channel_idauthor_handleauthor_nameauthor_urltextlike_countreply_countpublished_textpublished_atauthor_is_channel_ownerverifiedis_sponsoris_heartedis_pinnedis_editedfrom_instancescraped_at
Some fields can be empty when YouTube or the selected extraction source does not expose them.
Input Configuration
| Field | Default | What it means |
|---|---|---|
videoUrls | Required | YouTube watch URLs, Shorts URLs, youtu.be links, embed links, or raw 11-character video IDs. Duplicate forms of the same video are skipped automatically. |
maxCommentsPerVideo | 20 | Maximum comments to collect per video. Use 0 for the safety cap of 100,000 comments per video. |
maxCommentPagesPerVideo | 2 | Maximum comment pages to scan per video when mirror pagination is available. |
includeReplies | false | Include reply rows when replies are available. Replies have depth: 1 and a parent_comment_id. |
Example Input
{"videoUrls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ","https://youtu.be/T-HZHO_PQPY"],"maxCommentsPerVideo": 100,"maxCommentPagesPerVideo": 5,"includeReplies": true}
Example Output
{"record_type": "comment","video_id": "dQw4w9WgXcQ","video_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ","video_title": "Rick Astley - Never Gonna Give You Up","comment_id": "UgxABC123","parent_comment_id": "","depth": 0,"author_name": "Jane Smith","author_handle": "janesmith","author_channel_id": "UCxxxxxx","text": "This song never gets old!","like_count": 4200,"reply_count": 31,"published_text": "3 years ago","published_at": "2023-01-15T10:30:00Z","is_pinned": false,"is_hearted": true,"author_is_channel_owner": false,"from_instance": "yt_dlp","scraped_at": "2026-06-12T12:00:00Z"}
How To Run On Apify
- Open the Actor in Apify Console.
- Paste one or more video URLs or video IDs into
videoUrls. - Choose how many comments to collect with
maxCommentsPerVideo. - Turn on
includeRepliesif you need reply rows. - Start the run.
- Open the Dataset tab to preview, filter, and export the results.
The Actor pushes the video row first and then pushes comment rows in batches as each video finishes, so completed videos remain available even if a later video fails or the run is stopped.
Exporting Results
After the run finishes, open the run's Dataset tab and download results as JSON, CSV, Excel, XML, or RSS. You can also use the dataset API URL from the Actor output to pull results into your own pipeline.
API Example
import osfrom apify_client import ApifyClientclient = ApifyClient(os.environ["APIFY_TOKEN"])run_input = {"videoUrls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],"maxCommentsPerVideo": 100,"includeReplies": True,}run = client.actor("thescrapelab/Apify-YouTube-Comment-Scraper-2-0").call(run_input=run_input)dataset_id = run["defaultDatasetId"]items = client.dataset(dataset_id).list_items().itemscomments = [item for item in items if item.get("record_type") == "comment"]print(f"Fetched {len(comments)} comments")
Pricing Guidance
The recommended pricing model is pay per event, charged per dataset item. A practical target is:
- Actor start event:
$0.00005 - Dataset item event:
$0.0005per row, or$0.50per 1,000 dataset rows
Dataset rows include one video row per video plus comment and reply rows. For large runs, the video rows are a very small part of the total charge. Platform usage cost is separate when Apify bills usage directly to the user.
Limits And Caveats
- This Actor is not affiliated with or endorsed by YouTube or Google.
- It does not use the YouTube Data API and does not require a YouTube API key.
- Private, deleted, member-only, or age-restricted videos may return no comments.
- YouTube and public mirror availability can vary by time, region, and network.
- Some fields may be empty when the source does not expose them.
- Very large runs can take longer and may need a higher run timeout.
Troubleshooting
No Comments Returned
Check that the video is public and has comments enabled. Some private, restricted, or temporarily unavailable videos may return only the video row.
Fewer Comments Than Expected
Increase maxCommentsPerVideo and maxCommentPagesPerVideo. If replies matter, enable includeReplies.
Duplicate URLs Were Skipped
This is expected. The Actor normalizes common YouTube URL formats to the same video ID and skips duplicates to reduce cost.
Run Timed Out
Use a higher run timeout for large inputs. The Actor has a timeout guard that stops new fetching before the platform hard timeout so already pushed results remain available.
Results Have Empty Fields
Some fields depend on the source used for extraction. Empty published_at, author_handle, or engagement fields usually mean the source did not provide that value.
FAQ
Can I scrape YouTube comments without an API key?
Yes. This Actor scrapes public YouTube comment data without requiring a YouTube Data API key.
Does it collect replies?
Yes. Set includeReplies to true to include reply rows when replies are available.
Can it scrape Shorts comments?
Yes. You can provide Shorts URLs, watch URLs, youtu.be links, embed links, or video IDs.
Why is the default memory 256 MB?
The Actor is HTTP-first and does not launch a browser. Cloud tests completed reliably at 256 MB with peak memory under 102 MB on the tested workloads.
What is the best setting for low cost?
Use the default input where possible, set a realistic maxCommentsPerVideo, and avoid requesting replies unless you need them.
Can I export to CSV or Excel?
Yes. Use the Dataset tab in Apify Console and choose CSV, Excel, JSON, or another supported export format.