Sentiment Analyzer

Analyze the sentiment of text. $0.01 per request.

What it does

Send any text — a review, a message, feedback — and get back a sentiment classification, a -1 to 1 score, confidence, and specific detected emotions.

Submitted content is processed by Anthropic's Claude API and is not otherwise stored or logged.

Endpoint

MethodPOST
Path/analyze
Content-Typeapplication/json

Fields

fieldrequireddescription
textyesThe text to analyze, max 20,000 characters

Example

curl -X POST https://sentiment-analyzer.pdfextractapi.workers.dev/analyze \
  -H "Content-Type: application/json" \
  -d '{"text": "This product completely exceeded my expectations, I'"'"'m thrilled!"}'

Example response

{
  "sentiment": "positive",
  "score": 0.9,
  "confidence": 0.95,
  "emotions": ["excitement", "satisfaction"],
  "summary": "Strongly positive, expressing enthusiasm and satisfaction."
}

Errors

Errors return a non-200 status with { "error": { "code": "...", "message": "..." } }. Common codes: missing_text, text_too_large.

Payment

This endpoint is paid per-request via the x402 protocol (HTTP 402 + USDC). Unpaid requests receive a 402 response with payment instructions.

Try it in your browser