How to Analyse Instagram Comment Sentiment
To analyse Instagram comment sentiment, collect the comments on the posts you care about with apidojo's Instagram Comments Scraper API, score each comment with a sentiment model, and weight the results by comment likes.

To analyse Instagram comment sentiment, collect the comments on the posts you care about with apidojo’s Instagram Comments Scraper API, score each comment with a sentiment model, and weight the results by comment likes. For English comments, VADER is a quick, free starting point built for social media text, including emoji. Read a sample by hand before trusting the totals. This guide extends the recurring pattern in how to monitor Instagram hashtags and mentions.
Comments are where audiences say what they think of a product, campaign or creator. This guide covers collection, cleaning, scoring, weighting and reporting. Collecting comments is covered in detail in how to scrape Instagram comments. Comment quality is also a vetting signal, covered in how to vet Instagram influencers with data.
Step 1: Collect the Comments
Choose the posts that matter, such as campaign posts or a competitor’s launch, and collect their comments by URL or post code. The Comments Scraper API charges $0.0075 per post, with the first 15 comments included (Apify).
import pandas as pd
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("apidojo/instagram-comments-scraper-api").call(run_input={
"startUrls": ["https://www.instagram.com/p/DC7Q4z5JPMX/"],
"maxItems": 2000,
})
df = pd.json_normalize(list(client.dataset(run.default_dataset_id).iterate_items()))
The field names below, such as message and likeCount, follow apidojo’s Comments Scraper output example (Apify).
Step 2: Clean the Comments
Remove duplicates and empty comments, but keep emoji, which often carry most of the meaning.
df = df.drop_duplicates("id")
df["message"] = df["message"].fillna("").str.strip()
df = df[df["message"].str.len() > 0]
If your audience comments in several languages, score each language with a model built for it; VADER is designed for English.
Step 3: Score Each Comment
Score English comments with VADER, whose compound score runs from -1 to 1; scores of 0.05 and above are usually treated as positive, and -0.05 and below as negative.
from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer
analyzer = SentimentIntensityAnalyzer()
df["score"] = df["message"].apply(lambda t: analyzer.polarity_scores(t)["compound"])
df["sentiment"] = pd.cut(df["score"], [-1.01, -0.05, 0.05, 1.01], labels=["negative", "neutral", "positive"])
Read 100 random scored comments to check accuracy; sarcasm, slang and in-jokes are the usual errors. The same scoring for TikTok comments is in how to analyse TikTok comment sentiment.
Step 4: Weight by Likes
Weight each comment by its likeCount plus one, because a comment with hundreds of likes speaks for many more people than one with none.
df["weight"] = df["likeCount"].fillna(0) + 1
plain = df["sentiment"].value_counts(normalize=True)
weighted = df.groupby("sentiment")["weight"].sum() / df["weight"].sum()
print(pd.DataFrame({"share": plain, "like_weighted": weighted}).round(3))
Step 5: Find What People Talk About
Sentiment shows how people feel; the words show what about. Count the most frequent words and phrases in positive and negative comments separately, after removing filler words. Product names, features and complaints that repeat in the negative group are your action list.
What Does Comment Sentiment Analysis Cost?
Collection is the only cost: 20 posts cost $0.15 when each has up to 15 comments, and VADER runs free on your own machine. Posts with long threads add a charge per extra comment on the Comments Scraper API.
Questions people ask
How accurate is sentiment analysis on Instagram comments?
Good for trends across many comments; less reliable for single comments with sarcasm or slang.
Should you include replies?
Include them for conversation analysis; leave them out for first reactions.
Can you track sentiment over time?
Yes, group by the createdAt week, or rerun on new posts; see how to monitor Instagram hashtags and brand mentions.
Can you analyse a competitor's comments?
Yes, comments on any public post can be collected; see how to track competitors on Instagram.