Sentiment Analysis API Documentation
Complete reference for the Sentiment Analysis API
Authentication
Authorization: Bearer sk_live_your_key_here
GET POST /v1/sentiment/analyze
Parameters
| Field | Type | Description |
|---|---|---|
text | string | Text to analyze (required, max 10,000 chars) |
language | string | en or ar (default: en) |
Response Fields
| Field | Description |
|---|---|
sentiment | positive, negative, or neutral |
score | Normalized score (-1 to 1) |
confidence | Confidence level (0 to 1) |
positive | Positive word count and list |
negative | Negative word count and list |
emotions | Detected emotions with scores |
Example
curl -X POST "https://snapapis.com/api/v1/sentiment/analyze" \ -d "api_key=KEY&text=This product is amazing and I love it!&language=en"