Sentiment analysis API: score English text from -1 to 1

Updated 2026-10-12

Use when an agent must score an English text as positive, negative or neutral.

From an MCP client, add https://tanod.dev/mcp and call text_sentiment; its free daily calls are applied automatically, no key or signup.

POST English text to /v1/text/sentiment and get a compound score from -1 (very negative) to 1 (very positive), the positive, neutral and negative shares, and a label. It runs VADER, a lexicon-and-rules method built for short informal English, so it needs no model, account or training.

When to use it, and when not

Use it to triage reviews, support tickets or social posts, or to add a cheap polarity signal to a pipeline. It is a lexicon heuristic: it misses sarcasm and domain jargon, and it is not a trained model.

Do not use it for other languages; the response reports language: "en" and the method is English only. To find out which language a text is in first, use language detection. If you need the main topics rather than the mood, use keyword extraction; for a shorter version of the text use summarization.

Request

FieldTypeMeaning
textstring, requiredThe text, 1 to 200,000 characters.
per_sentenceboolean, default falseAlso score each sentence. Helps with mixed reviews like the example.

No other fields are accepted.

curl, using the free tier
curl -s -X POST https://tanod.dev/v1/text/sentiment \
  -H 'content-type: application/json' -H 'X-Tanod-Free: 1' \
  -d '{"text": "I love the screen, but the battery is terrible."}'

Response

Response (the example from the OpenAPI spec, trimmed)
{
  "compound": -0.3716,
  "positive": 0.189,
  "neutral": 0.509,
  "negative": 0.302,
  "label": "negative",
  "sentences": 1,
  "input_truncated": false,
  "language": "en",
  "method": "VADER lexicon and rules (heuristic; English only). ..."
}

The reply also carries a source object naming the library (vaderSentiment 3.3.2, MIT). With per_sentence true, sentences is a list of per-sentence scores instead of a count. input_truncated tells you whether the text was cut.

Limits and caveats

Errors

An unpaid call without the X-Tanod-Free: 1 header, or with missing or invalid input, gets a 402 that quotes the price and says in error what is wrong; the free tier is opt-in and such a call consumes nothing. A payment for a different amount than the price is refused with a new 402 (price_mismatch) and never settled. A 422 with a payment attached means the input was rejected, and it is not charged.

Price and free allowance

USD 0.001 per call, paid in USDC on Base, Polygon, Solana, BNB Chain or Arbitrum with x402. 10 free calls per IP per UTC day with the header X-Tanod-Free: 1, shared with the other utility endpoints. MCP tool: text_sentiment at https://tanod.dev/mcp (or the focused text server at https://tanod.dev/mcp/text), where the free tier is automatic. No signup and no API key.

Use it from Claude without writing code: in claude.ai or Claude Desktop, add https://tanod.dev/mcp/text?via=sentiment-analysis-api as a custom connector (steps), then ask in plain words, for example "Is this review positive or negative: 'The setup was quick and it works great'." The free daily allowance is applied automatically over MCP. Beyond it a call needs an x402 payment, which these clients can make.

Updated 2026-10-12. Related guides: What sentiment analysis APIs cost over x402, Text summarization API, Keyword extraction API, Spell check API. All guides, or back to tanod.dev.