Stocktwits Scraper

Track public Stocktwits ticker messages, bullish/bearish sentiment, users, likes, replies, and mentioned cashtags for market monitoring.

Data fields

FieldTypeDescription
symbolstringValue exported as symbol.
messageIdintegerValue exported as messageId.
bodystringValue exported as body.
createdAtstring | nullValue exported as createdAt.
userIdinteger | nullValue exported as userId.
usernamestring | nullValue exported as username.
userNamestring | nullValue exported as userName.
avatarUrlstring | nullValue exported as avatarUrl.

Input preview

symbolsStocktwits symbols *
maxMessagesPerSymbolMessages per symbol
sinceMessageIdSince message ID
continueOnErrorContinue when a symbol fails
beforeMessageIdBefore message ID
includeRawInclude raw message JSON

API and agents

This actor can be run through Apify API, datasets, webhooks, schedules, and the official Apify MCP server.

How this actor works

See example inputs, outputs, API usage, and practical limits before running this actor on Apify.

Open Apify page

Scrape public Stocktwits ticker streams for market sentiment, trader messages, user details, likes, replies, mentioned cashtags, timestamps, and source URLs. Use it to monitor investor discussion around stocks such as AAPL, TSLA, MSFT, or NVDA.

What does Stocktwits Scraper do?

Stocktwits Scraper collects recent public messages from Stocktwits symbol streams and saves clean, analysis-ready dataset rows. It is useful for market research, social listening, sentiment monitoring, watchlist alerts, trading-community analysis, and ticker-level content discovery.

Who is it for?

  • Investors tracking social sentiment around a watchlist.
  • Analysts comparing discussion volume across tickers.
  • Product and content teams monitoring brand or company mentions.
  • Data teams enriching market dashboards with public Stocktwits messages.
  • Researchers studying trader language, bullish/bearish labels, or user engagement.

Input fields

  • symbols — ticker or cashtag symbols to collect, for example AAPL, $TSLA, MSFT, or NVDA.
  • maxMessagesPerSymbol — maximum messages saved for each symbol.
  • sinceMessageId — optional lower message boundary for newer-message collection.
  • beforeMessageId — optional upper message boundary for older-message pagination.
  • continueOnError — keep other symbols running if one symbol fails.
  • includeRaw — add the raw message object to each dataset row.
  • proxyConfiguration — optional Apify or custom proxy settings. Direct fetching is the default; opt in only when your network or source route needs a proxy.

Example output

{
  "symbol": "AAPL",
  "messageId": 123456789,
  "body": "Watching AAPL into earnings.",
  "createdAt": "2026-07-31T20:00:00Z",
  "username": "market_user",
  "sentiment": "bullish",
  "likes": 3,
  "replies": 1,
  "mentionedSymbols": ["AAPL"],
  "sourceUrl": "https://stocktwits.com/market_user/message/123456789"
}

Limits and reliability

The actor fetches public streams directly by default. If your network cannot reach Stocktwits reliably, explicitly opt in to an Apify or custom proxy with proxyConfiguration; the actor never silently escalates to proxy traffic.

The Actor preserves output as it goes. If continueOnError is enabled, one failing ticker does not discard messages already saved for other symbols.

Pagination tips

Use beforeMessageId to page older content when you already know a message boundary. Use sinceMessageId for incremental collection when you only need messages newer than a previous run. For broad monitoring, run the Actor periodically with a saved latest message ID from your previous dataset.

API Usage

Node.js

import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('fetch_cat/stocktwits-scraper').call({
  symbols: ['AAPL', 'TSLA'],
  maxMessagesPerSymbol: 20,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Python

from apify_client import ApifyClient

client = ApifyClient('YOUR_APIFY_TOKEN')
run = client.actor('fetch_cat/stocktwits-scraper').call(run_input={
    'symbols': ['AAPL', 'TSLA'],
    'maxMessagesPerSymbol': 20,
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)

cURL

curl -X POST 'https://api.apify.com/v2/acts/fetch_cat~stocktwits-scraper/runs?token=YOUR_APIFY_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"symbols":["AAPL","TSLA"],"maxMessagesPerSymbol":20}'

MCP

You can run this Actor from Apify MCP-compatible tools by calling fetch_cat/stocktwits-scraper with the same JSON input shown above.

Add the Apify MCP server in Claude Desktop or Claude Code:

claude mcp add apify -- npx -y @apify/actors-mcp-server --actors fetch_cat/stocktwits-scraper

Example MCP server configuration:

{
  "mcpServers": {
    "apify": {
      "command": "npx",
      "args": ["-y", "@apify/actors-mcp-server", "--actors", "fetch_cat/stocktwits-scraper"],
      "env": {
        "APIFY_TOKEN": "YOUR_APIFY_TOKEN"
      }
    }
  }
}

Example prompts:

  • "Run Stocktwits Scraper for AAPL and TSLA with 20 messages each."
  • "Get recent bullish and bearish Stocktwits messages for NVDA."
  • "Collect 50 messages per symbol for my watchlist and summarize common themes."

Use small limits first, inspect the dataset, then increase maxMessagesPerSymbol for production workflows.

Troubleshooting

  • If a direct run fails with HTTP 403 or cannot reach Stocktwits, explicitly configure an Apify or custom proxy and retry.
  • If a ticker returns no rows, confirm the symbol has active public messages on Stocktwits.
  • If you need exact historical continuation, save messageId values from previous runs and use beforeMessageId or sinceMessageId.

Support

If a symbol returns no data or fails repeatedly, retry with Apify Proxy enabled and confirm the ticker is active on Stocktwits. Include your input JSON and run ID when reporting an issue.

Common questions

Questions and answers reused from the canonical actor README.

Does the actor use a proxy by default?

No. It fetches public Stocktwits streams directly by default.

When should I enable a proxy?

Set proxyConfiguration to an Apify or custom proxy only if your network cannot reach Stocktwits reliably. Explicit proxy settings are honored; the actor never silently falls back to proxy traffic.

Does the Actor scrape private content?

No. It collects public symbol-stream messages available without logging into a user account.

Can I scrape many symbols?

Yes, but start with a small watchlist and increase gradually. Cost and runtime scale with the number of symbols and requested messages.