How to Analyse TikTok Comment Sentiment

To analyse TikTok comment sentiment, export the comments from the videos you care about with apidojo's TikTok Comments Scraper on Apify, split them by language, score each comment with a sentiment model, and weight the results by comment likes.

Cover card reading 'How to Analyse TikTok Comment Sentiment'

To analyse TikTok comment sentiment, export the comments from the videos you care about with apidojo’s TikTok Comments Scraper on Apify, split them by language, score each comment with a sentiment model, and weight the results by comment likes. The export includes each comment’s detected language and like count, which makes both steps straightforward. Collection costs $0.30 per 1,000 comments.

Comments are where people say what they actually think of a product, campaign or creator. This guide covers collection, cleaning, scoring, weighting and reporting. Exporting comments is covered in detail in how to scrape TikTok comments and replies. This guide extends the recurring pattern in how to monitor TikTok trends with an API. Scored comments can feed a TikTok dataset for AI and research, and the creators behind the best-received videos are a start for finding TikTok influencers by niche.

Step 1: Collect the Comments

Pick the videos that matter, such as your campaign posts, a competitor’s launch or a creator’s sponsored video, and export their comments. Each video should have at least 10 comments (Apify).

import pandas as pd
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("apidojo/tiktok-comments-scraper").call(run_input={
    "startUrls": [
        "https://www.tiktok.com/@brand/video/7353781970163272993",
        "https://www.tiktok.com/@brand/video/7277992603752203013",
    ],
    "includeReplies": False,
    "maxItems": 10000,
})
df = pd.json_normalize(list(client.dataset(run.default_dataset_id).iterate_items()))

Step 2: Clean and Split by Language

Drop duplicates and near-empty comments, and split the rest by the commentLanguage field, because sentiment models work best on the language they were built for. Keep emoji: on TikTok they often carry most of the meaning.

df = df.drop_duplicates("id")
df = df[df["text"].str.strip().str.len() > 1]
print(df["commentLanguage"].value_counts().head())
english = df[df["commentLanguage"] == "en"].copy()

Step 3: Score Each Comment

Score English comments with VADER, a rule-based model designed for social media text that also reads emoji and emphasis; use a multilingual transformer model for other languages. VADER’s compound score runs from -1 to 1, and scores of 0.05 and above are usually counted as positive, and -0.05 and below as negative.

from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer

analyzer = SentimentIntensityAnalyzer()
english["score"] = english["text"].apply(lambda t: analyzer.polarity_scores(t)["compound"])
english["sentiment"] = pd.cut(english["score"], [-1.01, -0.05, 0.05, 1.01],
                              labels=["negative", "neutral", "positive"])

Read a random sample of 100 scored comments before trusting the totals. Sarcasm, slang and in-jokes are the most common errors on TikTok.

Step 4: Weight by Likes

Weight each comment by its likeCount plus one, because a comment with 3,000 likes speaks for far more viewers than one with none. Report both the plain share and the like-weighted share.

english["weight"] = english["likeCount"] + 1
plain = english["sentiment"].value_counts(normalize=True)
weighted = english.groupby("sentiment")["weight"].sum() / english["weight"].sum()
print(pd.DataFrame({"share": plain, "like_weighted": weighted}).round(3))

Step 5: Find What People Talk About

Sentiment says how people feel; the words in the comments say what about. Count the most common words and phrases in positive and negative comments separately, after removing filler words. Repeated product names, features or complaints in the negative set are your action list.

What Does Comment Sentiment Analysis Cost?

Collecting 10,000 comments costs $3 at $0.30 per 1,000; VADER runs free on your own machine. A campaign of 20 videos with 500 comments each also comes to $3 (Apify).

Questions people ask

How accurate is sentiment analysis on TikTok comments?

Good enough for trends across thousands of comments; less reliable for single comments with sarcasm or slang.

Should you include replies?

Include them for conversation analysis; leave them out when you want first reactions to the video.

Can you track sentiment over time?

Yes, group by createdAt week, or rerun on new videos with how to monitor TikTok trends with an API.

Can you analyse a competitor's comments?

Yes, public comments on any public video can be collected; see how to track competitors on TikTok.