# Stocktwits Messages, Sentiment & Trending Tickers Scraper (`talcoe/stocktwits-sentiment`) Actor

Get Stocktwits messages with bullish or bearish sentiment plus the live trending tickers list, filtered to the symbols you pick, priced per result returned.

- **URL**: https://apify.com/talcoe/stocktwits-sentiment.md
- **Developed by:** [M Usama](https://apify.com/talcoe) (community)
- **Categories:** Business, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 results

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/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 does Stocktwits Messages, Sentiment & Trending Tickers Scraper do?

It pulls the latest public Stocktwits messages for any stock or crypto ticker symbols you choose, each tagged with the author's own bullish or bearish sentiment label, plus the site's current trending tickers list with rank, sector and a short AI generated summary of why each symbol is moving. Set the symbols, cap the results, and get clean fields you can chart or feed into a model: `symbol`, `sentiment`, `body`, `author`, `createdAt`, `url`.

### Data source

Public JSON endpoints served by `api.stocktwits.com` (the same API the stocktwits.com website calls), read without logging in; data reflects the current live feed at run time.

### Why use it?

- Track retail sentiment (bullish vs bearish message volume) for a watchlist of tickers.
- Feed a trading or research model with labeled social sentiment instead of building your own NLP classifier.
- Spot which tickers are trending right now, with a plain-English reason, before it shows up elsewhere.
- Replace manually refreshing the Stocktwits site or paying for a sentiment data subscription.

### How to use it

1. Open the Actor and set the ticker symbols and how many messages per symbol you want.
2. Click Start. Download results as JSON, CSV or Excel, or read them through the API.
3. Add a Schedule and an Integration (Slack, Google Sheets, webhook) to get new sentiment and trending data automatically.

### Input

| Field | Description |
|---|---|
| `symbols` | Stock or crypto ticker symbols to pull messages and sentiment for, for example AAPL or TSLA. |
| `messagesPerSymbol` | How many recent messages to pull per symbol, newest first. |
| `includeTrending` | Also pull the current trending tickers list: rank, sector and a short AI generated sentiment summary. |
| `maxResults` | Hard stop for the run. You are billed per result, so this caps the cost. |
| `proxyConfiguration` | Apify proxy is recommended for larger runs. |

Example input:

```json
{
    "symbols": ["AAPL", "TSLA", "NVDA"],
    "messagesPerSymbol": 20,
    "includeTrending": true,
    "maxResults": 100
}
```

### Output

Every record has the same shape. A message record:

```json
{
    "id": "message:664984343",
    "symbol": "NVDA",
    "type": "message",
    "sentiment": "Bullish",
    "body": "$NVDA no bear saw this non had puts",
    "author": "aa906814",
    "createdAt": "2026-09-24T08:28:40.000Z",
    "url": "https://stocktwits.com/aa906814/message/664984343",
    "likesCount": 0,
    "authorFollowers": 119,
    "authorOfficial": false,
    "rank": null,
    "trendingScore": null,
    "sector": null,
    "title": null,
    "scrapedAt": "2026-09-24T08:34:25.728Z"
}
```

A trending ticker record (`type: "trending"`) fills `rank`, `trendingScore`, `sector`, `title` and uses `body` for the summary instead; `author`, `likesCount` and `authorFollowers` are `null`.

| Field | Meaning |
|---|---|
| `id` | Stable key, safe for deduplication between runs |
| `symbol` | Ticker symbol |
| `type` | `message` or `trending` |
| `sentiment` | `Bullish`, `Bearish` or `null` if the author did not tag one (messages only) |
| `body` | Message text, or the trend summary for trending records |
| `author` | Message author's username, `null` for trending records |
| `createdAt` | ISO 8601 timestamp |
| `url` | Link to the message or the symbol page |
| `likesCount` | Like count on the message, `null` for trending records |
| `authorFollowers` | Author's follower count, `null` for trending records |
| `authorOfficial` | Whether the author has an official Stocktwits badge |
| `rank` | Trending rank, `null` for messages |
| `trendingScore` | Trending score, `null` for messages |
| `sector` | Symbol's sector, `null` for messages |
| `title` | Company or asset name, `null` for messages |

### Pricing

Pay per event: a small fee when a run starts, then a fixed price per result returned. You only pay for records that pass your filters. Set `maxResults` to cap any run.

### Limitations

- Only public messages and the public trending list are read, nothing behind a login.
- Stocktwits paginates roughly 30 messages per request; very high `messagesPerSymbol` values take more requests and more run time.
- Sentiment is `null` when the message author did not tag one, this is not inferred.

### FAQ

**Is this legal?** The Actor reads the same public JSON endpoints the stocktwits.com website calls for any visitor without a login, and stores only messages and ticker data published for that purpose. You are responsible for how you use the data.

**Something is missing or broken?** Open an issue in the Issues tab; response time is usually under a day.

# Actor input Schema

## `symbols` (type: `array`):

Stock or crypto ticker symbols to pull Stocktwits messages and sentiment for, for example AAPL or TSLA.

## `messagesPerSymbol` (type: `integer`):

How many recent messages to pull per symbol, newest first.

## `includeTrending` (type: `boolean`):

Also pull the current trending tickers list: rank, sector and a short AI generated sentiment summary for each.

## `maxResults` (type: `integer`):

Hard stop for the run. You are billed per result, so this caps the cost.

## `proxyConfiguration` (type: `object`):

Apify proxy is recommended for larger runs.

## Actor input object example

```json
{
  "symbols": [
    "AAPL",
    "TSLA",
    "NVDA"
  ],
  "messagesPerSymbol": 20,
  "includeTrending": true,
  "maxResults": 100,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# 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 = {
    "symbols": [
        "AAPL",
        "TSLA",
        "NVDA"
    ],
    "messagesPerSymbol": 20,
    "includeTrending": true,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("talcoe/stocktwits-sentiment").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 = {
    "symbols": [
        "AAPL",
        "TSLA",
        "NVDA",
    ],
    "messagesPerSymbol": 20,
    "includeTrending": True,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("talcoe/stocktwits-sentiment").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 '{
  "symbols": [
    "AAPL",
    "TSLA",
    "NVDA"
  ],
  "messagesPerSymbol": 20,
  "includeTrending": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call talcoe/stocktwits-sentiment --silent --output-dataset

```

## MCP server setup

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

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/R9SEPMg0KMWRDRu5o/builds/agQE9lWIhYF93ywjl/openapi.json
