Skip to main content
POST
/
twitter
/
tweets
/
sentiment
Sentiment Analysis
curl --request POST \
  --url https://api.twitterxapi.com/twitter/tweets/sentiment \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "text": "<string>"
}'
{
  "code": 123,
  "msg": "<string>",
  "data": {
    "tone": "<string>",
    "sentiment": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
text
string
required

The text to analyze.

Response

A sentiment object.

code
integer
required

The status code of the response.

msg
string
required

The message of the response.

data
object
required

The sentiment analysis model.