# 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
- **Stats:** 52 total users, 0 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

$9.90/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period. You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# 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
