The Text Sentiment Analysis API is an advanced text analysis solution that allows you to identify the emotional tone of any written content. This tool processes a text input and returns a detailed analysis that includes the overall sentiment classification (positive, negative, or neutral), along with a confidence score and a percentage breakdown of each category.
The API response includes a sentiment field that indicates the dominant sentiment, as well as a score and confidence level that reflect how clear the emotional trend of the text is. In addition, the breakdown section breaks down the percentages of positivity, negativity, and neutrality, allowing you to understand the emotional nuances even in mixed or ambiguous texts.
Another notable feature is the extraction of emotional keywords, identified as responsible for the detected tone, which is useful for optimizing content, adjusting advertising campaigns, or tracking online reputation. The analysis also includes a component of basic emotions (joy, sadness, fear, surprise, disgust, and anger), ideal for computational psychology tasks, customer monitoring, or real-time conversation analysis.
In addition, the subjectivity of the text is calculated, indicating whether it is an opinion or an objective statement. This is useful in contexts such as media analysis, product evaluations, or open survey analysis.
With a fast and accurate response (low processingTime), this API is designed to be easily integrated into customer service, marketing, human resources, social platforms, virtual assistants, and much more. Its flexible design and multi-language support allow it to be implemented in both web and mobile applications.
In summary, the Text Sentiment Analysis API offers deep insight into the emotional content of language, helping businesses and developers better understand human interactions, improve the user experience, and make decisions based on accurate emotional data.
{"success":true,"data":{"sentiment":"neutral","confidence":0.01,"score":0,"breakdown":{"positive":0,"negative":0,"neutral":1},"wordCount":2,"sentimentWords":{"positive":[],"negative":[]},"emotions":{"joy":0,"anger":0,"fear":0,"sadness":0,"surprise":0,"disgust":0},"subjectivity":0},"timestamp":"2025-07-28T16:55:29.762Z","processingTime":4}
curl --location --request POST 'https://zylalabs.com/api/9160/text+sentiment+analysis+api/16569/sentiment+analyzer' --header 'Authorization: Bearer YOUR_API_KEY'
--data-raw '{
"text": "Hello world",
"language": "en"
}'
| Header | Description |
|---|---|
Authorization
|
[Required] Should be Bearer access_key. See "Your API Access Key" above when you are subscribed. |
No long-term commitment. Upgrade, downgrade, or cancel anytime. Free Trial includes up to 50 requests.
The Sentiment Analyzer endpoint returns a detailed analysis of the input text, including overall sentiment classification (positive, negative, neutral), a confidence score, a percentage breakdown of sentiment categories, emotional keywords, basic emotions, and subjectivity.
Key fields in the response include "sentiment" (dominant sentiment), "confidence" (certainty of the classification), "breakdown" (percentage of positivity, negativity, neutrality), "keywords" (emotional keywords), "emotions" (basic emotions detected), and "subjectivity" (opinion vs. objective).
The response data is structured in a JSON format, with top-level fields for sentiment analysis results. Each field provides specific insights, such as sentiment classification, confidence levels, and detailed breakdowns, making it easy to parse and utilize programmatically.
The primary parameter for the Sentiment Analyzer endpoint is "text," which requires the input string to be analyzed. Users can customize their requests by providing different text inputs to receive tailored sentiment analysis results.
Typical use cases include monitoring customer feedback, optimizing marketing content, analyzing social media interactions, conducting sentiment analysis in surveys, and enhancing user experience in chatbots or virtual assistants.
Data accuracy is maintained through advanced natural language processing algorithms that continuously learn from diverse text samples. Regular updates and quality checks ensure the model adapts to language nuances and evolving sentiment expressions.
Users can leverage the returned data to identify trends in customer sentiment, tailor marketing strategies based on emotional insights, and enhance product development by understanding user opinions and emotions reflected in the text.
If the input text is too short or ambiguous, the API may return lower confidence scores or incomplete analyses. Users should ensure the text is sufficiently descriptive and consider implementing fallback mechanisms for handling such cases.
To obtain your API key, first sign in to your account and navigate to the API you want to use. From the API's Pricing section, choose a plan and complete the subscription process. Once subscribed, return to the API page and you will see your API Access Key displayed at the top of the documentation page. You can use this key to authenticate your requests.
You can’t switch APIs during the free trial. If you subscribe to a different API, your trial will end and the new subscription will start as a paid plan.
The free trial lasts for 7 days and allows you to make up to 50 API requests.
No, the free trial is available only once, so we recommend using it on the API that interests you the most. Most of our APIs offer a free trial, but some may not include this option.
Yes. If the API offers a free trial, you will see a "Free 7-Day Trial" option in its Pricing section. The trial lasts for 7 days and allows up to 50 API requests, enabling you to evaluate the API before subscribing to a paid plan.
Zyla API Hub is like a big store for APIs, where you can find thousands of them all in one place. We also offer dedicated support and real-time monitoring of all APIs. Once you sign up, you can pick and choose which APIs you want to use. Just remember, each API needs its own subscription. But if you subscribe to multiple ones, you'll use the same key for all of them, making things easier for you.
You can monitor your API usage through the response headers included with every request:
x-zyla-api-calls-monthly-used: Shows the total number of API requests you have used during the current billing period.
x-zyla-api-calls-monthly-remaining: Shows the number of API requests you have remaining for the current billing period.
Yes, you can cancel your subscription at any time. Simply go to the Pricing section of the API you're subscribed to and click the "Unsubscribe" button.
Please note that upgrades, downgrades, and cancellations take effect immediately. Once your subscription is canceled, access to the service will end immediately, regardless of any remaining API calls in your quota.
Please have a look at our Refund Policy: https://zylalabs.com/terms#refund
Service Level:
100%
Response Time:
379ms
Service Level:
100%
Response Time:
822ms
Service Level:
100%
Response Time:
20ms
Service Level:
100%
Response Time:
16ms
Service Level:
100%
Response Time:
295ms
Service Level:
100%
Response Time:
474ms
Service Level:
100%
Response Time:
302ms
Service Level:
100%
Response Time:
2,373ms
Service Level:
100%
Response Time:
19ms
Service Level:
100%
Response Time:
2,818ms
Service Level:
100%
Response Time:
183ms
Service Level:
100%
Response Time:
93ms
Service Level:
100%
Response Time:
213ms
Service Level:
100%
Response Time:
881ms
Service Level:
100%
Response Time:
85ms
Service Level:
100%
Response Time:
104ms
Service Level:
100%
Response Time:
255ms
Service Level:
100%
Response Time:
105ms
Service Level:
100%
Response Time:
1,865ms
Service Level:
100%
Response Time:
167ms