--- title: "Sentiment Analysis" url: https://docs.catalyst.zoho.com/en/api/code-reference/zia-services/text-analytics/sentiment-analysis/ description: "This API enables you to perform Sentiment Analysis on a block of text, and recognize the tone of the message and the sentiments in the text." last_updated: 2026-08-17T12:16:04Z service: Zia Services type: api --- # Sentiment Analysis [Zia Sentiment Analysis](https://docs.catalyst.zoho.com/en/zia-services/help/text-analytics/introduction/) is a part of Text Analytics that processes textual content to recognize the tone of the message, and the sentiments conveyed through it. It analyses each sentence in the text to determine if its tone is Positive, Negative, or Neutral. It then determines the tone of the overall text as one of the these three sentiments, based on the sentiments recognized in each sentence. The response also returns the confidence scores for each sentence and the overall text, to showcase the accuracy of the analysis. # Execute Sentiment Analysis ### Description You can use this API to perform Sentiment Analysis on a block of text of upto 1500 characters in a single request. You must pass the text in the JSON body of the request, as shown in the sample request. You can also pass optional keywords for the text. This will enable Sentiment Analysis to process only those sentences that contain these keywords, and determine their sentiments. Other sentences will be ignored. ### Request Details #### Request URL `POST` {api-domain}/baas/v1/project/{project_id}/ml/text-analytics/sentiment-analysis - **api-domain** (URL): The DC-specific domain to access Catalyst API - **project_id** (Numerical): The [unique ID](https://docs.catalyst.zoho.com/en/getting-started/set-up-a-catalyst-project/general-settings/) of the project #### Request Headers **Authorization:** Zoho-oauthtoken {oauth_token} **content-type:** application/json **Optional Headers** **CATALYST-ORG:** {org_id} **Environment:** Development #### Scope ZohoCatalyst.mlkit.READ #### Request JSON Properties - **document** (string array, mandatory): The text to be processed for Sentiment Analysis - **keywords** (string array, optional): To perform Sentiment Analysis only on the sentences containing these keywords ### Response Details The response contains the result of individual sentence analysis and the overall text analysis as `Positive`, `Negative`, or `Neutral`, along with the overall confidence score of each analysis. The confidence score lies in the range of 0 to 1. **Sample Request** ```bash curl -X POST \ https://api.catalyst.zoho.com/baas/v1/project/4000000006007/ml/text-analytics/sentiment-analysis -H "Authorization: Zoho-oauthtoken 1000.910*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*16.2f*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*57" \ -H "Content-Type: application/json" \ -d '{"document":"[I love the design of the new model.]", "keywords":"[design]" }' ``` **Sample Response** ```json { "status":"success", "data":[ { "sentiment_prediction":[ { "document_sentiment":"Positive", "sentence_analytics":[ { "sentence":"I love the design of the new model", "sentiment":"Positive", "confidence_scores":{ "negative":0.0, "neutral":0.0, "positive":1.0 } } ], "keyword":"design", "overall_score":1.0 } ] } ] } ``` ### SDK Documentation [Text Analytics: Sentiment Analysis- Java SDK](https://docs.catalyst.zoho.com/en/sdk/java/v1/zia-services/text-analytics/sentiment-analysis) [Text Analytics: Sentiment Analysis- Node.js SDK](https://docs.catalyst.zoho.com/en/sdk/nodejs/v2/zia-services/text-analytics/sentiment-analysis) [Text Analytics: Sentiment Analysis- Python SDK](https://docs.catalyst.zoho.com/en/sdk/python/v1/zia-services/text-analytics/sentiment-analysis)