---
title: "Social Media Sentiment Analysis: Methods & Costs | Mentio"
description: "Social media sentiment analysis: LLM prompts, Google, AWS and Azure prices per post, listening tools, and how to measure accuracy yourself."
canonical: https://mentio.dev/blog/social-media-sentiment-analysis/
markdown: https://mentio.dev/blog/social-media-sentiment-analysis/index.md
last-updated: 2026-11-23T20:55:42.235Z
---

# Social Media Sentiment Analysis: Methods & Costs | Mentio

> Social media sentiment analysis: LLM prompts, Google, AWS and Azure prices per post, listening tools, and how to measure accuracy yourself.

Source: https://mentio.dev/blog/social-media-sentiment-analysis/

Social media sentiment analysis is labelling the posts that mention your brand, product or topic as positive, neutral or negative, so you can see how people feel and spot when that changes. There are three ways to do it: prompt an LLM yourself, call a cloud NLP API (Google, AWS, Azure), or use a listening tool that scores every post it finds. This guide covers where sentiment models fail, what each way costs per post, how to measure accuracy on your own data, and why relevance has to come before sentiment or your numbers lie.

Key takeaways

-   Sentiment is only useful when it is the author’s tone toward the thing you track, not the mood of the post. “This tool is sick” is praise; a rant about a competitor that names you once is neutral for you.
-   Per 1,000 short posts: Amazon Comprehend $0.30, Google Cloud Natural Language $1.00, Azure AI Language $1.00, a small LLM well under $1. All three cloud APIs have free monthly tiers.
-   Nobody can tell you a model’s accuracy on your posts. Label 100 yourself, build a confusion matrix, and watch the negatives the model missed.
-   Score relevance first. Off-topic posts are mostly neutral and dilute the negative share you are trying to watch.
-   Report the share of negative posts and its spikes, not an average score. On Mentio, every match gets relevance, sentiment, emotion and intents, for $0.008 per matched mention.

## What are the three ways to do social media sentiment analysis?

The choice is less about the model and more about who collects the posts, who keeps the labels honest, and what you pay per post. Prices are from each vendor’s pricing page on November 22, 2026, for posts under 300 characters, past the free tier:

Way

What you get

Cost per 1,000 short posts

Free tier

Finds the posts

Knows what you track

LLM you prompt (for example Claude Haiku 4.5)

Any labels you define: sentiment toward a target, emotion, intent, a reason

About $0.80 at list price, half with batch; about $0.08 on Claude Haiku 5.5

Trial credits

No

Yes, if your prompt says so

[Amazon Comprehend](https://aws.amazon.com/comprehend/pricing/)

POSITIVE, NEGATIVE, NEUTRAL, MIXED with a score each

$0.30 (3-unit minimum of 100 characters, $0.0001 a unit)

50,000 units a month for 12 months

No

Targeted sentiment only, priced the same

[Google Cloud Natural Language](https://cloud.google.com/natural-language/pricing)

A score from -1.0 to 1.0 plus a magnitude

$1.00 ($1.00 per 1,000 units of 1,000 characters, down to $0.25 past 5M)

5,000 units a month

No

Entity sentiment, $2.00 per 1,000 units

[Azure AI Language](https://azure.microsoft.com/en-us/pricing/details/cognitive-services/language-service/)

positive, neutral, negative per document and sentence, plus opinion mining

$1.00 (per 1,000 text records, down to $0.25 past 10M)

5,000 records a month

No

Opinion mining ties sentiment to aspects

Listening tool with built-in sentiment ([Mentio](/pricing/))

Relevance 0 to 100, sentiment, emotion, intents, confidence

Included in $0.008 per matched mention ($8 per 1,000)

$5.80 welcome credit

Yes

Yes, per keyword and company

The listening tool looks expensive per post because the price includes finding the post on 19 platforms, deduplicating it, judging relevance and delivering it. If you already have the posts in a database, the first four rows are the fair comparison. If you do not, the API price is the small line, the same way the [Reddit API was never where the money went](/blog/reddit-api-pricing/).

One date to note: Microsoft says sentiment analysis and opinion mining [retire from Azure Language on March 31, 2029](https://learn.microsoft.com/en-us/azure/ai-services/language-service/sentiment-opinion-mining/overview) and points new projects to its Foundry models, which means an LLM.

## Why does sentiment analysis get social posts wrong?

Sentiment on social media is harder than on product reviews, which is what most classic models were trained on. Posts are short, informal, often replies with half the context missing, and full of words that mean the opposite of their dictionary sense. Five failure modes cover most of the errors you will see:

1.  **Sarcasm.** “Love waiting 40 minutes for support, great job” has two positive words and is a complaint. Lexicon models (VADER and its kin) score it positive. LLMs do better but still miss dry sarcasm without context.
2.  **Domain words.** “Sick”, “insane”, “killer feature” and “this slaps” are praise. In a developer community “it just works” is the highest compliment and “deprecated” is bad news. In finance, “short” and “bearish” carry sentiment a general model does not know.
3.  **Mixed posts.** “The API is great, the docs are a disaster.” A document-level label has to pick one. Amazon Comprehend has a MIXED label for this. Google returns a score near zero with a high magnitude: its docs say [mixed documents show higher magnitude values](https://docs.cloud.google.com/natural-language/docs/basics), so a score of 0.0 alone cannot tell neutral from mixed.
4.  **Wrong target.** “Switched from Acme to us because Acme kept breaking” is negative for Acme and positive for you. A post-level label gives both brands the same score. This is the error that ruins brand sentiment analysis and competitor comparisons.
5.  **Reported outcomes with no harsh words.** “Tried Acme for a week, our traffic dropped 30%” contains no negative word and is clearly negative about Acme. Keyword and lexicon methods miss it entirely.

The fix for the last two is the same: ask the model about the tone toward a named target, and define what counts. That is the main reason to prefer an LLM, or a tool built on one, over a document-level score.

![](https://i.ytimg.com/vi/5HQCNAsSO-s/hq720.jpg)[](https://www.youtube.com/watch?v=5HQCNAsSO-s)

IBM Technology's primer on how sentiment analysis works and where it struggles, a good watch before you pick a method. [Watch on YouTube](https://www.youtube.com/watch?v=5HQCNAsSO-s)

## How do you do sentiment analysis on social media with an LLM?

Give the model the post, the target, and labels with definitions, and ask for JSON you can validate. Here is a prompt that handles the target problem, the domain-word problem and the reported-outcome problem, in about 200 tokens:

```
You label social media posts for a company.
Target: "{keyword}" ({one line on what the company is}).

Answer about the target ONLY, never the mood of the post.
- positive: the author speaks well of the target, recommends it, or
  reports a good result from using it. Slang counts: "sick", "slaps",
  "insane" about the target are praise.
- negative: the author speaks badly of the target, reports a bad result
  after using it (it broke, cost too much, results dropped), prefers
  another tool over it, or reports a bug in it.
- neutral: no tone toward the target, or the target is only named.
  A post angry at something else that names the target is neutral.
- relevant: false if the post uses the word for something else
  (same word, different thing).

Return JSON matching the schema. Keep "reason" under 20 words.
```

And the schema to enforce. Most model APIs can hold the answer to a JSON schema; where they cannot, validate it yourself and retry once:

```
{
  "type": "object",
  "properties": {
    "relevant":   { "type": "boolean" },
    "sentiment":  { "type": "string", "enum": ["positive", "neutral", "negative"] },
    "mixed":      { "type": "boolean" },
    "sarcastic":  { "type": "boolean" },
    "intents":    { "type": "array", "items": { "type": "string",
                    "enum": ["buy_intent", "question", "complaint", "praise",
                             "comparison", "churn_intent", "bug_report"] } },
    "reason":     { "type": "string" }
  },
  "required": ["relevant", "sentiment", "mixed", "sarcastic", "intents", "reason"]
}
```

What this costs: the prompt plus a typical post is about 400 input tokens, and the answer about 80 output tokens. On [Claude Haiku 4.5](https://platform.claude.com/docs/en/about-claude/pricing) ($1 per million input tokens, $5 per million output) that is $0.0008 a post, $0.80 per 1,000, and half that through the Batch API. Claude Haiku 5.5 lists at $0.10 and $0.50 per million, about $0.08 per 1,000 posts. Count your own tokens before you budget: post length and the size of the prompt move the number more than the model does.

Three habits make the DIY route hold up. Put the prompt in version control and re-run your 100-post test set (next section) on every change. Store the model’s reason next to the label, so a person can audit a strange call in seconds. And add an “uncertain” path: if your API returns token probabilities, or if two cheap calls disagree, flag the post for a human instead of forcing a label.

![](https://i.ytimg.com/vi/N6TUE4vRAXY/hq720.jpg)[](https://www.youtube.com/watch?v=N6TUE4vRAXY)

A step-by-step Python walk-through of labelling text sentiment with an LLM, the DIY route from the section above. [Watch on YouTube](https://www.youtube.com/watch?v=N6TUE4vRAXY)

## What does a cloud sentiment analysis API give you?

The three cloud APIs are the low-effort route: one HTTP call, a label and a score, no prompt to maintain. What they give you, checked on their docs on November 22, 2026:

-   **Amazon Comprehend** `DetectSentiment` returns one of [POSITIVE, NEGATIVE, NEUTRAL or MIXED](https://docs.aws.amazon.com/comprehend/latest/dg/how-sentiment.html) and a likelihood for each. Billing is in units of 100 characters with a 3-unit minimum per request, so a tweet costs the same as a 300-character post: $0.0003. Targeted sentiment (per entity) costs the same per unit.
-   **Google Cloud Natural Language** returns a score from -1.0 to 1.0 and a magnitude from 0 up. Billing is per 1,000-character unit, so every short post is one unit: $1.00 per 1,000 after 5,000 free a month, falling to $0.50 past 1M and $0.25 past 5M. Entity sentiment, which scores each named thing in the text, is $2.00 per 1,000 units.
-   **Azure AI Language** returns positive, neutral or negative for the document and each sentence, with confidence scores, and opinion mining links sentiment to aspects (“battery” negative, “screen” positive). A text record is 1,000 characters; the standard rate is $1.00 per 1,000 records up to 500,000, then $0.75, $0.30 and $0.25. The free tier is 5,000 records a month.

The catch is the same for all three: you cannot tell them what your brand is, what your domain words mean, or which posts are about a different “Mercury”. Entity and targeted sentiment help with the wrong-target problem, but only for entities the model recognises, and a new product name usually is not one. They are a fine baseline for a test set, and a fine choice for high volumes of plain-language text such as reviews.

## How do you measure sentiment accuracy yourself?

Do not trust an accuracy figure from any vendor’s page, including ours: it was measured on someone else’s posts with someone else’s label definitions. Measure on yours. It takes an afternoon:

1.  **Sample 100 posts** that mention your keyword, spread over a few weeks and platforms. Random, not hand-picked.
2.  **Write the label rules down first** (the prompt above is a good start), then label every post yourself. If you can, have a colleague label the same 100 blind and count where you disagree. Human agreement on social sentiment is far from perfect, and the posts you two argue about are the ones no model will get right.
3.  **Run the model** on the same 100 posts.
4.  **Build the confusion matrix** and read it row by row:

```
from sklearn.metrics import classification_report, confusion_matrix

labels = ["negative", "neutral", "positive"]
human = [...]   # your 100 labels
model = [...]   # the model's 100 labels

print(confusion_matrix(human, model, labels=labels))
print(classification_report(human, model, labels=labels, zero_division=0))
```

Rows are what you said, columns what the model said. The cell that matters most is negative-called-neutral: those are complaints you would never see. A model with high overall accuracy can still miss half your negatives, because most social posts are neutral and getting those right inflates the headline number. Read per-class recall for negative in the report, not accuracy.

5.  **Keep the 100 posts.** They are your regression test. Every prompt change, model switch or vendor change runs against them before it goes live.

## Why must relevance come before sentiment?

Because noise is mostly neutral, and neutral posts dilute the share you are watching. Track “Mercury” and you get the planet, the element, the car and Freddie. Track “Notion” and you get every post using the word “notion”. Score those for sentiment and they land as neutral, so a real rise in complaints from 10% to 20% of your relevant posts shows up as 4% to 6% of all matches, inside the noise.

The order that works:

1.  **Match tightly.** Quote phrases, add required words and excluded words per keyword.
2.  **Score relevance.** Is this post about the thing I track, or the same word meaning something else? Drop or hide what fails.
3.  **Score sentiment on what is left**, toward the target.

How much difference it makes depends on your keyword. Across Mentio’s production matches in the two weeks to October 2, 2026, 8.3% of relevant matches were negative (the baseline its negative-spike alert is tuned on). A keyword that is half noise would show about 4% instead, and a spike would have to be twice as large to be seen. The [difference between listening and monitoring](/blog/social-listening-vs-social-monitoring/) is largely this step.

A quick relevance check

Before you trust any sentiment chart, open 20 random posts behind it. If more than a handful are not about you, fix the keyword before you fix the model.

## How should you report brand sentiment?

An average sentiment score of “+0.31” tells nobody what to do. Report things a person can act on:

-   **Share of negative among relevant posts**, per week, per platform. It is stable enough to compare and moves when something happens.
-   **Negative spikes against the keyword’s own baseline.** A 25% negative week is a crisis for one brand and a normal Tuesday for another. Compare a day to the week before it, not to an industry figure.
-   **Counts behind every share.** “40% negative” from 5 posts is noise. Set a minimum (for example, 10 relevant posts) before a share is shown or alerted on.
-   **Intents next to sentiment.** A negative post with `churn_intent` or `bug_report` needs a person today; a negative post that is a general gripe about the industry can wait for the weekly read.
-   **The posts themselves.** Link every number to the posts behind it. Sentiment is a way to sort posts for reading, not a replacement for reading them.

## How does Mentio score sentiment?

Mentio is the paid developer option here, and the one I built, so read this section with that in mind. It does all of the above on every match, so you do not maintain the prompt, the test set or the pipeline:

-   **Every match gets a verdict**: relevance from 0 to 100 (40 is the line for relevant), sentiment (positive, neutral, negative) toward the keyword itself, the author’s dominant emotion (joy, trust, frustration, anger, confusion and five more), and intent and topic tags: `buy_intent`, `question`, `complaint`, `praise`, `comparison`, `churn_intent`, `bug_report`, `pricing`, `testimonial`, `feedback` and others.
-   **The judge is told who you are.** Each keyword carries its kind (brand, competitor, topic) and your company description, and the sentiment question is asked about the keyword only: a post angry at another tool that names yours is neutral for you.
-   **Calibrated confidence.** The judge is TypeSafe’s Jev, which answers with probabilities. Relevance is the probability-weighted band, and the verdict carries a `confidence` from 0 to 1. A second model writes the one-line note and says whether it agrees; when confidence is under 0.4 or the note’s model disagrees, the mention is flagged `uncertain` for a human look. If Jev is unavailable, a Workers AI model judges instead, so an outage changes the judge, never drops a mention.
-   **Corrections stick to the record.** Mark a mention relevant or not, or fix its sentiment, with `PATCH /v1/mentions/{id}`; the original verdict is kept next to yours, and the keyword’s stats count your corrections.
-   **Negative spikes open by themselves.** A `sentiment.negative_spike` attention item opens when a keyword has at least 5 negative of at least 10 relevant mentions in 24 hours, a negative share of at least 20%, and at least 2.5 times its own smoothed share of the 7 days before. It goes to the dashboard and, if you want, to Slack, email, Telegram or a webhook.
-   **Alert rules filter on the verdict.** Send only `sentiments=negative` with `minConfidence=0.6` to a support channel, or only `buy_intent` to sales.

Reading it from the [REST API](/api/) is one call:

```
curl -G https://api.mentio.dev/v1/mentions \
  -H "Authorization: Bearer $MENTIO_API_KEY" \
  --data-urlencode "sentiments=negative" \
  --data-urlencode "minRelevance=40" \
  --data-urlencode "range=7d"

# Share of each sentiment over 30 days
curl -G https://api.mentio.dev/v1/analytics/breakdown \
  -H "Authorization: Bearer $MENTIO_API_KEY" \
  --data-urlencode "by=sentiment" \
  --data-urlencode "range=30d"
```

To check sentiment for a term you do not track yet, `POST /v1/searches` reads it over a window from the last 24 hours to the last year, up to 25 results a platform, each one scored, at $0.008 per scored result, once the workspace has topped up.

Get scored mentions in your agent

Track a keyword across 19 platforms and read every match with relevance, sentiment, emotion and intents. $5.80 of credit to start, no card.

claude mcp add --transport http mentio https://mcp.mentio.dev/mcp

[Start free](https://app.mentio.dev/login?mode=signup&utm_source=blog&utm_medium=post&utm_campaign=social-media-sentiment-analysis)[Read the docs](https://docs.mentio.dev/mcp)

## What does sentiment analysis cost, and what is the free way?

The free way is real. If you have a few hundred posts a month, the cloud free tiers cover them: 5,000 posts a month on Google or Azure, about 16,000 short posts a month on Amazon for the first year. Open-source models such as VADER or a Hugging Face sentiment model cost nothing to run on a laptop, at the price of the failure modes above. Collect the posts with free tools from the [free social listening roundup](/blog/best-free-social-listening-tools/) and label them with a spreadsheet and an LLM.

The paid ways split by what you already have:

-   **You have the posts and an engineer.** An LLM with the prompt above and a 100-post test set. Under a dollar per 1,000 posts, plus the time to keep it honest.
-   **You have the posts and want no prompts.** A cloud API: $0.30 to $1.00 per 1,000 short posts, with no idea what your brand is.
-   **You need the posts found, judged and delivered.** A listening tool. On Mentio that is [$5 per keyword per month and $0.008 per matched mention](/pricing/), from a prepaid balance with no plan; the [best social listening APIs](/blog/best-social-listening-apis/) compares the others.

## What should you check before you trust a sentiment number?

-   Is the label about the target, or about the post?
-   Were off-topic posts removed before the share was computed?
-   Has the model been checked against 100 of your own posts, and what is its recall on negatives?
-   How many posts sit behind the number?
-   Can you click through from the number to the posts?

If any answer is no, the chart is a mood ring. Fix that step first.

Prices for Google Cloud Natural Language, Amazon Comprehend, Azure AI Language and Claude are from each vendor’s pricing page on November 22, 2026 (Amazon’s and Claude’s rechecked on November 23). They change; check before you commit.

## Frequently asked questions

What is the best sentiment analysis tool?

It depends on whether you already have the posts. If you do, an LLM with a target-aware prompt is the most flexible and costs under a dollar per 1,000 short posts on a small model; Google Cloud Natural Language, Amazon Comprehend and Azure AI Language cost $0.30 to $1.00 per 1,000 short posts. If you also need the posts found, a listening tool with built-in sentiment does both.

Is there a free sentiment analysis API?

Free tiers, yes. Google Cloud Natural Language gives 5,000 units a month free, Azure AI Language 5,000 text records a month, and Amazon Comprehend 50,000 units a month for the first 12 months. Open-source models such as VADER or a Hugging Face sentiment model run free on your own machine.

What is brand sentiment analysis?

Brand sentiment analysis is sentiment analysis restricted to posts about your brand, scored for the author's tone toward the brand itself. A post that rants about another tool and names yours in passing is neutral for your brand, even though the post is angry.

Where this applies

-   [Mentio APIEvery mention with relevance, sentiment, emotion and intents as JSON.](/api/)
-   [Pricing$5 per keyword per month, $0.008 per matched mention, scoring included.](/pricing/)
-   [Social listening vs social monitoringWhere sentiment fits between the two jobs.](/blog/social-listening-vs-social-monitoring/)
-   [Best social listening APIsThe APIs that collect the posts you want to score.](/blog/best-social-listening-apis/)

Written by Pau Guirao, founder of Mentio. Prices and product facts were checked on November 23, 2026; if one has changed, [tell us](/contact/) and we will fix it.

## Related posts

[![](/blog/competitor-monitoring/cover.png)](/blog/competitor-monitoring/)

Nov 22, 2026

## [Competitor monitoring: a weekly routine that costs little](/blog/competitor-monitoring/)

How to monitor competitors without an analyst: the eight signals worth watching, the free tools that catch each one, what a "switching from" mention looks like, and how to measure share of voice with a worked example.

-   [Playbooks](/blog/tag/playbooks/)
-   [Competitors](/blog/tag/competitors/)
-   [Share of voice](/blog/tag/share-of-voice/)

[![](/blog/google-reviews-api/cover.png)](/blog/google-reviews-api/)

Nov 22, 2026

## [Google Reviews API: what each Google API returns](/blog/google-reviews-api/)

The two official ways to get Google reviews by API (the Business Profile API for your own listings and Place Details in the Places API for any place, capped at five reviews), what each costs, the display and caching rules, a curl example, and how to watch every new review of any place.

-   [Platforms](/blog/tag/platforms/)
-   [Google reviews](/blog/tag/google-reviews/)
-   [APIs](/blog/tag/apis/)

[![](/blog/hacker-news-api/cover.png)](/blog/hacker-news-api/)

Nov 22, 2026

## [Hacker News API: endpoints, search and limits](/blog/hacker-news-api/)

The two Hacker News APIs explained: the official Firebase API for items, users and story lists, and the Algolia search API for keywords and dates. Endpoints, curl examples, rate limits, and how to watch Hacker News for a keyword.

-   [Platforms](/blog/tag/platforms/)
-   [Hacker News](/blog/tag/hacker-news/)
-   [APIs](/blog/tag/apis/)

## Start monitoring brand mentions

One request tracks your first keyword. The first scored mention lands within minutes, in Slack, a webhook, or your agent.

[Get your API key ›](https://app.mentio.dev/login?mode=signup)[Read the docs ›](https://docs.mentio.dev)

$5.80 free credit · no card · no subscription
