Skip to main content
POST
/
api
/
ext
/
generic
/
text
/
sentiment-score
Analyze text sentiment
curl --request POST \
  --url https://app.spotzee.com/api/ext/generic/text/sentiment-score \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data 'text=This is a sample text to analyze for readability and sentiment scores.'
{
  "status": "success",
  "data": {
    "score": 3,
    "comparative": 0.25,
    "calculation": [],
    "tokens": [
      "i",
      "love",
      "this",
      "awesome",
      "great",
      "product"
    ],
    "words": [
      "love",
      "awesome",
      "great"
    ],
    "positive": [
      "love",
      "awesome",
      "great"
    ],
    "negative": []
  }
}

Authorizations

Authorization
string
header
required

Bearer token authentication. Use format: Bearer YOUR_API_KEY

Body

application/x-www-form-urlencoded
text
string
required

Text content to analyze

Example:

"This is a sample text to analyze for readability and sentiment scores."

Response

Successfully analyzed sentiment

status
string
required
Example:

"success"

data
object
required
Example:
{
  "score": 3,
  "comparative": 0.25,
  "calculation": [],
  "tokens": [
    "i",
    "love",
    "this",
    "awesome",
    "great",
    "product"
  ],
  "words": ["love", "awesome", "great"],
  "positive": ["love", "awesome", "great"],
  "negative": []
}