API Documentation
Integrate sentiment analysis directly
YouTube Analyzer Text Analyzer

POST /api/analyze

Analyze the sentiment of any given text. Returns a JSON object containing the sentiment score, label, and matched words.

Request Format

{ "text": "Your text here" }

Example Usage (cURL)

curl -X POST https://commentanalyzer.pages.dev/api/analyze \ -H "Content-Type: application/json" \ -d '{"text":"This is an amazing and wonderful API!"}'

Response Format

{ "text": "This is an amazing and wonderful API!", "label": "POSITIVE", "score": 1.2, "confidence": 0.24, "matched_tokens": [ ["amazing", 0.6], ["wonderful", 0.6] ] }

Interactive API Playground

Test the API directly from your browser. Enter some text and see the raw JSON response.

Waiting for request...