Sentiment Analysis API
Built by John Rippy | johnrippy.link
🏆 2025 Zapier Automation Hero of the Year — Project Phoenix: A 95-step AI sales pipeline cutting development time by 50%. Read more →
Analyze text sentiment using AI or rule-based analysis. Detect positive, negative, neutral, and mixed sentiments with emotion detection, confidence scores, and key phrase extraction.
Features
- Multi-Model Support: Use OpenAI GPT-4o, Claude 3, or built-in rule-based analysis
- Emotion Detection: Identify joy, anger, sadness, fear, surprise, and disgust
- Key Phrase Extraction: Find phrases that influenced the sentiment
- Topic Detection: Automatically detect subjects mentioned in the text
- Batch Processing: Analyze multiple texts in a single run
- Multi-Language: Support for English, Spanish, French, German, and more
- Webhook Integration: Get notified when analysis completes
Use Cases
- Review Analysis: Analyze customer reviews to understand sentiment trends
- Social Media Monitoring: Track sentiment of brand mentions
- Customer Feedback: Categorize support tickets by sentiment
- Content Moderation: Flag negative or toxic content
- Market Research: Analyze survey responses and feedback
- Brand Health: Monitor overall sentiment over time
Input Parameters
Output
The actor outputs a comprehensive analysis object:
{
"totalTexts": 3,
"overallSentiment": "mixed",
"averageScore": 0.07,
"results": [
{
"text": "I love this product! It's amazing.",
"sentiment": "positive",
"score": 0.92,
"confidence": 0.95,
"magnitude": 0.88,
"emotions": [
{ "name": "joy", "score": 0.85 },
{ "name": "surprise", "score": 0.15 }
],
"keyPhrases": ["love this product", "amazing"],
"topics": ["product", "quality"],
"language": "en",
"model": "gpt-4o-mini",
"processingTime": 245
}
],
"summary": {
"positive": 1,
"negative": 1,
"neutral": 1,
"mixed": 0
}
}
Sentiment Scores
- score: -1 (most negative) to 1 (most positive)
- confidence: 0 to 1, how confident the model is
- magnitude: 0 to 1, strength of the sentiment
Sentiment Categories
- positive: Score > 0.2
- negative: Score < -0.2
- neutral: Score between -0.2 and 0.2 with no mixed signals
- mixed: Contains both positive and negative elements
Example Usage
Basic Sentiment Analysis
{
"texts": [
"I love this product! It's amazing.",
"Terrible customer service, never again.",
"The package arrived on time."
]
}
AI-Powered Analysis
{
"texts": ["Your product transformed my business! Thank you!"],
"openaiApiKey": "sk-...",
"model": "gpt-4o-mini",
"includeEmotions": true,
"includeKeyPhrases": true
}
Review Batch Analysis
{
"texts": [
"5 stars! Best purchase ever.",
"Product broke after 2 days.",
"Good value for money.",
"Shipping was slow but item was fine."
],
"anthropicApiKey": "sk-ant-...",
"model": "claude-3-haiku",
"includeTopics": true
}
With Webhook Notification
{
"texts": ["Great experience overall!"],
"webhookUrl": "https://hooks.zapier.com/your-webhook-id"
}
Models Comparison
Pricing
This actor uses the pay-per-event pricing model:
- Base cost: $0.05 per run
- Per text: $0.002 per text analyzed (rule-based)
- AI models: Additional cost based on API token usage
Example: Analyzing 100 reviews with rule-based = ~$0.25
Integration
Zapier/Make/n8n
Use the webhook URL to trigger automations when analysis completes. The webhook payload includes:
- Total texts analyzed
- Overall sentiment
- Average score
- Summary counts
Supabase/Database
Store results in your database for trend analysis and reporting.
Limitations
- Maximum 100 texts per run
- Text length limited to 2000 characters for AI models
- Rule-based analysis works best with English text
- AI models require valid API keys with sufficient credits
Support
For issues or feature requests, contact support.
---
Keywords
sentiment api, sentiment analysis, review sentiment, ai sentiment, text analysis, opinion mining, openai integration, claude integration