apyhub
Cover illustration for Best Sentiment Analysis APIs for Customer Feedback in 2026
Engineering

Best Sentiment Analysis APIs for Customer Feedback in 2026

Best sentiment analysis APIs for customer feedback in 2026

Updated September 2026

01Introduction

A sentiment analysis API reads a piece of text, such as a review, a support ticket or a survey answer, and returns a label (positive, negative or neutral) with a confidence score. You send text in a request and get structured data back, so you can sort, count and alert on customer feedback in code.

Reviews shape buying decisions. BrightLocal's 2026 Local Consumer Review Survey found that 97% of consumers read reviews for local businesses, and 77% say negative reviews make them less likely to choose a business (BrightLocal, February 2026). Reading every review by hand stops working once the volume grows.

This guide covers five sentiment analysis APIs in the ApyHub catalog, plus one bonus API for moderation. We follow one example through all of them: Luigi, who runs a pizzeria, added a Hawaiian pizza to the menu and now has hundreds of mixed reviews across Google, delivery apps, his online shop and travel sites.

02What's new in the 2026 update

  • Live test results for two of the APIs, with the real JSON responses.
  • Three more APIs: batch classification, entity-level sentiment and toxicity detection.
  • A comparison table with output format, labels and cost per call.
  • Notes on where each API needs care, such as mixed reviews and sarcasm.
  • Access for AI agents through ApyHub MCP.

03What is customer sentiment analysis?

Customer sentiment analysis is the process of classifying what customers write about a business as positive, negative or neutral, usually with software. The input is any free text customers produce: reviews, support tickets, chat logs, survey responses, social posts. The output is a label and a score per piece of text, and sometimes per sentence or per topic.

04How sentiment analysis improves customer experience

Sentiment analysis turns a pile of feedback into numbers you can act on. With the right API you can:

  • Catch problems early by alerting on a spike in negative reviews after a menu, product or release change.
  • Prioritize support by routing negative tickets to a senior agent first.
  • Find the cause by scoring each sentence or topic, so a complaint about delivery is separated from praise for the food.
  • Track trends by charting the share of positive feedback week over week.
  • Respond faster. BrightLocal found 81% of consumers expect a reply to their review within a week.

05Sentiment analysis APIs compared

APIOutputLabelsSync or asyncCost per callBest for
AI Text Sentiment Analysis APIOverall and per-sentence scoresPositive, neutral, negativeSync500 atomsLong or mixed feedback
Analyze Multiple Text Sentiment APILabel and score per text, in batchesPositive, negativeSync10 atomsHigh-volume short texts
Generate Product Review Sentiment APIOpinion and scorePositive, negative, neutralAsync job50 atomsE-commerce reviews
Generate Travel Review Sentiment APIOpinion and score (0 to 100)Positive, negative, neutralAsync job50 atomsHotel, restaurant and travel reviews
AI Text Entity Sentiment Analysis APISentiment per entity mentionedScore per entitySync500 atomsFinding what customers like or dislike
Bonus: Detect Text Toxicity APIToxic flag and scoreToxic, non-toxicSync10 atomsModerating reviews before display

Atoms are ApyHub's unit of usage. Each call's cost reflects the compute behind it.

061. AI Text Sentiment Analysis API: sentence-level sentiment for mixed feedback

The AI Text Sentiment Analysis API scores a piece of text as a whole and sentence by sentence. It is the best fit for longer feedback, where one review can praise one thing and criticize another.

Key features

  • Per-sentence breakdown with positive, neutral and negative confidence scores for each sentence.
  • Three labels, including neutral, which binary classifiers leave out.
  • Choice of engine: set requested_service to apyhub (default), azure or google.

Benefits

  • Finds complaints hidden inside mostly positive reviews.
  • Gives support and product teams the exact sentence to act on.

How it works

Send text and an optional language code. The response includes an overall label, overall confidence scores and a sentences array with the offset, length, label and scores of each sentence. This is the real response for one of Luigi's reviews:

bash

· bash
curl -X POST "https://api.eu.apyhub.com/apyhub/analyze-text-sentiment" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"text":"The Hawaiian pizza was a bold idea, but the pineapple made the crust soggy. The staff were lovely though.","language":"en","requested_service":"apyhub"}'

json

· json
{
  "data": {
    "apyhub": {
      "sentiment": "positive",
      "confidenceScores": { "negative": 0.01, "neutral": 0.09, "positive": 0.91 },
      "sentences": [
        {
          "text": "The Hawaiian pizza was a bold idea, but the pineapple made the crust soggy. ",
          "sentiment": "neutral",
          "confidenceScores": { "negative": 0.23, "neutral": 0.73, "positive": 0.04 },
          "offset": 0,
          "length": 76
        },
        {
          "text": "The staff were lovely though.",
          "sentiment": "positive",
          "confidenceScores": { "negative": 0.01, "neutral": 0.09, "positive": 0.91 },
          "offset": 76,
          "length": 29
        }
      ]
    }
  }
}

Good to know: the overall label for this review is positive, driven by the final sentence. The complaint about the soggy crust sits in the first sentence, labeled neutral with a 0.23 negative score. For mixed reviews, read the sentences array instead of relying on the overall label alone.

Use case

Luigi runs every Google review through the API each night and flags any sentence with a negative score above 0.2. In the first month, 38 of the flagged sentences mention "soggy" or "crust". He bakes the Hawaiian pizza two minutes longer, and the flagged crust complaints fall to 6 the next month.

Try the AI Text Sentiment Analysis API

072. Analyze Multiple Text Sentiment API: fast batch sentiment scoring

The Analyze Multiple Text Sentiment API classifies many short texts in one request and returns a label and a confidence score for each. At 10 atoms per call, it is the low-cost option for high volumes of short feedback.

Key features

  • Batch endpoint: send an array of texts, get an array of results in the same order.
  • Single-text endpoint for one input of up to 512 characters.
  • Confidence score from 0 to 1 for every result.

Benefits

  • Scores thousands of short reviews, chat messages or survey answers at low cost.
  • Easy to aggregate into a daily positive-versus-negative ratio.

How it works

Send a texts array to the batch endpoint. We sent four of Luigi's delivery-app reviews and got this real response:

json

· json
{
  "results": [
    { "label": "positive", "score": 0.9998 },
    { "label": "negative", "score": 0.9988 },
    { "label": "positive", "score": 0.8622 },
    { "label": "positive", "score": 0.9983 }
  ]
}

The inputs, in order: "Best margherita in town. The crust is perfect.", "Waited 50 minutes and the pizza arrived cold.", the mixed Hawaiian review from entry 1, and "Oh great, another pizza with fruit on it. Just what Italy needed."

Good to know: the model returns only positive or negative. The mixed review came back positive with a lower score (0.86), and the sarcastic fourth review came back positive at 0.998. Use this API for volume and trends, and send low-confidence or high-stakes texts to the sentence-level API in entry 1.

Use case

Luigi's delivery apps produce around 400 short reviews a week. He scores all of them in batches every morning and tracks the share of negative reviews on a dashboard. When it rises from 12% to 21% over one weekend, he traces it to a new delivery partner and switches back within the week.

083. Generate Product Review Sentiment API: e-commerce review scoring

The Generate Product Review Sentiment API, built by SharpAPI, classifies product reviews as positive, negative or neutral and adds a score. It is designed for e-commerce reviews, where customers comment on the product, the delivery and the packaging in one text.

Key features

  • Three opinions: POSITIVE, NEGATIVE or NEUTRAL, per SharpAPI's documentation.
  • Score with each opinion.
  • Async job flow, which suits background processing of review imports.

Benefits

  • Surfaces the products that collect the most negative reviews.
  • Feeds review scores into product pages, search ranking or restock decisions.

How it works

Submit a review in the content field and receive a job_id. Poll the status endpoint until status is success, then read opinion and score from result. Each status check costs 1 atom.

Use case

Luigi sells frozen pizzas in his online shop. He scores every new product review and hides products from the homepage when more than 30% of their reviews in the last 30 days are negative. The frozen Hawaiian drops off the homepage in week two, and his average product rating rises from 4.1 to 4.4 stars over the quarter.

094. Generate Travel Review Sentiment API: hospitality and travel reviews

The Generate Travel Review Sentiment API, also built by SharpAPI, scores reviews from travel and hospitality: hotels, restaurants, tours and airlines. It returns an opinion and a score from 0 to 100.

Key features

  • Opinion label with a 0 to 100 score.
  • Built for travel language, such as wait times, location, staff and value.
  • Async job flow with a simple status check.

Benefits

  • Tracks reputation on travel and review sites where tourists post.
  • Separates one-off complaints from patterns across a season.

How it works

Submit review text in content, receive a job_id, and poll the status endpoint. A finished job returns status: "success" and a result object with score and opinion.

Use case

Half of Luigi's summer customers are tourists who review on travel sites. He scores those reviews separately from local ones and finds that tourist reviews are 18 points more positive on average, with most negatives mentioning the wait for a table. He adds an online waitlist, and wait-related complaints halve by August.

105. AI Text Entity Sentiment Analysis API: sentiment per topic

The AI Text Entity Sentiment Analysis API finds the entities mentioned in a text, such as "pizza", "crust", "staff" or "delivery", and scores the sentiment toward each one. It runs on Google's natural language service.

Key features

  • Entity detection for people, products, places and other nouns in the text.
  • Sentiment per entity, so one review yields several scores.
  • Language option through the language field.

Benefits

  • Answers "what do customers dislike" as well as "how many are unhappy".
  • Builds a ranked list of the topics driving negative feedback.

How it works

Send text with requested_service set to google. The response returns Google's entity sentiment result under data.google.

Use case

Luigi runs a month of reviews through the API and groups scores by entity. "Staff" and "margherita" score positive in over 90% of mentions. "Pineapple" and "crust" carry most of the negative scores, which confirms the fix from entry 1 was aimed at the right problem.

11Bonus: Detect Text Toxicity API for review moderation

The Detect Text Toxicity API checks whether a text is toxic or harmful and returns a toxic boolean with a score. Sentiment and toxicity are different signals: a negative review can be fair, and a toxic one can be abusive regardless of its sentiment.

Key features

  • Toxic flag plus a label and confidence score.
  • Up to 512 characters per text.
  • 10 atoms per call.

Benefits

  • Keeps abusive reviews off public pages before a person sees them.
  • Leaves fair negative reviews visible, which protects trust.

Use case

Luigi shows recent reviews on his website. He checks each one for toxicity before display, and the 3% flagged as toxic go to a moderation queue instead of the homepage.

12Choosing the best sentiment analysis API for your needs

All of these run on one ApyHub subscription, alongside over 1,500 endpoints or capabilities in the catalog, and the catalog keeps growing.

Test every sentiment API in Voiden

13Use sentiment analysis APIs from AI agents

Every endpoint in this guide is available through ApyHub MCP. An AI agent can discover the sentiment APIs, read their schemas and call them directly, with no hand-written wrapper or tool definition. A support agent can score a ticket's sentiment before drafting a reply, and a reporting agent can summarize a week of reviews with the numbers attached.

Connect ApyHub MCP to your agent

14Conclusion

Luigi's reviews told him the same story five ways: customers loved the staff and the margherita, and the Hawaiian pizza's crust needed work. Sentence-level scores found the complaint, batch scoring tracked the trend, product and travel review scoring covered his other channels, and entity sentiment confirmed the cause. Start with the API that matches your feedback source, and add the others as your questions get more specific.

Start free on ApyHub

15Frequently asked questions

What is a sentiment analysis API?

A sentiment analysis API is a web service that takes text and returns its sentiment, usually a label (positive, negative or neutral) and a confidence score. You call it over HTTP, so you can score feedback inside your own app, CRM or data pipeline.

What is the best sentiment analysis API?

It depends on your feedback. For long or mixed reviews, the AI Text Sentiment Analysis API gives per-sentence scores. For high volumes of short texts, the Analyze Multiple Text Sentiment API costs 10 atoms per batch call. For product or travel reviews, use the matching SharpAPI review APIs.

How do I do customer sentiment analysis with an API?

Collect your feedback text, send each item to a sentiment API, and store the label and score next to the original record. Then chart the share of negative feedback over time, and set an alert for spikes.

How can sentiment analysis be used to improve customer experience?

It shows you which customers are unhappy and why, early enough to act. Teams use it to route negative tickets first, catch problems after a product change, and track whether fixes reduce complaints.

How do I analyze the sentiment of product reviews?

Send each review to the Generate Product Review Sentiment API, then poll for the result. It returns POSITIVE, NEGATIVE or NEUTRAL with a score, which you can aggregate per product.

Can a sentiment analysis API handle mixed reviews?

Yes, if it scores sentences. In our test, a review with a complaint and a compliment got an overall positive label, while the sentence-level scores showed the complaint. Use the sentences array from the AI Text Sentiment Analysis API for mixed feedback.

Can sentiment analysis detect sarcasm?

Often it cannot. In our test, "Oh great, another pizza with fruit on it. Just what Italy needed." was classified as positive with a 0.998 score. Treat sarcasm as a known limit and review important cases by hand.

How do I find out what customers are unhappy about?

Use entity-level sentiment. The AI Text Entity Sentiment Analysis API scores each topic mentioned in a review, so you can rank topics such as "delivery" or "price" by negative mentions.

How do I test a sentiment analysis API?

You have three options. Use Try it on each API's page in the ApyHub catalog to send sample text from your browser. Use Voiden, the free, open-source API client from the ApyHub team, to save requests for all five APIs as plain Markdown files in your Git repo and compare their responses side by side. Or send the curl request shown in entry 1 from any terminal.

Is there a free sentiment analysis API?

ApyHub's free Starter plan needs no credit card and covers 5 API calls per day, up to 3,000 atoms per month. That is enough to try the APIs in this guide on your own data before you choose one.

Which languages do these APIs support?

The AI Text Sentiment Analysis API and the Entity Sentiment API accept a language field. SharpAPI documents multi-language support for its review APIs. Test with your own data before relying on a language in production.

Can AI agents use these sentiment APIs?

Yes. Every API in this guide is available through ApyHub MCP, so an agent can discover it, read its schema and call it without a custom wrapper.

16About ApyHub

ApyHub is a curated API catalog and trusted operational layer for developers and AI agents. It offers over 1,500 endpoints or capabilities, and the catalog keeps growing. Every API runs on a single subscription billed in atoms, and each API carries machine-readable certification (GDPR, SOC 2, ISO 27001). Every endpoint is MCP-ready by default. ApyHub is headquartered in Amsterdam, with offices in the Netherlands, Greece and India, and serves 65,000+ monthly developer workspaces. The free tier needs no credit card. API providers can list their APIs at apyhub.com/become-a-provider.