This API goes beyond positive/negative. It detects:
- Sentiment polarity (-1 to +1)
- Subjectivity score (0 = objective, 1 = subjective)
- 8 basic emotions (joy, sadness, anger, fear, surprise, disgust, trust, anticipation)
- Aspect-based analysis (what specifically is positive/negative)
docker compose up -d
curl -X POST http://localhost:8000/api/v1/analyze/sentiment \
-H "Content-Type: application/json" \
-d '{"text": "The food was amazing but the service was terrible", "source": "amazon"}'| Endpoint | What It Does |
|---|---|
POST /api/v1/analyze/sentiment |
Single text → sentiment + emotions |
POST /api/v1/analyze/batch |
Bulk analysis with aggregate stats |
POST /api/v1/analyze/aspects |
Aspect-level sentiment breakdown |
Mahesh Solanki · LinkedIn