Pricing
$0.40 / 1,000 results
Go to Apify Store
YouTube Video Comments Scraper
Scrape public comments from any YouTube video. Fast, lightweight, and compliant with YouTube's public data policies.
Pricing
$0.40 / 1,000 results
Rating
0.0
(0)
Developer
Actor stats
1
Bookmarked
21
Total users
1
Monthly active users
2 months ago
Last modified
Categories
Share
YouTube Video Comments Scraper
Overview
This script is designed for the Apify platform and uses Playwright to scrape comments from a YouTube video.
Input
Parameters
video_urlβ The URL of the YouTube video.limit(optional) β Maximum number of comments to scrape.
Example Input
{"limit":20,"video_url":"https://www.youtube.com/watch?v=Y5QZ_u3Cl74"}
Output
The script returns a JSON array, where each object represents a comment and contains the following fields:
authorβ An object with details about the commenter:usernameurl
dateβ The time the comment was posted (e.g., "1 month ago")likesβ Number of likes on the commentreplies_countβ Number of replies to the commenttextβ The comment text
Example Output
[{"author":{"url":"https://www.youtube.com/@ircmaan","username":"@ircmaan"},"date":"1 month ago","likes":197,"replies_count":11,"text":"The biggest TV scammer in history is Kashpirovsky.\nHe scammed people both in scale and over time :)"}]
How to Use
- Create a new task on the Apify platform.
- Provide the input JSON with the desired video URL.
- Run the task. The script will scroll through the comments section and extract comment data.
Disclaimer
This script is provided "as is" with no warranties. You are fully responsible for how you use it. Make sure your use complies with YouTubeβs Terms of Service and all applicable laws and regulations.
