# Stocktwits Sentiment Scraper (`parsebird/stocktwits-sentiment-scraper`) Actor

Extract Stocktwits trending stock symbols and market messages with computed sentiment scores. Track bullish/bearish chatter for any trending ticker. Export JSON, CSV, Excel via API.

- **URL**: https://apify.com/parsebird/stocktwits-sentiment-scraper.md
- **Developed by:** [ParseBird](https://apify.com/parsebird) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.69 / 1,000 records

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 - Trending Symbols & Messages

Stocktwits Sentiment Scraper pulls the current [Stocktwits](https://stocktwits.com) trending stock symbols and the market messages posted about them, and computes a **sentimentScore** and **sentimentLabel** (positive, neutral, or negative) for every message it collects.

<table><tr>
<td style="border-left:4px solid #1C1917;padding:12px 16px;font-weight:600">Ranks the live Stocktwits trending-symbols list, pulls market messages from each trending symbol's stream, and scores every message's sentiment — no Stocktwits account or API key required.</td>
</tr></table>

##### Copy to your AI assistant

Copy this block into ChatGPT, Claude, Cursor, or any LLM to start using this actor.

```
parsebird/stocktwits-sentiment-scraper on Apify. Call: ApifyClient("TOKEN").actor("parsebird/stocktwits-sentiment-scraper").call(run_input={"includeTrendingSymbols":true,"maxSymbols":20,"includeNews":true,"maxNewsItems":20,"computeSentiment":true}), then client.dataset(run["defaultDatasetId"]).list_items().items for results. Key inputs: includeTrendingSymbols (boolean, default true, saves current trending-symbol records), maxSymbols (integer 1-200, default 20, Stocktwits ranks up to ~30 as trending), includeNews (boolean, default true, collects market messages from trending symbol streams — works even when includeTrendingSymbols is false), maxNewsItems (integer 1-200, default 20), computeSentiment (boolean, default true, adds sentimentScore/sentimentLabel per message), timeoutSecs (integer, default 30), maxRetries (integer, default 3), proxyConfiguration (object, optional Apify Proxy override). Output records have a "type" field of trending_symbol, news_message, or error: trending_symbol has rank/symbol/title/id/watchlist_count/raw; news_message has messageId/createdAt/symbol/body/user/likes/sentimentScore/sentimentLabel/raw; error has endpoint/error. A run summary is saved to the key-value store under OUTPUT. Full actor spec: GET https://api.apify.com/v2/acts/parsebird~stocktwits-sentiment-scraper (Bearer TOKEN). Get token: https://console.apify.com/account/integrations
```

### What is Stocktwits Sentiment Scraper?

Stocktwits Sentiment Scraper is an [Apify Actor](https://apify.com/actors) that acts as a **Stocktwits API alternative** for anyone tracking retail trader chatter. Stocktwits doesn't offer a public, documented API, so this actor calls the same endpoints [stocktwits.com](https://stocktwits.com) itself uses to render its trending-symbols page and per-symbol message streams, and returns the results as clean structured rows with sentiment already computed.

Use it as a **Stocktwits scraper**, a **stock sentiment API**, or a scheduled data feed for market-chatter monitoring, trading dashboards, and research pipelines. Results download as JSON, CSV, Excel, XML, or HTML, or you can pull them programmatically through the [Apify API](https://docs.apify.com/api/v2).

### What can Stocktwits Sentiment Scraper do?

- 📈 Collect the **current Stocktwits trending symbols**, ranked, with watchlist counts and company titles
- 💬 Pull **market messages** from each trending symbol's live message stream, with pagination to fill larger requests
- 🧮 Compute a **sentimentScore** (integer) and **sentimentLabel** (`positive` / `neutral` / `negative`) for every message
- 🔀 Collect messages from trending symbols even when you don't need the trending-symbol records themselves
- ⚙️ Configurable request timeout and retry count per source request, plus an optional Apify Proxy override for reliability
- 🕒 Run on demand, schedule recurring runs, or connect results to Apify [integrations](https://apify.com/integrations) like Google Sheets, Zapier, Make, and webhooks
- 📤 Export data in JSON, CSV, Excel, XML, RSS, or HTML from the Apify dataset

### What data can you extract from Stocktwits?

| Field | Record type | Description |
|-------|-------------|-------------|
| `rank` / `symbol` / `title` | trending\_symbol | Position and identity of a trending ticker |
| `watchlist_count` | trending\_symbol | Number of Stocktwits users watching the symbol |
| `messageId` / `createdAt` | news\_message | Message ID and original publication timestamp |
| `body` | news\_message | The market message text (HTML entities decoded) |
| `user` | news\_message | Author `id` and `username` when available |
| `likes` | news\_message | Message like count |
| `sentimentScore` / `sentimentLabel` | news\_message | Computed sentiment, or `null` when disabled or the message has no text |
| `sourceUrl` | all | The Stocktwits API endpoint the record came from |
| `raw` | all | A trimmed copy of the original source object |

### Input parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `includeTrendingSymbols` | boolean | No | `true` | Save records for the current Stocktwits trending symbols |
| `maxSymbols` | integer | No | `20` | Maximum number of trending symbols to save, from 1 to 200 |
| `includeNews` | boolean | No | `true` | Collect market messages from the current trending symbol streams |
| `maxNewsItems` | integer | No | `20` | Maximum number of market messages to save, from 1 to 200 |
| `computeSentiment` | boolean | No | `true` | Calculate `sentimentScore` and `sentimentLabel` for messages |
| `timeoutSecs` | integer | No | `30` | Maximum wait time for each source request, from 1 to 300 seconds |
| `maxRetries` | integer | No | `3` | Number of attempts for a source request, from 1 to 10 |
| `proxyConfiguration` | object | No | — | Optional Apify Proxy configuration for collection reliability |

If both `includeTrendingSymbols` and `includeNews` are `false`, the Actor completes without collecting either dataset category. If `includeNews` is enabled, the Actor can still use current trending symbols to find market messages even when trending-symbol records are not saved.

**Basic collection:**

```json
{
  "includeTrendingSymbols": true,
  "maxSymbols": 20,
  "includeNews": true,
  "maxNewsItems": 20,
  "computeSentiment": true
}
```

**Trending symbols only:**

```json
{
  "includeTrendingSymbols": true,
  "maxSymbols": 50,
  "includeNews": false
}
```

**Message collection without sentiment:**

```json
{
  "includeTrendingSymbols": false,
  "includeNews": true,
  "maxNewsItems": 100,
  "computeSentiment": false
}
```

### Output example

`trending_symbol`:

```json
{
  "type": "trending_symbol",
  "fetchedAt": "2026-09-16T10:47:43.000Z",
  "rank": 1,
  "symbol": "RIG",
  "title": "Transocean Ltd",
  "id": 7029,
  "watchlist_count": 25068,
  "sourceUrl": "https://api.stocktwits.com/api/2/trending/symbols.json",
  "raw": {
    "symbol": "RIG",
    "exchange": "NYSE",
    "sector": "IndustrialServices",
    "trending_score": 0.352577
  }
}
```

`news_message`:

```json
{
  "type": "news_message",
  "fetchedAt": "2026-08-02T08:30:00.000Z",
  "messageId": 123456789,
  "createdAt": "2026-08-02T08:28:41Z",
  "symbol": "NVDA",
  "body": "Investors are watching the next earnings update for guidance on data-center demand.",
  "user": {
    "id": 987654,
    "username": "marketwatcher"
  },
  "likes": 12,
  "sentimentScore": 2,
  "sentimentLabel": "positive",
  "sourceUrl": "https://api.stocktwits.com/api/2/streams/symbol/NVDA.json",
  "raw": {
    "id": 123456789,
    "body": "Investors are watching the next earnings update for guidance on data-center demand."
  }
}
```

If a collection source fails after its configured `maxRetries` attempts, the dataset receives an `error` record instead, and a run summary is saved to the key-value store under `OUTPUT` with item counts and an `errors` array.

Download in JSON, HTML, CSV, or Excel from the dataset page, or fetch rows programmatically through the API.

### How to scrape Stocktwits sentiment data

1. Open Stocktwits Sentiment Scraper on Apify and click **Try for free**.
2. Leave `includeTrendingSymbols` and `includeNews` on to collect both trending symbols and their message streams, or turn one off.
3. Adjust `maxSymbols` and `maxNewsItems` for the volume you need, and set `computeSentiment` if you want scored messages.
4. Start the run and wait for the dataset to populate — most runs finish in seconds.
5. Download results as JSON, CSV, Excel, HTML, XML, or RSS, or open them straight in Google Sheets.
6. Automate it with [Apify scheduling](https://docs.apify.com/platform/schedules), [integrations](https://apify.com/integrations), or the [Apify API](https://docs.apify.com/api/v2).

### How to use the Stocktwits API in Python

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run = client.actor("parsebird/stocktwits-sentiment-scraper").call(run_input={
    "includeTrendingSymbols": True,
    "maxSymbols": 20,
    "includeNews": True,
    "maxNewsItems": 20,
    "computeSentiment": True,
})

items = client.dataset(run["defaultDatasetId"]).list_items().items
print(items[:2])
```

### How to use the Stocktwits API in JavaScript

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

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const run = await client.actor('parsebird/stocktwits-sentiment-scraper').call({
    includeTrendingSymbols: true,
    maxSymbols: 20,
    includeNews: true,
    maxNewsItems: 20,
    computeSentiment: true,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### Use cases

- **Trading dashboards** — Feed the current trending-symbols list and message sentiment into a live dashboard
- **Sentiment monitoring** — Track how bullish or bearish chatter shifts for specific tickers over time
- **Market research** — Compare which symbols are trending on Stocktwits against your own watchlist
- **Alerting** — Schedule recurring runs and trigger alerts when sentiment for a tracked symbol turns negative
- **Dataset building** — Build a labeled dataset of retail trader messages and sentiment for further analysis

### How it works

1. Calls Stocktwits' trending-symbols endpoint to get the current ranked list of trending tickers
2. Saves each trending symbol as a `trending_symbol` record when `includeTrendingSymbols` is enabled
3. Calls the per-symbol message-stream endpoint for each trending symbol, paginating as needed to fill `maxNewsItems`
4. Decodes and cleans each message body, then scores it for sentiment using a lexicon-based scorer (boosted by Stocktwits' own Bullish/Bearish tag when a user set one)
5. Pushes records to the dataset and stops early once the configured limits or your spending limit are reached

### How much does it cost to scrape Stocktwits?

Stocktwits Sentiment Scraper uses pay-per-event pricing — you pay per trending-symbol or market-message record saved to the dataset, not per API call made internally.

| Event | Price per event | Price per 1,000 |
|-------|-----------------|-----------------|
| `record-collected` | $0.00099 (Free) / $0.00089 (Bronze) / $0.00079 (Silver) / $0.00069 (Gold) | **$0.99 / $0.89 / $0.79 / $0.69** |

A basic-collection run (20 trending symbols + 20 messages) costs under $0.04 on the Free plan. `error` records are not charged.

### Is it legal to scrape Stocktwits data?

Stocktwits Sentiment Scraper extracts publicly available trending-symbol rankings and market messages from the same endpoints Stocktwits' own website uses to render its pages. Scraping publicly accessible data is generally lawful, but you're responsible for how you use the results — always review [Stocktwits' Terms of Service](https://stocktwits.com/terms) and Apify's guide on [the legality of web scraping](https://blog.apify.com/is-web-scraping-legal/) before running large or automated workloads. This actor does not provide investment advice, and its sentiment score is a lexicon-based heuristic, not a financial signal.

### Related ParseBird finance and market data scrapers

| Actor | Best for |
|-------|----------|
| [Yahoo Finance Scraper](https://apify.com/parsebird/yahoo-finance-scraper) | Live quotes, historical OHLCV prices, fundamentals, options, and news |
| [DexScreener Crypto Scraper](https://apify.com/parsebird/dexscreener-crypto-scraper) | Real-time DEX token prices, liquidity, and volume |
| [Congress Stock Trades & Financial Disclosures](https://apify.com/parsebird/congress-stock-trades-scraper) | U.S. congressional stock trade disclosures |

### FAQ

**Do I need a Stocktwits account or API key?**
No. Stocktwits doesn't offer a public, documented API. This actor calls the same endpoints the Stocktwits website itself uses, so no credentials are required.

**How is `sentimentScore` calculated?**
The actor runs a lexicon-based scorer over each message body, counting bullish vs. bearish market terms. When a Stocktwits user tags their own message as Bullish or Bearish, that tag boosts the score. The result is a heuristic signal, not investment advice.

**Why did I get fewer trending symbols than my `maxSymbols` value?**
Stocktwits typically ranks up to about 30 symbols as trending at any given time. Setting `maxSymbols` above that just means every currently trending symbol gets saved.

**Can `includeNews` collect messages without saving trending symbols?**
Yes. Set `includeTrendingSymbols` to `false` and `includeNews` to `true` — the actor still uses the live trending list internally to find symbols to pull messages from, it just doesn't save `trending_symbol` records.

**Can I schedule recurring runs?**
Yes. Use [Apify scheduling](https://docs.apify.com/platform/schedules) to run hourly, daily, or at any interval, then connect the dataset to integrations or webhooks.

**Does this actor require a proxy?**
No. Stocktwits' public API doesn't require a proxy for normal use. The `proxyConfiguration` input is available if you want to route requests through Apify Proxy for extra reliability.

**How do I report a problem or request a field?**
Open an issue from the Actor page in Apify Console and include the run ID and input used.

# Changelog

This Actor's version history is a separate document: https://apify.com/parsebird/stocktwits-sentiment-scraper/changelog.md

# Actor input Schema

## `includeTrendingSymbols` (type: `boolean`):

Save records for the current Stocktwits trending symbols.

## `maxSymbols` (type: `integer`):

Maximum number of trending symbols to save. Stocktwits typically ranks up to 30 symbols as trending at any time.

## `includeNews` (type: `boolean`):

Collect market messages from the current trending symbol streams.

## `maxNewsItems` (type: `integer`):

Maximum number of market messages to save.

## `computeSentiment` (type: `boolean`):

Calculate a sentimentScore and sentimentLabel for each collected message.

## `timeoutSecs` (type: `integer`):

Maximum wait time for each Stocktwits source request.

## `maxRetries` (type: `integer`):

Number of attempts for a source request before it is recorded as failed.

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

Optional Apify Proxy configuration for collection reliability. Stocktwits' public API does not require a proxy, so this is disabled by default.

## Actor input object example

```json
{
  "includeTrendingSymbols": true,
  "maxSymbols": 20,
  "includeNews": true,
  "maxNewsItems": 20,
  "computeSentiment": true,
  "timeoutSecs": 30,
  "maxRetries": 3,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (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 = {
    "includeTrendingSymbols": true,
    "maxSymbols": 20,
    "includeNews": true,
    "maxNewsItems": 20,
    "computeSentiment": true,
    "timeoutSecs": 30,
    "maxRetries": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("parsebird/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 = {
    "includeTrendingSymbols": True,
    "maxSymbols": 20,
    "includeNews": True,
    "maxNewsItems": 20,
    "computeSentiment": True,
    "timeoutSecs": 30,
    "maxRetries": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("parsebird/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 '{
  "includeTrendingSymbols": true,
  "maxSymbols": 20,
  "includeNews": true,
  "maxNewsItems": 20,
  "computeSentiment": true,
  "timeoutSecs": 30,
  "maxRetries": 3
}' |
apify call parsebird/stocktwits-sentiment-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parsebird/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/RW9Xp9OUd20FdFZzE/builds/pFRaIyzAL9Bs3cxOd/openapi.json
