v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1484423422.2 KB

Inspects text and returns an inference of the prevailing sentiment (<code>POSITIVE</code>, <code>NEUTRAL</code>, <code>MIXED</code>, or <code>NEGATIVE</code>).

post/#X-Amz-Target=Comprehend_20171127.DetectSentiment

Headers

X-Amz-Target'Comprehend_20171127.DetectSentiment' required

Request body

Textstring password required

A UTF-8 text string. The maximum string size is 5 KB.

LanguageCode'en' | 'es' | 'fr' | 'de' | 'it' | 'pt' | 'ar' | 'hi' | 'ja' | 'ko' | 'zh' | 'zh-TW' required

The language of the input documents. You can specify any of the primary languages supported by Amazon Comprehend. All documents must be in the same language.

Response

Success

Sentiment'POSITIVE' | 'NEGATIVE' | 'NEUTRAL' | 'MIXED'

The inferred sentiment that Amazon Comprehend has the highest level of confidence in.