Sentiment Analysis

By Twinword API | Updated 10 days ago | Text Analysis

9.6 / 10



Service Level


Health Check


Followers: 1,788
Product Website Terms of use
API Creator:
Rapid account: Twinword API
Twinword API
Log In to Rate API
Rating: 5 - Votes: 1


Sentiment Analysis

Is this comment positive or negative? Find out the tone of a user comment or post.

Sentiment Analysis - Free Tool & API Demo

Interpreting the Score and Ratio of Sentiment Analysis

This is useful if you have a large amount of user responses or reviews and you want to quickly find the negative comments to see what your customers don’t like and vice versa.

However, our API gives you more power than that. Besides just reading the type response (‘negative’, ‘neutral’, or ‘positive’), you can actually determine for yourself what you consider positive or negative. Below we will explain two useful information, score and ratio, that our API returns for each text analyzed.


The score indicates how negative or positive the overall text analyzed is. Anything below a score of -0.05 we tag as negative and anything above 0.05 we tag as positive. Anything in between inclusively, we tag as neutral.

Since we have provided the actual scores we used determine the type, you are free to reject our interpretation and interpret the actual scores yourself and create your own negative and positive minimum scores.


The ratio is the combined total score of negative words compared to the combined total score of positive words, ranging from -1 to 1. Take the below for example.

  • Let’s say we are analyzing words A, B, C and D.

  • Scenario 1) If words A and B are negative words having a combined total score of -5.0 and words C and D are positive words having a combined total score of 5.0, then the ratio would be 0 (or 1:1) as both sides are balanced.

  • Scenario 2) If negative words have a total combined score of -5.0 while positive words have a total combined score of 2.5, then the ratio would be -0.667 (or 2:1).

  • Scenario 3) If negative words total -5.0 and positive words total 0.0, then the ratio would be -1 (or 1:0).

In the end, the score and ratio allows you to go beyond what we think is negative or what we think is positive. In your code, you can consider the impact of the score or the impact of the ratio, or even combine them all to set your own positive and negative thresholds to suit your application.

Maybe your users are generally very negative? You can, for example, instead of using our interpretation that less than -0.05 is negative and more than 0.05 is positive, you can write your own algorithm that says below -0.9 is negative and above -0.8 is positive.

API Limitations

Max input size

  • 14,336 Unicode characters.
  • It includes whitespace characters and any markup characters such as HTML or XML tags.

Rate limitations

  • There is no rate limit except Keyword Suggestion API, which is 2 requests per 10 seconds.
  • If you exceed the rate limit, you will get “Too many requests. Try again in a few seconds.” error messages.

Server capacity

  • Normally our server can handle 6 requests per second. In case of more traffic, our server automatically scales up to more than 300 requests per second.
  • However, the scaling happens periodically. This means, if you send 100 requests per second immediately, many requests will fail. Instead, we recommend to start out at 6 requests per second, and to increase the amount of requests per second every 3 minutes by 6 requests. For example, going from 6 to 12 requests per second after 3 minutes have passed. In this case, you will consume 6 requests per second * 60 seconds * 3 minutes = 1,080 requests.
  • Please keep in mind that in case you stop sending requests, the server will go back to the original capacity of 6 requests per second.

Security and privacy

  • We fully understand the importance of privacy and security. We do not store any content on our server side. We just keep logging transactions. To make sure, we advise you to use POST rather than GET method.
  • We keep PCI compliance annually, which is done by 3rd party security quality accessor.