---
title: "The API returns a numeric score between 0 and 1."
method: POST
path: "/sentiment"
tags: ["Sentiment"]
---

# The API returns a numeric score between 0 and 1.

`POST /sentiment`

Scores close to 1 indicate positive sentiment, while scores close to 0 indicate negative sentiment. A score of 0.5 indicates the lack of sentiment (e.g. a factoid statement). See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview#supported-languages">Text Analytics Documentation</a> for details about the languages that are supported by sentiment analysis.

## Request body

- MultiLanguageBatchInput
  - `documents` MultiLanguageInput[]
    - `language` string — This is the 2 letter ISO 639-1 representation of a language. For example, use "en" for English; "es" for Spanish etc.,
    - `id` string — Unique, non-empty document identifier.
    - `text` string

## Response `200`

A successful call results in each valid document getting a sentiment score between 0 and 1

- SentimentBatchResult
  - `documents` SentimentBatchResultItem[]
    - `score` number, double — A decimal number between 0 and 1 denoting the sentiment of the document. A score above 0.7 usually refers to a positive document while a score below 0.3 normally has a negative connotation. Mid values refer to neutral text.
    - `id` string — Unique document identifier.
  - `errors` ErrorRecord[]
    - `id` string — Input document unique identifier the error refers to.
    - `message` string — Error message.

## Other responses

- `default` — Error Response

---

[API](https://skmtc.dev/azure/apis/text-analytics-client.md) · [All operations](https://skmtc.dev/azure/apis/text-analytics-client/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/text-analytics-client/revisions/d82ca1bb88d0/schema)
