YouTube Comment Scraper
Pricing
from $1.70 / 1,000 comments
YouTube Comment Scraper
Scrape comments from YouTube videos and playlists. Supports multiple video or playlist URLs, comment sorting, and a global comment limit.
Pricing
from $1.70 / 1,000 comments
Rating
0.0
(0)
Developer
Farhan Ali
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
2 days ago
Last modified
Categories
Share
YouTube Comment Scraper creates a structured dataset of comments collected from public YouTube videos and playlists. Each dataset item represents one comment and can include the comment text, author, likes, reply status, publish timestamp, and the source video's title, URL, view count, and channel. Query the source by video or playlist URL, control the result limit with maxItems, and retrieve records through the Apify Dataset API or export them as JSON, CSV, or Excel.
Dataset at a glance
| Property | Value |
|---|---|
| Source | youtube.com (public videos and playlists) |
| Record unit | One comment (or reply) |
| Input methods | Video or playlist URLs (videoUrls) |
| Main identifiers | commentId, videoId |
| Delivery | Apify Dataset and API |
| Export formats | JSON, CSV, Excel |
| Update model | Fresh records per Actor run |
| Pricing | $2.50 per 1,000 comments |
Coverage and available records
The Actor collects comments from one or more YouTube videos or playlists.
- Video input:
videoUrlsaccepts individual video URLs. Playlist URLs are expanded into their videos automatically; a video URL carrying bothv=andlist=parameters is treated as a single video. - Sort order:
commentSortselectsnew(newest first) ortop(top comments). - Result limit:
maxItemscaps the total number of comments collected across all videos (0= unlimited). - Parallelism:
maxConcurrencycontrols how many videos are processed at once (1–10). - Replies: Replies are collected as individual records and carry
isReplyandparentCommentId.
Known exclusions: comments are limited to what YouTube returns for the chosen sort order; each run captures comment state at run time (no historical snapshots); the Actor does not retrieve the full nested reply tree beyond returned replies.
Data dictionary
Field names below match dataset record JSON properties exactly.
| Field | Type | Nullable | Description | Example |
|---|---|---|---|---|
commentId | string | No | YouTube comment identifier; best stable deduplication key | UgzuC3zzpRZkjc5Qzsd4AaABAg |
text | string | No | Comment text content | We're so honored... |
author | string | Yes | Display name of the comment author | @SanDiegoZoo |
authorChannelId | string | Yes | Channel ID of the comment author | UCC5NfQ6Mf0dq_eEwv4P_hWA |
likeCount | integer | Yes | Number of likes on the comment | 4600000 |
isFavorited | boolean | Yes | Whether the video creator hearted the comment | true |
isReply | boolean | Yes | Whether the comment is a reply to another comment | false |
parentCommentId | string | Yes | Parent comment ID when isReply is true | UgzuC3zzpRZkjc5Qzsd4AaABAg |
publishedAt | string | Yes | ISO 8601 timestamp of the comment | 2020-07-09T00:00:00+00:00 |
videoId | string | Yes | YouTube video ID of the source video | jNQXAC9IVRw |
videoUrl | string | Yes | Canonical URL of the source video | https://www.youtube.com/watch?v=jNQXAC9IVRw |
videoTitle | string | Yes | Title of the source video | Me at the zoo |
channelName | string | Yes | Name of the channel that published the video | jawed |
channelId | string | Yes | Channel ID of the video publisher | UC4QobU6STFB0P71PMvOGN5A |
videoPublishedAt | string | Yes | Publication date of the source video | 2005-04-24 |
videoViewCount | integer | Yes | View count of the source video at scrape time | 398675009 |
videoCommentCount | integer | Yes | Total comment count reported for the source video | 10 |
Example dataset record
A representative record produced from the video https://www.youtube.com/watch?v=jNQXAC9IVRw:
{"commentId": "UgzuC3zzpRZkjc5Qzsd4AaABAg","text": "We're so honored that the first ever YouTube video was filmed here!","author": "@SanDiegoZoo","authorChannelId": "UCC5NfQ6Mf0dq_eEwv4P_hWA","likeCount": 4600000,"isFavorited": true,"isReply": false,"parentCommentId": null,"publishedAt": "2020-07-09T00:00:00+00:00","videoId": "jNQXAC9IVRw","videoUrl": "https://www.youtube.com/watch?v=jNQXAC9IVRw","videoTitle": "Me at the zoo","channelName": "jawed","channelId": "UC4QobU6STFB0P71PMvOGN5A","videoPublishedAt": "2005-04-24","videoViewCount": 398675009,"videoCommentCount": 10}
Query and input reference
| Input | Type | Required | Default | Accepted values | Description |
|---|---|---|---|---|---|
videoUrls | array[string] | Yes | — | YouTube video or playlist URLs | Source videos; playlists are expanded automatically |
maxItems | integer | No | 100 | 0 or a positive integer | Maximum comments across all videos; 0 = unlimited |
commentSort | string | No | new | new, top | Newest first, or top comments |
maxConcurrency | integer | No | 3 | 1–10 | Number of videos processed in parallel |
proxyConfiguration | object | No | Apify residential proxy | Apify proxy groups or custom proxies | Residential proxies are recommended |
Minimal request:
{ "videoUrls": ["https://www.youtube.com/watch?v=jNQXAC9IVRw"] }
Advanced request:
{"videoUrls": ["https://www.youtube.com/playlist?list=..."],"maxItems": 1000,"commentSort": "top","maxConcurrency": 3,"proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }}
Retrieve the data through the API
- Start the Actor with a JSON input (console or API).
- Wait for the run to finish, or use a synchronous endpoint for an inline response.
- Retrieve items from the run's default dataset.
- Paginate or export the dataset.
Python example:
from apify_client import ApifyClientclient = ApifyClient("YOUR-APIFY-TOKEN")run = client.actor("datascrapers/youtube-comment-scraper").call(run_input={"videoUrls": ["https://www.youtube.com/watch?v=jNQXAC9IVRw"],"maxItems": 1000,"commentSort": "new",})for item in client.dataset(run["defaultDatasetId"]).iterate_items():print(item["commentId"], item["author"], item["likeCount"])
Apify generates ready-to-run Python, JavaScript, and cURL examples on the Actor's API tab. Do not put a real API token in shared code or URLs.
Data quality and record handling
- Conditional fields: Reply records carry
isReplyandparentCommentId; top-level comments haveparentCommentIdnull. Fields YouTube does not expose are returned as null. - Source changes: YouTube page structure and values can change; unreadable fields are returned as null rather than fabricated.
- Deduplication: Each run appends fresh records; the Actor does not deduplicate across runs. Use
commentIdas the stable key and filter repeated runs against previously stored IDs. - Rate limits: YouTube rate-limits automated traffic. Residential proxies (enabled by default) and bounded concurrency are used to maintain coverage.
- Normalization:
publishedAtis normalized to ISO 8601; view and like counts are read as integers.
Export and pipeline examples
| Destination | Recommended method | Typical use |
|---|---|---|
| PostgreSQL / Supabase | Dataset API poll or webhook consumer | Store comments for sentiment pipelines |
| Google Sheets | Apify Google Sheets integration | Share comment threads with community teams |
| S3 / cloud storage | Scheduled export via Apify scheduler | Archival of comment snapshots |
| BI tools | CSV / JSON export | Audience and sentiment analysis |
Pricing and cost examples
The Actor uses pay-per-event pricing, billed per comment record:
| Event | Trigger | Rate |
|---|---|---|
| Comment | Every comment pushed to the dataset | $2.50 per 1,000 comments |
A one-time Actor start event of $0.00005 applies to each run (effectively $0).
| Comments | Estimated base cost |
|---|---|
| 1,000 | $2.50 |
| 10,000 | $25.00 |
| 100,000 | $250.00 |
Compute units consumed by the run are billed by your Apify plan. Estimates depend on the verified pricing model and the options selected for the run.
Limitations and responsible data use
- The Actor collects publicly accessible comment data from YouTube only.
- Field availability depends on what YouTube returns at run time; some values can be null or missing, and site changes can alter fields.
- The Actor does not provide historical snapshots unless you store them yourself.
- Large runs require residential proxies; without them, coverage may degrade due to rate limiting.
- You are responsible for compliance with YouTube's terms of service, applicable privacy law, and any contractual obligations before using the data.
Dataset questions
What does one dataset item represent?
One comment or reply. Replies are separate records linked to their parent via parentCommentId.
Which field should I use as a unique identifier?
commentId is the stable YouTube comment identifier and the recommended deduplication key.
Are fields nullable or conditional?
Yes. Reply records carry isReply and parentCommentId; top-level comments have parentCommentId null. Fields YouTube does not expose for a given comment are returned as null.
Can I retrieve the records as CSV or JSON?
Yes. The dataset can be exported as JSON, CSV, or Excel from the Apify Console, and queried through the Dataset API.
Does the Actor return historical data?
No. Each run captures the state of the comments at run time. To track changes, schedule repeated runs and store the outputs yourself.
What counts as a billable result?
Each comment pushed to the dataset is one billable result, charged at $2.50 per 1,000 comments. Use maxItems to control cost per run.
Related datasets from Data Scrapers
- YouTube Channel Scraper — Channel and video metadata that can be joined to comment data by channel or video ID.
- TripAdvisor Reviews Scraper — User review text for sentiment and reputation analysis.
- Google Play Store App Reviews Scraper — App review text for product feedback analysis.
- Twitter X Profile Scraper — Public post data for cross-platform audience research.
Data Scrapers support
Need an additional field, record type, or export workflow? Contact Data Scrapers at stardustspotlight@gmail.com. Include a sample source URL, required fields, expected record volume, and preferred delivery format.