YouTube Scraper With Comment & Engagement Analytics avatar

YouTube Scraper With Comment & Engagement Analytics

Pricing

from $3.99 / 1,000 results

Go to Apify Store
YouTube Scraper With Comment & Engagement Analytics

YouTube Scraper With Comment & Engagement Analytics

๐ŸŽฅ YouTube Scraper extracts data from channels, videos & playlists โ€” titles, descriptions, views, likes, comments, tags, publish date & transcripts. ๐Ÿ” Ideal for SEO, competitor analysis, trend tracking & content planning. โšก Fast, reliable, export to CSV/JSON.

Pricing

from $3.99 / 1,000 results

Rating

0.0

(0)

Developer

Scrapio

Scrapio

Maintained by Community

Actor stats

0

Bookmarked

10

Total users

5

Monthly active users

17 days ago

Last modified

Share

YouTube Scraper โ€” Extract Videos, Comments and Engagement Analytics

YouTube Scraper With Comment & Engagement Analytics turns a search keyword or a direct video URL into typed JSON rows covering videos, Shorts, and live streams โ€” plus, on the same page fetch, the most-replayed retention heatmap and chapter markers YouTube normally shows only to the video's own creator. Turn on comment fetching and every row is followed by its full threaded comment/reply data. Unlike scraping frameworks that return raw HTML, it returns structured JSON ready for your database, spreadsheet, or LLM pipeline with no parsing step. This guide documents all 34 input parameters, every output field, and three concrete deployment patterns teams run in production.

๐Ÿงญ What Does YouTube Scraper With Comment & Engagement Analytics Do?

YouTube Scraper With Comment & Engagement Analytics takes YouTube search keywords, direct video/Shorts URLs, or both in one run, and returns one row per video plus (optionally) one row per comment and reply. No YouTube account, login, or Data API key is required โ€” the actor replays the same internal youtubei endpoints and watch-page payload the youtube.com website itself uses.

  • Scrapes long-form videos, Shorts, and live/upcoming streams from keyword search, with independent per-query caps for each content type.
  • Analyzes direct video/Shorts URLs without a search step โ€” useful for tracking specific uploads over time.
  • Extracts the most-replayed heatmap curve and creator-defined chapter markers from data already loaded for every video, at zero extra request cost.
  • Fetches full threaded comments and replies (author, avatar, text, likes, pinned/hearted-by-creator flags) linked correctly to the comment they reply to.
  • Computes derived engagement analytics โ€” engagement rate, like/comment-to-view ratios, view velocity, and a within-run view-count percentile rank.
  • Downloads transcripts/captions in SRT, plain text, or timestamped JSON, with an option to persist them to the key-value store.
  • Applies YouTube's own search filters (sort order, upload date, content type, duration) plus 11 post-scrape technical filters (HD, 4K, HDR, live, 360ยฐ, 3D, VR180, captions, location, Creative Commons, purchased).

โšก Features & Capabilities

The feature set splits into what every run scrapes by default, what it computes for free on top of that, and where it sits inside Scrapio's YouTube tooling.

Core features

  • Three ways in, combinable in one run: searchQueries (keyword search), videoUrls (direct video/Shorts URLs), or both together.
  • Full per-video fields: title, type, id, url, thumbnailUrl, viewCount, date, likes, channelName, channelUrl, channelId, numberOfSubscribers, duration, commentsCount, text (description), hashtags, descriptionLinks, commentsTurnedOff, isCreativeCommons, isPurchased.
  • Retention analytics at zero extra cost: hasHeatmap, heatmapPeakTimestampMs, heatmapPeakIntensity, plus the full heatmap array and chapters/chapterCount โ€” read from the same ytInitialData payload already fetched for view/like/subscriber counts, controlled by fetchHeatmapChapters.
  • Full comment threads, not just a count: fetchComments adds commentAuthor, commentAuthorAvatar, commentText, commentLikes, replyCount, hasCreatorHeart, authorIsChannelOwner, and replyToCid threading, capped independently by maxCommentsPerVideo and maxRepliesPerComment.
  • Derived engagement analytics, pure computation: engagementRate, likeToViewRatio, commentToViewRatio, viewsPerDay, and viewsPercentileRank โ€” computed locally from fields the actor already collected, controlled by computeEngagementAnalytics.
  • Transcript extraction: downloadTranscripts pulls subtitles in SRT, plain text, or timestamped-JSON format (transcriptFormat), in any of 20 languages (transcriptLanguage), with auto-generated-caption preference (preferAutoGeneratedTranscript).
  • Anti-blocking: an internal none โ†’ datacenter โ†’ residential proxy escalation chain (proxySettings) that locks onto whichever tier first succeeds, plus a retry when YouTube returns a thin/degraded player response on an otherwise-successful request.

YouTube Scraper With Comment & Engagement Analytics within the Scrapio data stack

This actor covers videos, Shorts, live streams, comments, and derived engagement analytics in one run. For dedicated channel discovery and subscriber-count lookups, use YouTube Channel Finder With Subscriber Counts. For comment threads that need deeper pagination beyond this actor's per-video comment caps, use YouTube Comments Scraper With Reply Thread Expansion. For a transcript-first workflow paired with view/like analytics rather than heatmap and comment data, use YouTube Transcript Scraper With View & Like Analytics.

Why do developers and data teams scrape YouTube?

YouTube carries content signal (views, retention, comments) that no other platform surfaces the same way โ€” the audience for this data splits by what specifically they pull from a video row.

๐Ÿข Content strategy, creator, and video marketing teams

A content strategist points the actor at a competitor's channel or a topic keyword, turns on fetchHeatmapChapters, and reads heatmapPeakTimestampMs/heatmapPeakIntensity to see exactly which second of a competitor's video held viewers best, then cross-references it against chapters to see what topic was playing at that moment. Combined with engagementRate and viewsPerDay across a batch of videos, this turns "what's working in my niche" from a guess into a ranked, field-backed list that feeds directly into a content calendar or a creative brief.

๐Ÿ“Š AI training data and RAG indexing

text (the full video description), commentText, and chapters[].title are the high-information text fields here โ€” real creator and viewer language, not a platform summary. For RAG, index commentText keyed on videoId so an assistant answering "what do viewers say about X" retrieves an actual quoted comment instead of a guess. For training data, pair engagementRate or viewsPercentileRank with text/commentText as a quality-weighting signal. Every field returns as a typed string, number, or boolean โ€” no HTML runs or JSON-in-a-string to unpack first.

๐Ÿ“ฑ Competitive and market intelligence

Run the actor against a competitor's upload list on a schedule and track viewsPerDay (view velocity) and engagementRate run over run: a sudden jump in either metric on a specific video is an earlier signal that a competitor's content strategy shifted than anything visible from a channel's public subscriber count alone.

๐Ÿ”ฌ Research and academic use

heatmap, commentText, and engagementRate support research questions about viewer retention behavior and audience response that the YouTube Data API doesn't expose at this depth. Scope stays to public data โ€” the actor requests only pages and endpoints YouTube serves to anonymous, logged-out visitors.

๐ŸŽฅ Product and SaaS development

Build a creator-analytics dashboard, a content-performance benchmarking tool, or a comment-sentiment product on top of this schema โ€” heatmapPeakTimestampMs, engagementRate, and the full threaded commentText data ship already structured, so a product layer doesn't need its own YouTube-parsing code.

๐Ÿš Input Parameters

All 34 parameters are optional โ€” required is empty in the input schema. If neither searchQueries nor videoUrls is provided, the run logs a warning and defaults to searching "Crawlee".

ParameterRequiredTypeDescriptionExample Value
searchQueriesNoarrayYouTube search keywords; each is scraped independently with full analytics. Also accepts searchTerms.["Crawlee"]
videoUrlsNoarrayDirect YouTube video/Shorts URLs to analyze without a search step. Also accepts startUrls.["https://www.youtube.com/watch?v=rfscVS0vtbw"]
maxVideoResultsNointeger (0โ€“9999)Long-form (non-Shorts, non-live) videos to analyze per query; 0 skips them. Also accepts maxVideos.10
maxShortResultsNointeger (0โ€“9999)Shorts to analyze per query; 0 skips them. Also accepts maxShorts.0
maxLiveResultsNointeger (0โ€“9999)Live/upcoming streams to analyze per query; 0 skips them. Also accepts maxStreams.0
fetchHeatmapChaptersNoboolean (default true)Extract the most-replayed retention heatmap and chapter markers from data already fetched โ€” no extra requests.true
fetchCommentsNoboolean (default false)Fetch full comment threads with replies; costs ~1 extra request per video.true
maxCommentsPerVideoNointeger (default 20, 0โ€“5000)Top-level comments fetched per video; 0 fetches every available page up to a 20-page safety limit.20
maxRepliesPerCommentNointeger (default 5, 0โ€“200)Replies fetched per top-level comment; 0 fetches top-level comments only.5
commentSortOrderNostring, enum top/newest (default top)Fetch comments in YouTube's "Top comments" or "Newest first" order."top"
computeEngagementAnalyticsNoboolean (default true)Add engagementRate, likeToViewRatio, commentToViewRatio, viewsPerDay, viewsPercentileRank to every video row.true
downloadTranscriptsNoboolean (prefill false)Fetch video subtitles/transcripts when available. Also accepts downloadSubtitles.false
saveTranscriptsToKvsNoboolean (prefill false)Store each downloaded transcript in the key-value store under transcript-VIDEO_ID. Also accepts saveSubtitlesToKvs.false
transcriptLanguageNostring, enum of 20 languages (prefill en)Preferred transcript language; falls back to available tracks. Also accepts subtitlesLanguage."en"
preferAutoGeneratedTranscriptNoboolean (prefill false)Prefer auto-generated captions over manually uploaded ones. Also accepts preferAutoGenerated.false
transcriptFormatNostring, enum srt/text/timestamp (prefill srt)Output shape for transcripts. Also accepts subtitlesFormat."srt"
resultsSortOrderNostring, enum ""/relevance/date/viewCount/ratingSort search results using YouTube's own sort options. Also accepts sortingOrder."relevance"
uploadDateFilterNostring, enum ""/hour/today/week/month/yearYouTube's built-in upload-date filter. Also accepts dateFilter."week"
contentTypeFilterNostring, enum ""/video/channel/playlist/movieKeep only standard videos (excludes Shorts). Also accepts videoTypeFilter."video"
durationFilterNostring, enum ""/short/medium/longYouTube's length presets (under 4 min / 4โ€“20 min / over 20 min). Also accepts lengthFilter."medium"
publishedAfterDateNostring (YYYY-MM-DD)Only include videos published after this date. Also accepts publishedAfter."2026-01-01"
finalSortFieldNostring, enum ""/date/viewCount/likesSort the final dataset by this field after scraping. Also accepts sortBy."viewCount"
filterHDNoboolean (prefill false)Only include HD (720p+) videos. Also accepts isHD.false
filter4KNoboolean (prefill false)Only include videos with a 2160p (4K) stream. Also accepts is4K.false
filterHDRNoboolean (prefill false)Only include High Dynamic Range videos. Also accepts isHDR.false
filterLiveNoboolean (prefill false)Only include live/live-style content. Also accepts isLive.false
filter360Noboolean (prefill false)Only include immersive 360ยฐ/spherical videos. Also accepts is360.false
filter3DNoboolean (prefill false)Only include stereoscopic 3D videos. Also accepts is3D.false
filterVR180Noboolean (prefill false)Only include VR180 videos. Also accepts isVR180.false
filterClosedCaptionsNoboolean (prefill false)Only include videos with at least one non-auto-generated caption track. Also accepts hasCC.false
filterLocationDataNoboolean (prefill false)Only include videos with explicit location metadata. Also accepts hasLocation.false
filterCreativeCommonsNoboolean (prefill false)Only include Creative Commons licensed videos. Also accepts isCreativeCommons.false
filterPurchasedNoboolean (prefill false)Best-effort filter for purchased/paid content; low coverage by YouTube's own design. Also accepts isPurchased.false
proxySettingsNoobject (prefill {"useApifyProxy": false})Starting proxy setup; the actor auto-escalates to datacenter then residential proxy on blocks. Also accepts proxyConfiguration.{"useApifyProxy": true}

Complete input example:

{
"searchQueries": ["Crawlee"],
"maxVideoResults": 10,
"maxShortResults": 5,
"fetchHeatmapChapters": true,
"fetchComments": true,
"maxCommentsPerVideo": 20,
"maxRepliesPerComment": 5,
"commentSortOrder": "top",
"computeEngagementAnalytics": true,
"downloadTranscripts": false,
"uploadDateFilter": "month",
"proxySettings": { "useApifyProxy": false }
}

Supported URL types and input formats

Direct URLs are matched with the pattern (?:v=|youtu\.be/|shorts/)([a-zA-Z0-9_-]{11}), extracting the 11-character video ID from any of these shapes:

  • Standard watch URL: "https://www.youtube.com/watch?v=rfscVS0vtbw" โ€” the classic long-form link.
  • Shortened link: "https://youtu.be/rfscVS0vtbw" โ€” resolved to the same video ID.
  • Shorts URL: "https://www.youtube.com/shorts/abc123XYZ90" โ€” analyzed as type: "shorts" automatically.
  • Keyword search: "searchQueries": ["fitness workout"] โ€” scraped as a live YouTube search, with results split across maxVideoResults/maxShortResults/maxLiveResults.

searchQueries and videoUrls can be combined in a single run โ€” for example, searching a topic keyword while also monitoring a specific competitor upload by URL.

๐Ÿ“ฆ Output Format

Every run pushes typed JSON rows to one dataset. Video, Shorts, and live-stream rows are tagged type; when fetchComments is on, each video's comment and reply rows follow immediately after it, tagged type: "comment"/"reply" and isChild. Fields are null rather than fabricated whenever real data couldn't be recovered โ€” for example, viewsPerDay is null when no resolvable publish date exists, and heatmapPeakTimestampMs/heatmapPeakIntensity are null when hasHeatmap is false.

Output for videos

One row per video/Short/stream (shown with fetchHeatmapChapters, fetchComments, computeEngagementAnalytics, and downloadTranscripts all on to display every available field):

{
"title": "Learn Python - Full Course for Beginners [Tutorial]",
"type": "video",
"id": "rfscVS0vtbw",
"url": "https://www.youtube.com/watch?v=rfscVS0vtbw",
"thumbnailUrl": "https://i.ytimg.com/vi/rfscVS0vtbw/hq720.jpg",
"viewCount": 48993944,
"date": "2018-07-11T00:00:00.000Z",
"likes": 1120381,
"location": null,
"channelName": "freeCodeCamp.org",
"channelUrl": "https://www.youtube.com/channel/UC8butISFwT-Wl7EV0hUK0BQ",
"channelUsername": null,
"channelId": "UC8butISFwT-Wl7EV0hUK0BQ",
"numberOfSubscribers": 11200000,
"duration": "04:26:52",
"commentsCount": 46000,
"commentsFetchedCount": 20,
"text": "This course will give you a full introduction into all of the core concepts in Python...",
"descriptionLinks": [{ "url": "https://www.freecodecamp.org", "text": "https://www.freecodecamp.org" }],
"subtitles": ["en", "es", "pt"],
"transcript": "1\n00:00:00,000 --> 00:00:05,240\nHello and welcome to this Python course...\n",
"transcriptLanguage": "en",
"transcriptFormat": "srt",
"commentsTurnedOff": false,
"fromYTUrl": "https://www.youtube.com/results?search_query=Crawlee",
"hashtags": ["#python", "#coding"],
"isCreativeCommons": false,
"isPurchased": false,
"hasHeatmap": true,
"heatmap": [{ "startMillis": "0", "durationMillis": "71490", "intensityScoreNormalized": 0.17 }],
"heatmapPeakTimestampMs": 14731040,
"heatmapPeakIntensity": 1,
"chapters": [{ "title": "Introduction", "startMillis": 0, "startTime": "0:00" }],
"chapterCount": 35,
"engagementRate": 0.023807,
"likeToViewRatio": 0.022866,
"commentToViewRatio": 0.000939,
"viewsPerDay": 5423.5,
"viewsPercentileRank": 100.0,
"scrapedAt": "2026-07-25T09:14:02.118Z"
}

Output for comments

One row per top-level comment or reply, immediately following its parent video row, when fetchComments is true:

{
"id": "Ugxqcek3RUzxWv-4VqB4AaABAg",
"cid": "Ugxqcek3RUzxWv-4VqB4AaABAg",
"type": "comment",
"isChild": false,
"parentId": "rfscVS0vtbw",
"videoId": "rfscVS0vtbw",
"pageUrl": "https://www.youtube.com/watch?v=rfscVS0vtbw",
"title": "Learn Python - Full Course for Beginners [Tutorial]",
"commentAuthor": "@freecodecamp",
"commentAuthorAvatar": "https://yt3.ggpht.com/example-avatar.jpg",
"commentText": "Want more from Mike? He's starting a coding RPG/Bootcamp",
"commentLikes": 4700,
"replyCount": 147,
"replyToCid": null,
"authorIsChannelOwner": true,
"isVerified": false,
"hasCreatorHeart": false,
"publishedTimeText": "5 years ago",
"scrapedAt": "2026-07-25T09:14:02.118Z"
}

Replies carry "type": "reply", "isChild": true, "parentId" set to the comment they reply to, and "replyToCid" populated with the same comment ID.

Schema stability and export options

Video fields are parsed from YouTube's own ytInitialData/ytInitialPlayerResponse payload with fallback paths for several fields (title, view count, channel name), so a front-end change is more likely to leave one field null than to break the row entirely. Only video/Shorts/live-stream rows are pushed under the row_result charged event; comment and reply rows are pushed as plain dataset items with no charged event attached, so turning fetchComments on does not multiply your billed row count beyond the video rows themselves. To isolate only the charged rows for a cost audit, filter the dataset where type is "video" or "shorts" (i.e., exclude rows where type is "comment" or "reply"). Export the dataset from the Apify Console or API as JSON, CSV, or Excel at any time.

๐Ÿ’ก YouTube Scraper With Comment & Engagement Analytics Strategy Guide

๐ŸŽฏ Strategy 1: Real-time enrichment pipeline

Trigger a run whenever a new video needs enrichment โ€” a webhook from your CMS on publish, or a manual flag on a competitor's new upload. Call the actor with that URL in videoUrls, fetchHeatmapChapters and computeEngagementAnalytics on. When the run finishes, read heatmapPeakTimestampMs, chapters, engagementRate, and viewsPerDay off the single returned row and write them onto the matching record in your content calendar or CRM, keyed on id โ€” no second lookup call needed, since every field is already computed by the time the run reports success.

๐ŸŽฏ Strategy 2: Scheduled monitoring and alerting

Run the same videoUrls list (your own channel or a competitor's top uploads) on a recurring Apify Schedule so every run samples the same videos. Diff viewCount, engagementRate, viewsPerDay, and viewsPercentileRank against the previous run's row for the same id, stored in your own database between runs. Alert when viewsPerDay spikes sharply (a video catching unexpected momentum), when engagementRate drops on a newly published video relative to the channel's recent baseline, or when hasHeatmap flips from false to true as a video accumulates enough watch-time data to expose its retention curve.

๐ŸŽฏ Strategy 3: Bulk dataset build

For a research or training dataset, feed a list of searchQueries or videoUrls, set maxVideoResults/maxShortResults to the coverage you need, and turn fetchComments on only if comment text is part of the dataset โ€” it adds one request per video. Internally, the actor fetches video pages with a fixed concurrency of 10 and caps each search query at 50 continuation pages as a safety limit (both are internal constants, not user-configurable). Export the dataset as CSV or JSON from the Apify Console, or pull it via the API into your own database for cross-video engagement analysis.

Strategy comparison at a glance

StrategyBest forRun patternOutput format
Real-time enrichmentEnriching a single video the moment it's published or flaggedOn-demand call per video, keyed on idJSON via API, written into your own database
Scheduled monitoringTracking engagement and retention drift over timeRecurring Apify Schedule, diffed run-over-runJSON, compared across dataset snapshots
Bulk dataset buildCross-video research or training datasetsOne run per query/URL batchCSV/JSON export of the full dataset

Other Scrapio YouTube scrapers

ScraperWhat it extracts
YouTube Channel Finder With Subscriber CountsChannel discovery and subscriber-count lookups.
YouTube Comments Scraper With Reply Thread ExpansionDeeper paginated comment threads beyond this actor's per-video caps.
YouTube Transcript Scraper With View & Like AnalyticsTranscript-first extraction paired with view/like analytics.

Cross-platform alternatives for comment and engagement data

ScraperWhat it extracts
Instagram Mentions Scraper With Engagement DataTagged-post engagement metrics on Instagram.
TikTok Trending Videos Insights & Author EngagementAd-derived video engagement and creator data on TikTok.
Reddit Comment Scraper (Sentiment & Lead Scoring)Comment threads with sentiment and lead scoring on Reddit.

Complementary scrapers for adjacent use cases

ScraperWhat it extracts
LinkedIn Scraper: Posts, Reactions, Comments & EngagementPost-level engagement analytics on LinkedIn company pages.
Facebook Groups Posts Scraper With Author Engagement AnalyticsPost and author-engagement leaderboards on Facebook groups.

How to integrate YouTube Scraper With Comment & Engagement Analytics with your stack

YouTube Scraper With Comment & Engagement Analytics runs on Apify, so any language that can call the Apify API โ€” directly, or through the apify-client SDK โ€” can start a run and read the dataset back.

Python

from apify_client import ApifyClient
import csv
client = ApifyClient("<YOUR_APIFY_TOKEN>")
video_urls = [
"https://www.youtube.com/watch?v=rfscVS0vtbw",
"https://www.youtube.com/watch?v=_uQrJ0TkZlc",
]
all_rows = []
for url in video_urls:
run = client.actor("scrapio/youtube-scraper-with-comment-engagement-analytics").call(run_input={
"videoUrls": [url],
"fetchHeatmapChapters": True,
"computeEngagementAnalytics": True,
})
all_rows.extend(client.dataset(run["defaultDatasetId"]).iterate_items())
videos = [r for r in all_rows if r.get("type") in ("video", "shorts")]
with open("youtube_videos.csv", "w", newline="", encoding="utf-8") as f:
writer = csv.DictWriter(f, fieldnames=[
"id", "title", "viewCount", "engagementRate", "viewsPerDay", "heatmapPeakTimestampMs",
])
writer.writeheader()
for row in videos:
writer.writerow({k: row.get(k) for k in writer.fieldnames})
print(f"Saved {len(videos)} video rows to youtube_videos.csv")

Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('scrapio/youtube-scraper-with-comment-engagement-analytics').call({
searchQueries: ['Crawlee'],
maxVideoResults: 10,
fetchComments: true,
computeEngagementAnalytics: true,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
const videos = items.filter((r) => r.type === 'video' || r.type === 'shorts');
console.log(`Fetched ${videos.length} videos`);
console.log(`Top by views: ${videos[0].title} (${videos[0].viewCount} views, engagementRate ${videos[0].engagementRate})`);

Async and scheduled pipelines

Apify Schedules run this actor on a cron interval directly from the Console or API โ€” point a Schedule at the same videoUrls or searchQueries input and diff the dataset across runs without writing scheduling code yourself. For larger jobs, poll run status via the API (or client.run(runId).get() in Python/Node) and read the dataset once the run reaches SUCCEEDED, rather than blocking on a synchronous call.

๐ŸŽฏ Who Needs YouTube Scraper With Comment & Engagement Analytics? (Use Cases & Industries)

๐Ÿข Content strategy, creator, and video marketing teams

A content strategist runs the actor weekly against a competitor's recent uploads, sorts by engagementRate and viewsPerDay, and rebuilds next month's content brief around the topics and heatmap-peak moments that consistently outperform.

๐Ÿ“Š AI, ML, and data teams

A team building a YouTube-aware assistant indexes commentText and text (description) keyed on videoId into a vector store, so it can answer "what do viewers say about this topic" with an actual quoted comment instead of a guess.

๐Ÿ“ฑ Competitive and market intelligence analysts

An analyst tracks a competitor channel's viewsPerDay and engagementRate on a schedule, flagging any video whose velocity jumps sharply as an early signal that a content shift is resonating before it shows up in subscriber counts.

๐Ÿ”ฌ Researchers

Academic and market researchers pull heatmap, commentText, and engagementRate across a topic or channel to study viewer retention behavior and audience response โ€” scoped to public videos YouTube serves to anonymous, logged-out visitors.

๐ŸŽฅ Product and SaaS builders

A SaaS founder builds a creator-analytics or comment-sentiment dashboard on top of heatmapPeakTimestampMs, chapters, and the full threaded commentText data, without writing any YouTube-parsing code of their own.

Scraping publicly accessible web pages is broadly permitted in the US: the Ninth Circuit's decision in hiQ Labs v. LinkedIn (2019, reaffirmed 2022) held that accessing data a website serves to anyone โ€” logged in or not โ€” does not by itself violate the Computer Fraud and Abuse Act. That's separate from YouTube's own Terms of Service, which restrict automated access; breaching a platform's terms is a civil contract matter between you and YouTube, not a criminal one, though it can lead to IP or account action. This actor never logs into YouTube โ€” it requests only the search results and watch pages YouTube serves to anonymous visitors. Because commenter display names and avatars are personal data under frameworks like GDPR and CCPA, you โ€” not the actor โ€” are the data controller for anything you store from comment rows, and you're responsible for a lawful basis to keep and use it. YouTube Scraper With Comment & Engagement Analytics returns only publicly accessible data. What you do with that data is your responsibility โ€” consult legal counsel for commercial applications involving personal data.

โ“ Frequently asked questions

Does YouTube Scraper With Comment & Engagement Analytics work without a YouTube account?

Yes. No login, session, or YouTube Data API key is required โ€” the actor replays the same youtubei search and watch-page endpoints the youtube.com website itself calls, as an anonymous visitor.

How does it handle YouTube's anti-scraping measures?

Requests start with no proxy and automatically escalate through Apify datacenter proxy, then residential proxy, locking onto whichever tier first returns a clean response for the rest of the run. It also detects a known "thin player response" degradation โ€” where core fields like viewCount/lengthSeconds come back empty on an otherwise-successful request โ€” and retries once over a fresh residential proxy.

Can I run it at scale without getting blocked?

The actor fetches video pages with a fixed internal concurrency of 10 and caps each search query at 50 continuation pages as a safety limit. There's no published uptime or success-rate figure for this actor โ€” reliability in practice depends on the proxy tier and volume you run with.

How fresh is the data YouTube Scraper With Comment & Engagement Analytics returns?

Live. Every run fetches current search results and watch pages directly from YouTube โ€” there is no content caching layer, so re-running against the same query or URL re-fetches current view counts, comments, and engagement figures.

Which fields work best for AI training and RAG indexing?

For RAG, index commentText and text (the video description) keyed on videoId so an assistant retrieves an actual quoted comment or description instead of a guess. For training data, pair those text fields with engagementRate or viewsPercentileRank as a quality- or popularity-weighting signal. Every field returns as a typed string, number, or boolean โ€” no HTML to strip before it reaches a prompt or a training set.

Does this actor return personal data, and what's my responsibility?

Yes โ€” when fetchComments is on, commentAuthor (display name) and commentAuthorAvatar are personal data under frameworks like GDPR and CCPA. The actor only surfaces what YouTube already displays publicly on a video's comment section to any visitor. Storing and using that data lawfully โ€” retention limits, deletion requests, a documented legal basis โ€” is your responsibility as the data controller, not the actor's.

The most-replayed heatmap is only present once YouTube has gathered enough aggregate watch-time data for a given video; low-view or very recently published videos routinely return hasHeatmap: false and heatmapPeakTimestampMs: null. This is a genuine YouTube data-availability gap, not a scraper defect โ€” the actor never fabricates a heatmap curve that YouTube itself hasn't generated.

What's the difference between commentsCount and commentsFetchedCount?

commentsCount is YouTube's own displayed total comment count for the video. commentsFetchedCount is how many comment/reply rows this run actually pulled, bounded by maxCommentsPerVideo and maxRepliesPerComment โ€” on a popular video these will usually differ, since the run stops once it hits your configured caps rather than fetching every comment ever posted.

Are comment and reply rows billed the same as video rows?

No. Only video/Shorts/live-stream rows are pushed under the row_result charged event; comment and reply rows are pushed as plain dataset items with no charged event attached. Turning fetchComments on adds real dataset rows and one extra request per video, but does not multiply your charged row count.

Does YouTube Scraper With Comment & Engagement Analytics work with Claude, ChatGPT, and other AI agent tools?

There's no MCP server for this actor, so it isn't registered as a ready-made tool inside an MCP-compatible client out of the box. Any agent framework that can call the Apify API or the apify-client/apify SDK โ€” including custom tools wired into Claude, ChatGPT, or LangChain-style agents โ€” can start a run and read the dataset back. Every row is typed JSON, so no HTML parsing step is needed before it goes into an agent's context window.

โ„น๏ธ Disclaimer

YouTube Scraper With Comment & Engagement Analytics extracts only publicly available data from YouTube. This tool is intended for lawful use cases only. Users are responsible for complying with YouTube's terms of service and applicable data protection laws in their jurisdiction.