AI Sentiment Analysis API avatar

AI Sentiment Analysis API

Pricing

from $0.01 / 1,000 results

Go to Apify Store
AI Sentiment Analysis API

AI Sentiment Analysis API

Analyze text sentiment with AI. Emotion detection, key phrase extraction. Supports OpenAI GPT-4, Claude. Webhook Integration for Zapier, Make, n8n, or custom webhook.

Pricing

from $0.01 / 1,000 results

Rating

0.0

(0)

Developer

The Howlers

The Howlers

Maintained by Community

Actor stats

0

Bookmarked

6

Total users

1

Monthly active users

7 days ago

Last modified

Share

Sentiment Analysis API - AI-Powered Text Analysis

Analyze text sentiment using AI. Detect positive, negative, neutral tones with emotion detection, confidence scores, and key phrase extraction.

BYOK (Bring Your Own Key) -- you provide your own API credentials.


Before You Start

This actor requires your own API credentials to fetch real data.

Where to get your key: Your OpenAI API key for AI-powered sentiment analysis. If not provided, uses rule-based analysis.

You can test with Demo Mode first (free, no key needed) to see the output format before committing.


Quick Start

Test with Demo Mode (free, no API key needed)

{
"demoMode": true,
"texts": [
"I love this product! It's amazing.",
"This service was terrible. Never again.",
"The weather is nice today."
]
}

Run with real data

{
"demoMode": false,
"texts": [
"I love this product! It's amazing.",
"This service was terrible. Never again.",
"The weather is nice today."
],
"includeEmotions": true,
"includeKeyPhrases": true,
"includeTopics": false,
"language": "auto",
"openaiApiKey": "YOUR_API_KEY_HERE",
"anthropicApiKey": "YOUR_API_KEY_HERE",
"model": "auto"
}

Input Parameters

ParameterTypeDefaultRequiredDescription
textsarray-NoArray of texts to analyze for sentiment. Each text will be analyzed separately.
textstring-NoSingle text to analyze (use this OR texts array, not both)
includeEmotionsbooleantrueNoDetect specific emotions (joy, anger, sadness, fear, surprise, disgust)
includeKeyPhrasesbooleantrueNoExtract key phrases that influenced the sentiment
includeTopicsbooleanfalseNoDetect topics/subjects mentioned in the text
languagestring"auto"NoLanguage of the input text (auto-detect if not specified)
openaiApiKeystring-Yes*Your OpenAI API key for AI-powered sentiment analysis. If not provided, uses rule-based analysis.
anthropicApiKeystring-Yes*Your Anthropic API key for Claude-powered sentiment analysis. Used if OpenAI key not provided.
modelstring"auto"NoWhich AI model to use for analysis
webhookUrlstring-NoURL to receive a POST request when analysis is complete
demoModebooleantrueNoRun with sample data instead of actual analysis (for testing)

*Required when Demo Mode is off.


Pricing

This actor uses pay-per-event billing:

EventDescriptionPrice
Text AnalyzedEach text analyzed for sentiment$0.02

Demo mode is free -- no charges for sample data.


Troubleshooting

"API key is required"

You have Demo Mode turned off but didn't provide an API key. Either:

  • Turn Demo Mode on to test with sample data
  • Add your API key in the input

"API error 403" or "Unauthorized"

Your API key is invalid, expired, or doesn't have access to this specific API endpoint. Double-check your key and account permissions.

"API error 429" or "Rate limit"

Too many requests. Wait a minute and try again, or reduce the number of items per run.

No results or empty dataset

Check the run log for error messages. Common causes:

  • Invalid input format (check the examples above)
  • API key without proper permissions
  • The target data doesn't exist or is too small to track

How do I test without an API key?

Enable Demo Mode in the input. This returns realistic sample data so you can verify the output format works for your workflow.


Built by John Rippy | Actor Arsenal