The Sentiment Analysis API analyzes text to determine the emotional tone, providing detailed sentiment scoring and classification. This powerful tool detects positive, negative, and neutral sentiment along with specific emotions like joy, sadness, anger, and more.
Instant sentiment scoring and classification
Detailed emotion detection with sentence-level analysis
import { JigsawStack } from 'jigsawstack';const jigsaw = new JigsawStack('your-api-key');const response = await jigsaw.ai.sentiment({ text: "The customer service was excellent, and I really enjoyed the product!"});console.log(response);
Provide sufficient context: Longer text with complete context generally produces more accurate sentiment analysis than short, fragmented content
Consider language nuances: The API handles various languages and cultural expressions, but providing clear, well-structured text improves accuracy
Use sentence-level analysis: The API automatically breaks down text into sentences, allowing you to identify sentiment shifts within a single piece of content
Optimal length: Aim for 10-100 words for best results (maximum 5000 characters per request)