# 📈 Twitter Sentiment & Narrative Report (`sentimentalpha/x-sentiment-narrative-report`) Actor

Get one clean, scored JSON report with real-time X (Twitter) sentiment, dominant narratives, volume trends, key voices, and crisis flags for any ticker, brand, or topic — ready-to-use intelligence instead of parsing raw tweets from scrapers.

- **URL**: https://apify.com/sentimentalpha/x-sentiment-narrative-report.md
- **Developed by:** [Sentiment Alpha](https://apify.com/sentimentalpha) (community)
- **Categories:** AI, Automation, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $250.00 / 1,000 sentiment & narrative reports

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## Twitter Sentiment Analysis & Narrative Reports — AI-Scored, No Scraping

**Raw scrapers sell you 5,000 tweets. This sells you the answer.**

This actor by SentimentAlpha runs real-time **Twitter sentiment analysis** on any ticker, brand, or topic and returns one decision-ready report: scored sentiment, the narratives driving the conversation, who's amplifying them, and a crisis flag if a negative story is picking up speed. Live from X (Twitter) via Grok's official X search — no scraping, no proxies, nothing that breaks when X changes its site.

### The math

| | Raw tweet scraper | This actor |
|---|---|---|
| You pay | ~$2.00 (5,000 tweets @ $0.40/1K) | **$0.25 (one report)** |
| You receive | 5,000 rows to clean, dedupe & analyze | The finished analysis |
| Your time | ~1 hour (or another AI pipeline) | 0 minutes |
| Breaks when X changes HTML? | Yes | No — official Grok API |
| Answer to "is sentiment turning?" | Eventually | In the first field |

### What one $0.25 report contains

```json
{
  "query": "$TSLA",
  "sentimentScore": -0.34,
  "sentimentLabel": "negative",
  "confidence": 0.81,
  "narrativeVelocity": 72,
  "crisisFlag": true,
  "crisisNote": "Delivery-miss narrative accelerating, amplified by three high-reach accounts in the last 6 hours.",
  "topNarratives": [
    { "theme": "Q2 delivery miss", "stance": "negative", "strength": 84, "samplePost": "Third quarter in a row deliveries came in under whisper numbers..." }
  ],
  "keyVoices": [ { "handle": "@...", "stance": "bearish", "reach": "high" } ],
  "summary": "Sentiment has turned negative over the last 24h, driven primarily by..."
}
````

### Who uses this

- **Brand, PR & comms teams** — "Is X turning against us? Is this a crisis or noise?" One run answers it. Schedule it daily and pipe alerts to Slack.
- **Marketing agencies** — client-ready social snapshots without an $800/mo listening-tool seat. Run 40 client reports for $10.
- **Traders & analysts** — which narratives are moving $NVDA, bitcoin, or a memecoin right now, at what velocity, and who's driving them.
- **AI agents & automations** — clean structured JSON, callable by API, MCP, or schedule. Built for machine consumption.

### Why it's priced per report, not per tweet

You're not buying data — you're buying the hour you'd spend turning data into a conclusion. Every report is a fresh, live Grok analysis of the current X conversation. You're charged **only for successful reports**; failed queries cost nothing. No subscription, no minimum: one report is $0.25, forty are $10.

### Get started in 60 seconds

1. Enter one or more queries: `Nike`, `$TSLA`, `GLP-1 drugs`, `@YourBrand`
2. Pick a timeframe (4h / 24h / 7d)
3. Run. Export JSON/CSV, connect to Sheets, Slack, or your agent — or schedule it and never check manually again.

### Twitter sentiment analysis FAQ

#### What is Twitter sentiment analysis?

Twitter sentiment analysis uses AI to classify posts about a brand, ticker, or topic as positive, negative, or neutral — and, in this actor's case, to extract the underlying narratives driving the conversation. It turns raw social noise into quantifiable signals for trading, PR, and competitive monitoring.

#### How accurate is AI Twitter sentiment analysis?

Modern models achieve high reliability on clear sentiment and emerging narratives when given fresh, high-engagement posts, which is exactly what this actor feeds them via Grok's live X search. Every report includes a calibrated confidence score so you know how much weight to put on each reading.

#### Can I use Twitter sentiment for stock or crypto trading signals?

Sentiment and narrative velocity are leading indicators in narrative-driven assets, but no single signal is a complete strategy. Best results come from layering sentiment velocity and contrarian divergence with price and volume data.

#### What's the difference between X and Twitter sentiment analysis tools?

Same platform — "X" is the current name, but most people still search "Twitter." This actor analyzes the live X platform regardless of what you call it.

#### Is there a Twitter sentiment analysis API?

Yes — this actor is one: call it via Apify's HTTP API, schedule it, or connect it through MCP for AI agents. You get scored, structured JSON without managing your own scraping or LLM pipeline.

#### Do I need a Twitter/X API key to run this?

No. The actor uses Grok's official X search under the hood, so there's nothing to configure — enter a query and run.

***

**About SentimentAlpha:** we build AI analysis actors on Grok's official X search — finished intelligence, not raw data dumps. More actors coming: scheduled Brand Monitor and KOL Stance Tracker. [sentimentalpha.ai](https://sentimentalpha.ai)

*Searches that find this actor: twitter sentiment analysis, twitter sentiment analysis api, x sentiment api, stock sentiment report, brand monitoring twitter, social listening actor, crypto twitter sentiment, narrative analysis, crisis detection, KOL tracking, tweet analysis without scraping.*

# Actor input Schema

## `queries` (type: `array`):

One report is generated (and charged) per query. Examples: 'Nike', '$TSLA', 'GLP-1 drugs', '@YourCompany'.

## `timeframe` (type: `string`):

How far back to scan X activity.

## `includeNarratives` (type: `boolean`):

Adds up to 5 ranked narratives (theme, stance, strength, sample post) per query.

## `includeKeyVoices` (type: `boolean`):

Adds the most influential accounts driving the conversation and their stance.

## Actor input object example

```json
{
  "queries": [
    "$TSLA"
  ],
  "timeframe": "24h",
  "includeNarratives": true,
  "includeKeyVoices": true
}
```

# 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 = {
    "queries": [
        "$TSLA"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("sentimentalpha/x-sentiment-narrative-report").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 = { "queries": ["$TSLA"] }

# Run the Actor and wait for it to finish
run = client.actor("sentimentalpha/x-sentiment-narrative-report").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "queries": [
    "$TSLA"
  ]
}' |
apify call sentimentalpha/x-sentiment-narrative-report --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=sentimentalpha/x-sentiment-narrative-report",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "📈 Twitter Sentiment & Narrative Report",
        "description": "Get one clean, scored JSON report with real-time X (Twitter) sentiment, dominant narratives, volume trends, key voices, and crisis flags for any ticker, brand, or topic — ready-to-use intelligence instead of parsing raw tweets from scrapers.",
        "version": "0.1",
        "x-build-id": "ImWVbqs1MBEnyPm25"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/sentimentalpha~x-sentiment-narrative-report/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-sentimentalpha-x-sentiment-narrative-report",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/sentimentalpha~x-sentiment-narrative-report/runs": {
            "post": {
                "operationId": "runs-sync-sentimentalpha-x-sentiment-narrative-report",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/sentimentalpha~x-sentiment-narrative-report/run-sync": {
            "post": {
                "operationId": "run-sync-sentimentalpha-x-sentiment-narrative-report",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "queries"
                ],
                "properties": {
                    "queries": {
                        "title": "Brands, tickers, or topics",
                        "type": "array",
                        "description": "One report is generated (and charged) per query. Examples: 'Nike', '$TSLA', 'GLP-1 drugs', '@YourCompany'.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "timeframe": {
                        "title": "Timeframe",
                        "enum": [
                            "4h",
                            "24h",
                            "7d"
                        ],
                        "type": "string",
                        "description": "How far back to scan X activity.",
                        "default": "24h"
                    },
                    "includeNarratives": {
                        "title": "Include top narratives breakdown",
                        "type": "boolean",
                        "description": "Adds up to 5 ranked narratives (theme, stance, strength, sample post) per query.",
                        "default": true
                    },
                    "includeKeyVoices": {
                        "title": "Include key voices (KOLs)",
                        "type": "boolean",
                        "description": "Adds the most influential accounts driving the conversation and their stance.",
                        "default": true
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
