๐Ÿ’ญ

Sentiment Analysis API

Detect whether text is positive, negative, or neutral. Returns a numeric score using AFINN-165 โ€” fast, offline, no third-party NLP API.

API Docs $0.001 / request

About this tool

Analyze the emotional tone of any English text using the AFINN-165 lexicon. Each word in the text is scored (e.g., "love" = +3, "hate" = -3) and an aggregate score is returned. Ideal for reviewing customer feedback, social media posts, or product reviews at scale.

Quick Start

curl -X POST https://api.iteratools.com/sentiment \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"text": "I love this amazing product! It is fantastic."}'

Response

{ "sentiment": "positive", "score": 7, "comparative": 1.4, "tokens": ["love", "amazing", "product", "fantastic"], "positive": ["love", "amazing", "fantastic"], "negative": [], "language": "en" }

Response Fields

  • sentiment โ€” positive, negative, or neutral
  • score โ€” Sum of all word scores (higher = more positive)
  • comparative โ€” Score normalized by word count
  • tokens โ€” All words recognized in the AFINN lexicon
  • positive โ€” Words with positive score
  • negative โ€” Words with negative score
  • language โ€” Always en (English AFINN-165)

Negative Example

curl -X POST https://api.iteratools.com/sentiment \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"text": "This is terrible. I hate it and it is awful."}'
{ "sentiment": "negative", "score": -9, "comparative": -1.5, "tokens": ["terrible", "hate", "awful"], "positive": [], "negative": ["terrible", "hate", "awful"], "language": "en" }

Pricing

$0.001 per request via x402 micropayment on Base (USDC). Max text length: 10,000 characters.

Full Documentation Browse All Tools