Analyze YouTube Comments for Audience Sentiment Data (2026)
Analyze YouTube comments for audience sentiment, recurring topics, and creator insights. Includes structured fields, Python examples, limitations, and JSON.

The Thirdwatch YouTube Comments Scraper converts public video and Shorts URLs into structured comment rows for audience sentiment analysis. It returns comment text, public author details, likes, relative and parsed dates, creator-heart signals, reply status, video IDs, and source URLs. Creators, brand teams, agencies, and researchers can use the dataset to identify recurring questions, compare reactions across videos, prioritize high-engagement feedback, and monitor new conversations without a YouTube API key.
▶ Skip the setup: Run the audience-sentiment Task on Apify → — it is preloaded with the small, tested configuration from this guide. No code required.
Disclosure: Thirdwatch's Apify links include its referral parameter. This does not change your price.
Why analyze YouTube comments for audience sentiment
YouTube comments are a direct record of how viewers respond after watching. View counts measure reach and likes compress reaction into one number, but comments explain what people understood, disliked, requested, questioned, or wanted next. For a creator, that can guide a content calendar. For a brand, it can reveal support issues and messaging gaps. For a researcher, it creates a corpus of public audience language linked to specific videos.
The scale of the platform makes systematic collection valuable. YouTube reported that viewers watch more than one billion hours of YouTube on televisions every day, while Shorts average more than 200 billion daily views. Even a narrow campaign can generate more discussion than a person can reliably copy into a spreadsheet.
Good sentiment work begins with the source text rather than an opaque score. Preserve the video, comment ID, engagement, time, and reply context; define the question; validate a sample; and then classify. The YouTube Comments Scraper actor page supplies that reproducible data layer.
How does this compare to the alternatives?
Teams can read comments manually, use the official YouTube Data API, maintain a custom extractor, or run a managed Actor.
| Method | Commercial model | Reliability | Setup time | Maintenance |
|---|---|---|---|---|
| Manual comment review | Staff time | Good for a few videos | Minutes | Repeated copying and sampling bias |
| YouTube Data API | Google quota and engineering | Official structured interface | Hours to days | Credentials, quota, pagination, and storage |
| DIY public-data extractor | Infrastructure and engineering | Varies as YouTube changes | Several days | You own parsing, retries, and exports |
| Thirdwatch YouTube Comments Scraper | Pay per saved comment | Managed public-comment workflow | About five minutes | Thirdwatch maintains the Actor |
The official API is a strong choice when a team already operates Google Cloud credentials and needs broader YouTube resources. Manual review remains useful for qualitative validation. The Thirdwatch Actor fits repeatable video-level collection when the team wants comments and replies without managing API keys or extraction code.
How to analyze YouTube comments in 4 steps
How do I choose a useful video sample?
Start from a research question. To evaluate a campaign, include every campaign video and a pre-campaign baseline. To compare creators, use videos with similar topics and publication windows. To improve a channel, combine high-performing, average, and underperforming uploads rather than sampling only viral hits.
videos = {
"launch": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"tutorial": "https://www.youtube.com/shorts/aqz-KE-bpKQ",
}
video_segments = {
"dQw4w9WgXcQ": "launch",
"aqz-KE-bpKQ": "tutorial",
}Keep the mapping between video and segment outside the scraper so it can be joined to every output row. The Actor accepts regular watch URLs, Shorts, live and embed URLs, youtu.be links, and bare 11-character video IDs. It does not discover videos from channels or playlists; use YouTube search and channel data first when discovery is part of the project.
How do I collect YouTube comments with Python?
Use the official Apify client, keep the token in an environment variable, and pass the documented input fields. Apify's API documentation covers runs and datasets.
import os
from apify_client import ApifyClient
client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("thirdwatch/youtube-comments-scraper").call(run_input={
"videoUrls": list(videos.values()),
"maxCommentsPerVideo": 500,
"sort": "recent",
"language": "en",
"includeReplies": True,
})
comments = list(client.dataset(run["defaultDatasetId"]).iterate_items())
print(f"Collected {len(comments)} public comments and replies")Use recent for monitoring and popular for a high-engagement research sample. The maximum applies separately to each valid video, and replies count toward that maximum when enabled.
How do I create an auditable sentiment baseline?
Begin with rules that analysts can inspect. The goal is not to claim perfect emotion detection; it is to establish a repeatable baseline and identify rows requiring review.
positive_terms = {"helpful", "excellent", "love", "clear", "useful"}
negative_terms = {"broken", "confusing", "wrong", "hate", "issue"}
def classify(text):
words = set((text or "").lower().split())
score = len(words & positive_terms) - len(words & negative_terms)
if score > 0:
return "positive"
if score < 0:
return "negative"
return "unclassified"
for comment in comments:
comment["sentiment_baseline"] = classify(comment.get("text"))Review a balanced sample from every label. Sarcasm, negation, slang, mixed sentiment, and multilingual discussion will defeat simple rules. If a model is added, store its version and confidence alongside the original comment instead of replacing the source text.
How do I find recurring audience topics?
Normalize obvious variants, remove common stop words, and compare term frequencies by video or segment. High-engagement comments are useful leads, but likes are not a representative vote.
import pandas as pd
from collections import Counter
df = pd.DataFrame(comments)
df["segment"] = df["videoId"].map(video_segments)
stop = {"the", "and", "this", "that", "with", "from", "your", "video"}
def keywords(series, limit=15):
words = []
for text in series.dropna():
words.extend(
word.strip(".,!?()[]\"'").lower()
for word in text.split()
if len(word) > 3 and word.lower() not in stop
)
return Counter(words).most_common(limit)
for segment, group in df.groupby("segment", dropna=False):
print(segment, keywords(group["text"]))Read the comments behind each candidate topic before turning it into a decision. A frequent product name may indicate praise, a complaint, a comparison, or unrelated spam.
Sample YouTube comment output
Each row represents one publicly visible comment or reply associated with its source video.
The record below is an illustrative synthetic example, not a current YouTube comment.
{
"cid": "Ugx1AbCDefGhijkLmN4AaABAg",
"text": "The explanation at 4:12 finally made this topic click for me.",
"author": "Alex R.",
"channel": "https://www.youtube.com/@alexresearch",
"votes": 128,
"time": "2 days ago",
"time_parsed": 1784073600,
"photo": "https://yt3.ggpht.com/example",
"heart": false,
"reply": false,
"videoId": "dQw4w9WgXcQ",
"videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}Use cid for deduplication, text for classification and topic work, and videoId or videoUrl for grouping. votes, heart, and reply status add engagement context. Optional values can be absent because YouTube does not display every field on every comment.
Common pitfalls in YouTube comment analysis
The first pitfall is treating commenters as a representative sample of all viewers. People who comment are self-selecting, and popular ordering increases that bias. The second is confusing likes with agreement from the whole audience. They reflect engagement among people who saw and chose to react to that comment.
The third is labeling sarcasm, slang, or multilingual text with an English keyword list and presenting the output as precise sentiment. Validate samples and report an unclassified group. The fourth is losing thread context: a reply may look negative until its parent is read. The fifth is double-counting recurring comments across scheduled runs; deduplicate on cid where available.
Only publicly visible comments can be returned. Deleted, private, held-for-review, members-only, disabled, or regionally unavailable discussion is outside the dataset. Relative dates are only as precise as YouTube's public label. Finally, public author names and channel URLs can be personal data. Minimize collection, restrict retention, and use the dataset for legitimate analysis rather than attempts to identify or target individuals.
Related YouTube audience research use cases
Frequently asked questions
Do I need a YouTube Data API key to collect comments?
No. The YouTube Comments Scraper collects publicly visible comments from video URLs or IDs without a Google Cloud project, API key, YouTube account, or copied cookies. It does not consume your YouTube Data API quota.
Can the Actor collect YouTube Shorts comments and replies?
Yes. It accepts Shorts, regular watch, live, embed, and youtu.be URLs, plus bare video IDs. Enable includeReplies to collect publicly available replies; replies count toward the per-video result limit.
Can YouTube comments be monitored automatically?
Yes. Select recent ordering, save the input as an Apify Task, and attach a schedule. Use the comment ID to deduplicate successive datasets before sending new comments to a warehouse, spreadsheet, webhook, or alerting workflow.
Does the scraper classify sentiment automatically?
No. It returns the source comments and engagement context so teams can choose an auditable keyword method, a statistical classifier, or a language model. Keeping collection and classification separate makes the analysis easier to test and revise.
Related
100 free credits, no credit card.
About 30 real searches. Add the MCP to Claude or Cursor in two minutes.