# Stocktwits Sentiment Scraper — Messages, Bullish %, Trends (`oswaldocarabano/stocktwits-sentiment-scraper`) Actor

Scrape Stocktwits messages with author sentiment, tickers, price at post, likes and public author stats; per-ticker bullish/bearish % with a published formula; the Stocktwits daily sentiment index; and trending tickers with fundamentals. No login.

- **URL**: https://apify.com/oswaldocarabano/stocktwits-sentiment-scraper.md
- **Developed by:** [Oswaldo Carabaño](https://apify.com/oswaldocarabano) (community)
- **Categories:** Social media, Business, News
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 1,000 messages

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Stocktwits Sentiment Scraper — Messages, Bullish % & Trending Tickers

Scrape **Stocktwits** through its public API: every **message** of the tickers, users or streams you choose (text, date, the author's **Bullish/Bearish tag**, tickers with the **price at the moment of posting**, likes, reshares, replies, links, charts, price targets and the author's **public** stats), a **per-ticker sentiment row** computed with a published, deterministic formula (bullish %, net sentiment, messages per hour, hourly volume, top authors, co-mentioned tickers), the **Stocktwits daily sentiment index** with about 60 days of history, and the **trending tickers** list with fundamentals.

No login, no account, no API key, no browser. Error rows, filtered rows and duplicates are **never charged**.

> This actor is not affiliated with, endorsed by, or connected to Stocktwits. It reads public data only and returns only public profile information about authors (no emails, phone numbers or avatars).

### What you get

| `outputType` | One row per | Highlights |
|---|---|---|
| `message` (default) | message | 60 columns: id and link, ISO date and age, text, `sentiment` (`bullish`/`bearish`/null) and `sentiment_score` (+1/−1), tagged tickers, `price_at_post` and the price of every tagged ticker, likes, reshares, replies, reply/reshare ids, chart image, links with titles and domains, @mentions, **price target** (target, date, direction, status), source app, and the author's public profile: followers, following, messages posted, likes received, watchlist size, join date and **account age in days**, official account, labels, badges, declared country |
| `symbol-sentiment` | ticker | 47 columns: name, exchange, class, watchers; the **window** (number of messages, start, end, hours, messages per hour); labeled / bullish / bearish / untagged counts, **bullish %**, **bearish %**, **net sentiment**, a **label** (bullish, bearish, mixed or insufficient-data); **messages per UTC hour** with bullish and bearish per hour, peak hour; unique authors and the 5 with most followers; likes, replies and reshares; messages with charts or links; the 10 tickers most often mentioned together; last price; and the **Stocktwits daily index** of the day (bullish %, 7-day average, change vs yesterday, message-volume score and change) |
| `sentiment-history` | ticker × day | The Stocktwits daily sentiment index: bullish %, bearish %, net, change vs the previous day, message-volume score and change — about 61 days per ticker |
| `trending-symbol` | trending ticker | rank, trending score, **why it is trending** (Stocktwits summary), watchers, sector, industry, ISIN, CUSIP and fundamentals: market cap, P/E, EPS, PEG, P/B, beta, dividend yield and rate, 50-day average, 52-week high/low, average volume, shares outstanding, float, institutional ownership, revenue, assets, debt, cash, employees, earnings growth |

### How `symbol-sentiment` is computed (formula v1)

The actor reads the newest messages of the ticker (`messagesPerSymbol`, 200 by default, and only those inside `postedWithinHours` if you set it). Then, with no AI and no randomness — the same messages always give the same row:

- **labeled** = messages whose author tagged them Bullish or Bearish; untagged messages count in the volume but not in the percentages.
- **bullish_pct** = 100 × bullish / labeled · **bearish_pct** = 100 × bearish / labeled · **net_sentiment_pct** = bullish_pct − bearish_pct (−100 to +100).
- **sentiment_label**: fewer than 10 labeled messages → `insufficient-data`; net ≥ +20 → `bullish`; net ≤ −20 → `bearish`; otherwise `mixed`.
- **window_hours** = newest − oldest message, in hours · **messages_per_hour** = messages / window_hours (a window under one minute counts as one minute).
- **hourly_volume** = one bucket per UTC hour from the oldest to the newest message, empty hours included (at most the last 168).
- Rounded to 2 decimals. `formula_version` tells you which version produced the row.

The `stocktwits_*` columns are **Stocktwits' own** daily index, copied as published, so you can compare it with the window.

### Input

- **Tickers** — `AAPL`, `$tsla`, `BRK.B`, `SPY`, crypto with `.X` (`BTC.X`), India and Canada listings (`RELIANCE.NSE`, `T.TSX`), or ticker links. **Empty**: messages mode reads the Stocktwits trending stream; the two ticker modes use the top 10 trending tickers right now.
- **Usernames**, **Message links** and **Global streams** (`trending`, `suggested`, `charts`) — messages mode. If you choose a ticker mode but give only usernames, links or streams, the run returns messages and the log says so.
- **Ticker stream filter** — all, top, with links, with charts (applied by Stocktwits).
- **Sentiment**, **Minimum author followers**, **Only messages with a price target** — Stocktwits has no such filters, so the actor applies them. With any of them on it scans at most **3,000 messages per ticker, user or stream**; filtered messages are never charged and the run summary says how many were removed. In ticker-sentiment mode these filters are not used: the aggregate always takes the whole window (the log says so).
- **Posted within (hours)** — the stream is newest-first, so the run stops reading as soon as messages get older. In ticker-sentiment mode it is the time window of the aggregate.
- **Messages per ticker / stream** — the window of the aggregate (200 when empty), or an optional per-stream cap in messages mode (empty = no cap, only Maximum results).
- **Trending list region** (US, India, Canada) and **asset class** (stocks, ETFs, crypto; applied by the actor).
- **Only new since my last run** — for schedules: remembers what earlier runs with the same input delivered (key-value store `stocktwits-sentiment-monitor` in your account) and delivers only new messages; it stops reading a stream at the first message already delivered.
- **Maximum results** — shared fairly between your tickers, users and streams.

Examples:

```json
{"outputType": "symbol-sentiment", "symbols": ["TSLA", "NVDA", "BTC.X"]}
{"symbols": ["AAPL", "MSFT"], "sentimentFilter": "labeled", "postedWithinHours": 24, "maxItems": 1000}
{"usernames": ["howardlindzon"], "maxItems": 200}
{"outputType": "sentiment-history", "symbols": ["GME", "AMC"], "maxItems": 200}
{"outputType": "trending-symbol", "trendingAssetClass": "crypto"}
{"symbols": ["SPY"], "onlyNewSinceLastRun": true, "maxItems": 500}
```

### Output example (`symbol-sentiment`, AAPL, 18 Nov 2026)

```json
{
  "_type": "symbol-sentiment",
  "symbol": "AAPL",
  "title": "Apple Inc",
  "exchange": "NASDAQ",
  "watchlist_count": 1002254,
  "window_messages": 200,
  "window_start": "2026-11-18T10:42:21.000Z",
  "window_end": "2026-11-18T19:22:30.000Z",
  "window_hours": 8.67,
  "messages_per_hour": 23.07,
  "labeled_messages": 73,
  "bullish_pct": 39.73,
  "bearish_pct": 60.27,
  "net_sentiment_pct": -20.54,
  "sentiment_label": "bearish",
  "hourly_volume": [{"hour": "2026-11-18T11:00:00.000Z", "messages": 6, "bullish": 3, "bearish": 2}, "…"],
  "peak_hour": "2026-11-18T14:00:00.000Z",
  "unique_authors": 110,
  "top_co_mentioned_symbols": ["SPY", "NVDA", "QQQ", "GOOGL", "TSLA"],
  "last_price": 352.69,
  "stocktwits_bullish_pct": 43.39,
  "stocktwits_bullish_pct_7d_avg": 47.27,
  "stocktwits_volume_score": 2098,
  "formula_version": "v1"
}
```

### Field coverage (measured)

Share of rows with a non-empty value, from real runs on 18 Nov 2026. Fields not listed are filled in every row.

- **message** (n = 3,400 from 30 tickers, 3 global streams and 1 user): `body` 99.9 %, tickers 98.1 %, `price_at_post` 97.8 %, `author_country` 90.1 %, **`sentiment` 36.4 %** (only about a third of authors tag their messages), reshare id 17.2 %, `author_classification` 16.3 %, chart 13.5 %, links 10.5 %, reply-to id 3.1 %, @mentions 3.6 %, price target 0.4 % (7 of 1,800 messages in a separate count).
- **symbol-sentiment** (n = 307 tickers): every window field 100 %; Stocktwits daily index 88.6 % (some small or foreign tickers have no tagged messages that day).
- **sentiment-history** (n = 366 days, 6 tickers): volume 100 %, bullish/bearish 88.0 % (days with no tagged message have no percentage, never a fake 0 %).
- **trending-symbol** (n = 63, US + India + Canada lists): ISIN, sector 95.2 %; P/E, EPS, market cap, revenue 85.7 % (ETFs and crypto have no fundamentals); trend summary 36.5 % (Stocktwits writes it for the top names only).

### Stocktwits Sentiment Scraper vs other Stocktwits actors

Read from each actor's published output schema and price on 18 Nov 2026 (Apify Store API).

| | This actor | automation-lab (leader) | maximedupre | shahidirfan |
|---|---|---|---|---|
| Price per message | **$0.0008** | $0.0009 + $0.005 per run | $0.00015 | $0.001 |
| Fields in the output schema | **151** (4 row types) | 56 | 31 | 12 |
| Per-ticker aggregate with a published formula | **Yes** (window, hourly volume, top authors, co-mentions) | daily % only | No | own score |
| Stocktwits daily index with history | **Yes** (≈61 days + volume) | Yes | No | No |
| Trending tickers with fundamentals | **Yes** (30+ fundamentals, ISIN) | market cap, sector | market cap, sector | rank only |
| Author account age, likes received, labels | **Yes** | partly | partly | No |
| Price targets | **Yes** | Yes | Yes | No |
| Runs that failed or timed out (30 days) | new | 3.1 % | **24.7 %** | 0 % |
| Errors and duplicates charged | **Never** | — | — | — |

### Pricing

Pay per row delivered: **message $0.0008** · **ticker sentiment $0.002** (one row aggregates up to 200 messages) · **daily sentiment point $0.0003** · **trending ticker $0.0009** · run start $0.00001. Error rows, filtered rows and duplicates are free. 1,000 messages cost $0.80.

### Speed and limits

- About 30 messages per request; 1,000 messages from one ticker take ~35 requests and well under a minute.
- Stocktwits limits each IP to roughly 250 requests in a burst. The actor paces each connection below that and switches to a fresh connection the moment it is throttled, so long runs keep going; you will see a short pause in the status if it happens.
- The trending list has 30 tickers (Canada: a handful). `filter=videos` and regions other than US, India and Canada are ignored by Stocktwits, so they are not offered.
- Watchlists, sector streams and the equities/forex/futures streams need a Stocktwits account, so this actor does not offer them.

### FAQ

**Is the sentiment AI?** No. `sentiment` is the tag the author chose when posting. The aggregate is plain arithmetic on those tags (formula above), so it is reproducible.

**How fresh is the data?** Live: every run reads Stocktwits at that moment (nothing is cached).

**Why is `sentiment` empty in many rows?** About 64 % of messages are not tagged by their authors (36.4 % tagged in 3,400 messages). Use `sentimentFilter: labeled` to keep only tagged ones.

**What happens with a wrong ticker?** You get an error row (`symbol-not-found`) that is not charged; the other tickers are delivered normally. A ticker with no messages in your time window also returns a free `no-results` row instead of an empty aggregate.

**Do you charge duplicates?** No. A message that mentions two of your tickers arrives through both streams but is delivered and charged once. Duplicates are skipped within a run (and across runs with "Only new since my last run").

**What about personal data?** Only what the author shows publicly on Stocktwits. Emails and phone numbers are removed from the text and from display names; avatars and the lists of who liked or reshared are not collected.

# Actor input Schema

## `outputType` (type: `string`):

Each run returns one row type. Messages: every message of the tickers, users or feeds you choose. Ticker sentiment: one row per ticker computed from its latest messages with a published formula. Daily sentiment history: the Stocktwits daily sentiment index. Trending tickers: the live trending list with fundamentals.

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

Stocktwits tickers such as AAPL, BRK.B, SPY, BTC.X (crypto ends in .X) or RELIANCE.NSE, with or without $. Ticker links (https://stocktwits.com/symbol/AAPL) work too. Leave empty: messages mode reads the trending stream; ticker-sentiment and history modes use the top 10 trending tickers.

## `usernames` (type: `array`):

Public Stocktwits usernames whose messages you want (without @), or profile links. Messages mode only.

## `startUrls` (type: `array`):

Links to single messages (https://stocktwits.com/<user>/message/<id>), ticker pages or profiles. A deleted message returns an error row that is never charged.

## `feeds` (type: `array`):

Stocktwits-wide streams: trending (messages on trending tickers), suggested (popular messages) and charts (messages with a chart).

## `messageFilter` (type: `string`):

Which messages of each ticker stream to read (applied by Stocktwits). Also used for the ticker-sentiment window.

## `sentimentFilter` (type: `string`):

Keep only messages with this author-chosen sentiment tag. Applied by this actor (Stocktwits has no such filter); with filters on, at most 3,000 messages are scanned per ticker, user or feed.

## `onlyPriceTargets` (type: `boolean`):

Keep only messages where the author attached a Stocktwits price prediction (target price, date and direction). They are rare (about 1 in 250 messages), so with this on the actor scans up to 3,000 messages per stream. Applied by this actor.

## `minAuthorFollowers` (type: `integer`):

Keep only messages whose author has at least this many followers. Applied by this actor.

## `postedWithinHours` (type: `integer`):

Only messages from the last N hours. Messages mode: older messages are skipped and the stream stops there. Ticker-sentiment mode: this is the time window of the aggregate (together with "Messages per ticker"). Empty = no time limit.

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

Ticker-sentiment mode: the window size, i.e. the latest N messages that feed each aggregate (empty = 200). Messages mode: at most N messages from each ticker, user or stream (empty = no per-stream limit, only Maximum results).

## `trendingRegion` (type: `string`):

Which Stocktwits trending list to read (trending mode, and the default tickers of the ticker modes).

## `trendingAssetClass` (type: `string`):

Keep only trending tickers of this class. Applied by this actor on the 30-ticker trending list.

## `onlyNewSinceLastRun` (type: `boolean`):

Monitoring mode for schedules: remembers what earlier runs with exactly the same input delivered (in a key-value store named stocktwits-sentiment-monitor in your account) and delivers and charges only new messages. The first run delivers everything.

## `maxItems` (type: `integer`):

Rows to deliver at most (messages, ticker rows, daily rows or trending tickers). Error rows do not count and are never charged.

## `maxConcurrency` (type: `integer`):

Requests in flight at once. Each connection is paced to about 200 requests per minute, below the Stocktwits limit per IP.

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

Optional. The actor already rotates connections when Stocktwits throttles; set a proxy only if you want to use your own.

## Actor input object example

```json
{
  "outputType": "symbol-sentiment",
  "symbols": [
    "TSLA",
    "NVDA",
    "BTC.X"
  ],
  "usernames": [],
  "startUrls": [],
  "feeds": [],
  "messageFilter": "all",
  "sentimentFilter": "any",
  "onlyPriceTargets": false,
  "trendingRegion": "US",
  "trendingAssetClass": "any",
  "onlyNewSinceLastRun": false,
  "maxItems": 20,
  "maxConcurrency": 4
}
```

# Actor output Schema

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

One row per message (or per ticker, per day or per trending ticker, depending on outputType). Error rows, if any, are marked \_type = error and are never charged.

## `runSummary` (type: `string`):

What was delivered and charged, rows removed by your filters, duplicates skipped, pages read and timing.

## `errors` (type: `string`):

Every error of the run in one list (always written, empty when there were none).

# 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 = {
    "outputType": "symbol-sentiment",
    "symbols": [
        "TSLA",
        "NVDA",
        "BTC.X"
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("oswaldocarabano/stocktwits-sentiment-scraper").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 = {
    "outputType": "symbol-sentiment",
    "symbols": [
        "TSLA",
        "NVDA",
        "BTC.X",
    ],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("oswaldocarabano/stocktwits-sentiment-scraper").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 '{
  "outputType": "symbol-sentiment",
  "symbols": [
    "TSLA",
    "NVDA",
    "BTC.X"
  ],
  "maxItems": 20
}' |
apify call oswaldocarabano/stocktwits-sentiment-scraper --silent --output-dataset

```

## MCP server setup

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

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/wk0vMiCKtnGPINfeg/builds/18wgJ0FZ2eeK5TUcr/openapi.json
