# Sentiment Analysis Text Classification 📈 (`scrapestorm/sentiment-analysis-text-classification`) Actor

Paste your text to receive a sentiment analysis evaluation using an AI-powered tool. 🌟 Get the sentiment score and the classification (positive, negative, neutral) for each phrase. 📊 Export the analyzed data, run the tool through an API, schedule automatic checks, or integrate with other tools🔄📈

- **URL**: https://apify.com/scrapestorm/sentiment-analysis-text-classification.md
- **Developed by:** [Storm_Scraper](https://apify.com/scrapestorm) (community)
- **Categories:** Automation, Developer tools, AI
- **Features:** Limited permissions
- **Stats:** 53 total users, 0 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.00005 / actor start

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### What is the Sentiment Analysis Online Tool?

The Sentiment Analysis Online Tool is an AI-powered tool designed to evaluate the sentiment of any text you submit.
This tool can categorize the text as positive 👍, neutral 😐, or negative 👎 and provides a confidence score to show how accurate the classification is.

### 🛠️ How to Use

📝 Submit your text → 🤖 The AI model analyzes it → 📊 It classifies the sentiment as positive, neutral, or negative → 🏅 Receive a confidence score for the result

🕵️‍♂️ Monitor sentiment on social media platforms
🌟 Analyze customer reviews to gauge satisfaction
🗣️ Track brand mentions online and gain insights into public opinion

### 💸 Pricing

This scraper operates on a pay-per-month basis at a cost of $9.90/month.

### 🌟 Looking for more sentiment analysis tools?

Check out the scrapers below to gather different types of reviews and comments from various platforms. Each tool is tailored for specific tasks, such as analyzing sentiment on social media, collecting hotels and product reviews, and extracting comments from YouTube, Facebook, and Airbnb. Dive in and explore these options:

- [💬 YouTube Comments Scraper](https://apify.com/scrapestorm/youtube-comments-scraper---rental-fast-and-cheap)
- [Facebook Comments Scraper (All-in-One) 💬 ](https://apify.com/scrapestorm/facebook-comments-scraper-all-in-one)
- [YouTube Transcript Video Scraper 📝 (⚡ Fast & 💸 Cheap)](https://apify.com/scrapestorm/youtube-transcript-videos)
- [🌐 AirBNB reviews scraper (Fast & cheap)](https://apify.com/scrapestorm/airbnb)

***

### 🔑 YouTube Channel Scraper Input

The YouTube Channel Data Scraper requires a specific input format. Provide a JSON object with the URL of the YouTube video.

```
{
    "Texts": [
        "I am so happy with this product!",
        "This is the worst experience I've ever had.",
        "The weather is nice today.",
        "I feel great about this decision.",
        "I am not sure if I made the right choice."
    ]
}

```

### 📊 YouTube Scraper Data Output

The YouTube Channel Data Scraper will extract the following information for each video and store it in the Apify dataset.
After the run is complete, you can download the data in various formats (JSON, CSV, XML, RSS, or HTML Table).

```
[
    {
        "input text": "I am so happy with this product!",
        "finalClassification": "Positive",
        "value": 0.6468,
        "language": "en",
        "negativeScore": 0,
        "neutralScore": 0.539,
        "positiveScore": 0.461,
        "wordCount": 7,
        "sentenceCount": 1,
        "emotionStrength": 0.461,
        "languageDetectionConfidence": 0.99
    },
    {
        "input text": "This is the worst experience I've ever had.",
        "finalClassification": "Negative",
        "value": -0.6249,
        "language": "en",
        "negativeScore": 0.369,
        "neutralScore": 0.631,
        "positiveScore": 0,
        "wordCount": 8,
        "sentenceCount": 1,
        "emotionStrength": 0.369,
        "languageDetectionConfidence": 0.99
    },
    {
        "input text": "The weather is nice today.",
        "finalClassification": "Positive",
        "value": 0.4215,
        "language": "en",
        "negativeScore": 0,
        "neutralScore": 0.588,
        "positiveScore": 0.412,
        "wordCount": 5,
        "sentenceCount": 1,
        "emotionStrength": 0.412,
        "languageDetectionConfidence": 0.99
    },
    {
        "input text": "I feel great about this decision.",
        "finalClassification": "Positive",
        "value": 0.6249,
        "language": "en",
        "negativeScore": 0,
        "neutralScore": 0.494,
        "positiveScore": 0.506,
        "wordCount": 6,
        "sentenceCount": 1,
        "emotionStrength": 0.506,
        "languageDetectionConfidence": 0.99
    },
    {
        "input text": "I am not sure if I made the right choice.",
        "finalClassification": "Negative",
        "value": -0.2411,
        "language": "en",
        "negativeScore": 0.219,
        "neutralScore": 0.781,
        "positiveScore": 0,
        "wordCount": 10,
        "sentenceCount": 1,
        "emotionStrength": 0.219,
        "languageDetectionConfidence": 0.99
    }
]

```

### 🤖 Can I integrate this text analysis tool with other apps?

Yes, definitely! The Sentiment Analysis Online Tool can be seamlessly integrated with a variety of cloud services and web applications using Apify's platform integrations. You can link it with tools like Zapier, Slack, Make, Airbyte, LangChain, and more.

Additionally, you can set up webhooks to trigger actions based on specific events, such as receiving notifications whenever the Social Media Sentiment Analysis Tool completes a run.

### 💬 We value your feedback!

We're constantly working on enhancing the performance of our tools. If you have any technical suggestions or encounter any bugs with the text analysis tool, please feel free to create an issue in the "Issues" tab.

# Actor input Schema

## `Texts` (type: `array`):

Analyze the sentiment of multiple texts and classify each as positive, negative, or neutral.

## Actor input object example

```json
{
  "Texts": [
    "I am so happy with this product!",
    "This is the worst experience I've ever had.",
    "The weather is nice today.",
    "I feel great about this decision.",
    "I am not sure if I made the right choice."
  ]
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "Texts": [
        "I am so happy with this product!",
        "This is the worst experience I've ever had.",
        "The weather is nice today.",
        "I feel great about this decision.",
        "I am not sure if I made the right choice."
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapestorm/sentiment-analysis-text-classification").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "Texts": [
        "I am so happy with this product!",
        "This is the worst experience I've ever had.",
        "The weather is nice today.",
        "I feel great about this decision.",
        "I am not sure if I made the right choice.",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("scrapestorm/sentiment-analysis-text-classification").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "Texts": [
    "I am so happy with this product!",
    "This is the worst experience I'\''ve ever had.",
    "The weather is nice today.",
    "I feel great about this decision.",
    "I am not sure if I made the right choice."
  ]
}' |
apify call scrapestorm/sentiment-analysis-text-classification --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapestorm/sentiment-analysis-text-classification"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/PEHdfP9zxGhFjBtoN/builds/s0UdbScvueToWJgqv/openapi.json
