# Stocktwits Scraper (`nanodata/stocktwits-scraper`) Actor

Collect trending symbols and public messages from Stocktwits: trend scores, sectors and watchlist counts, plus message text, sentiment, likes and cashtags per symbol. Pay per row.

- **URL**: https://apify.com/nanodata/stocktwits-scraper.md
- **Developed by:** [nanodata](https://apify.com/nanodata) (community)
- **Categories:** Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 row delivereds

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

## Stocktwits Scraper

Collect trending symbols and public messages from Stocktwits. Pick one of two modes: the list of trending symbols, or the messages written about symbols you choose. You pay per row delivered.

The data comes from the public [Stocktwits](https://stocktwits.com/) data feed. No account and no API key are needed.

### What you get

Every row has a `kind` field, either `symbol` or `message`, and an `id`. A row is unique by `kind` and `id`.

#### Symbol rows (mode `trendingSymbols`)

One row per trending symbol, with every public symbol field the source shows:

- `id`, `url`, `symbol`, `symbolMic`, `symbolDisplay`, `title`
- `exchange`, `region`, `instrumentClass`, `sector`, `industry`, `logoUrl`, `aliases`
- `watchlistCount`: how many watchlists hold the symbol
- `trending`, `trendingScore`, `rank`, `trendRanks`: the trend position overall and within region, exchange and class
- `trendSummary` and `trendSummaryAt`: the short text the source shows on why the symbol trends
- `cusip`, `isin`, `externalId`, `tradeStatus`, `hasPricing`, `liveEvent`, `features`, `earningsId`, `earningsCta`, `shouldSeoIndex`
- `fundamentals`: the company figures the source lists, such as market cap, PE ratio, EPS, 52 week range, dividend and share counts
- `scrapedAt`

#### Message rows (mode `symbolStreams`)

One row per public message:

- `id`, `url`, `body`, `createdAt`
- `authorUsername`, `authorName`, `authorId`, `authorOfficial`, `authorFollowers`: the public author details shown on the message
- `sentiment`: `Bullish`, `Bearish` or null when the poster set none
- `likes`, `reshares`, `replies`, `isReply`, `parentMessageId`, `inReplyToMessageId`, `reshareOfId`
- `cashtags`: the cashtags written in the text, for example `$AAPL`
- `symbols`: the symbols the message mentions, each with id, name, exchange, class, watchlist count and url
- `prices`: the price of each mentioned symbol when the message was posted
- `links`: shared links with title, description, image and the site they point to
- `mediaUrls`: image, chart and GIF addresses
- `sourceApp`: the app the message was posted from
- `collectedForSymbol`, `collectedForTitle`, `collectedForWatchlistCount`: the symbol stream the message was read from, with its name and watchlist count
- `scrapedAt`

A value the source does not show is null. Lists with nothing in them are empty.

### Typical uses

- Track which tickers and coins the crowd talks about today
- Measure the share of Bullish and Bearish messages for a symbol
- Feed a dashboard, a research sheet or a model with fresh messages and cashtags
- Watch sectors and watchlist counts of trending symbols over time

### Pricing

You pay per row delivered, plus a small fee for each run.

| Event | Name | Price |
|---|---|---|
| Run start (charged once, together with the first delivered row) | `actor-start` | $0.001 per run |
| One row, symbol or message | `result-row` | $0.002 per row ($2.00 per 1,000) |

A run that finds nothing is not charged. If you set a maximum cost for the run, the actor stops cleanly once the next row would go over it.

**New to Apify?** Every account gets a $5 free monthly platform credit, enough for a first test run before you pay anything.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | choice | `trendingSymbols` | `trendingSymbols` or `symbolStreams` |
| `symbols` | list | empty | Tickers for `symbolStreams`, for example `AAPL`, `TSLA`, `BRK.B`, `BTC.X`. A comma separated text also works |
| `maxItems` | number | 100 | Maximum rows in total, up to 10,000 |

How it works:

- `trendingSymbols` returns the symbols the source lists as trending right now, usually about 30.
- `symbolStreams` reads the newest messages of each symbol, 30 per page, and goes back page by page until `maxItems` is reached or the source has no more. With several symbols it reads one page of each in turn, so a small `maxItems` still covers every symbol. A message that appears in two symbol streams is delivered once.
- If you give `symbols` and no `mode`, the actor uses `symbolStreams`.
- Number fields also accept numbers written as text, for example `"50"`.
- Started with no input, the actor returns the trending symbols.

#### Example: trending symbols

```json
{
  "mode": "trendingSymbols"
}
```

#### Example: messages for two symbols

```json
{
  "mode": "symbolStreams",
  "symbols": ["AAPL", "TSLA"],
  "maxItems": 100
}
```

### Output sample

```json
{
  "kind": "message",
  "id": 668488893,
  "url": "https://stocktwits.com/ShadowBanningIsBad/message/668488893",
  "authorUsername": "ShadowBanningIsBad",
  "authorName": "Sofa King",
  "authorId": 9339333,
  "authorOfficial": false,
  "authorFollowers": 474,
  "body": "$AAPL holding the 50 day line, adding on dips",
  "createdAt": "2026-11-07T14:51:02Z",
  "sentiment": "Bullish",
  "likes": 2,
  "reshares": 0,
  "replies": null,
  "isReply": false,
  "parentMessageId": null,
  "inReplyToMessageId": null,
  "reshareOfId": null,
  "cashtags": ["$AAPL"],
  "symbols": [{ "id": 686, "symbol": "AAPL", "title": "Apple Inc", "exchange": "NASDAQ", "instrumentClass": "Stock", "watchlistCount": 1000633, "sentimentChange": null, "volumeChange": null, "url": "https://stocktwits.com/symbol/AAPL" }],
  "prices": [{ "symbol": "AAPL", "price": 271.5 }],
  "links": [],
  "mediaUrls": [],
  "sourceApp": "StockTwits for iOS",
  "collectedForSymbol": "AAPL",
  "collectedForTitle": "Apple Inc",
  "collectedForWatchlistCount": 1000633,
  "scrapedAt": "2026-11-07T15:00:00Z"
}
```

### Limitations

- Each message row includes the author's public username, display name, id, official flag and follower count as shown on the public message. It has no profile pictures, bios or other profile details. `url` is null when the source shows no username.
- The actor reads what the source shows publicly. The newest messages come first, and the source decides how far back a stream goes. Very old messages may not be reachable.
- `likes` and `reshares` are counts at `scrapedAt` and change over time. A message without likes shows 0.
- `sentiment` is only set when the poster chose Bullish or Bearish. Most messages have none.
- `replies` is only given for messages that belong to a conversation.
- `url` values are built from the ids and point to the public page of the message or symbol. The actor does not open those pages.
- `fundamentals` holds the figures the source lists, as it lists them. Funds and coins often have few or none.
- `trendingSymbols` returns the current list only. Run it on a schedule to build a history.
- The source limits how often it answers. If it keeps refusing, the run stops with a status that says so, and only delivered rows are charged.

### FAQ

**Do I need a Stocktwits account?**
No. The actor reads public data.

**Why does a symbol give no rows?**
The source does not know the ticker. The run status names it. Use the ticker as written on Stocktwits, for example `BRK.B` or `BTC.X` for a coin.

**Why did I get fewer rows than `maxItems`?**
The source held fewer messages for your selection, or the maximum cost you set for the run was reached. The run status message says which.

**Why does a message show only one symbol in `collectedForSymbol`?**
A message that appears in the streams of two symbols is delivered once, under the first symbol you listed. The `symbols` field still lists every symbol the message mentions.

**Can I get the author of a message?**
Yes. Each message row includes the author's public username, display name, id, official flag and follower count as shown on the public message. It has no profile pictures, bios or other profile details.

### Use with AI agents (MCP)

Connect this actor to any MCP-compatible AI client, such as Claude Desktop, Cursor, VS Code, LangChain or LlamaIndex.

**MCP server URL:**

```
https://mcp.apify.com?tools=nanodata/stocktwits-scraper
```

**Example prompt once connected:**

> "Use `stocktwits-scraper` to list the 20 trending symbols on Stocktwits with their trending score. Return results as a table."

### Related Actors

- [Yahoo Finance Markets Scraper](https://apify.com/santamaria-automations/yahoo-finance-markets-scraper): Read the public Yahoo Finance market lists: active, gainers, losers, trending, 52-week gainers and losers, ETFs and crypto.
- [Kalshi Markets Scraper](https://apify.com/nanodata/kalshi-markets-scraper): Collect Kalshi prediction markets: prices, volume, open interest, rules, close times and category.
- [Polymarket Markets Scraper](https://apify.com/nanodata/polymarket-markets-scraper): Get Polymarket prediction markets with outcome prices, volume, liquidity, bid and ask, dates, tags and event data.

### Support

Found a problem or need a field added? Open an issue on the [Issues tab](https://apify.com/nanodata/stocktwits-scraper/issues). We usually reply within one business day. You can also email contact@nanoscrape.com.

# Actor input Schema

## `mode` (type: `string`):

trendingSymbols returns the trending symbols. symbolStreams returns the messages of the symbols you list. Default trendingSymbols.

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

Tickers for the mode symbolStreams, for example AAPL, TSLA, BRK.B or BTC.X. One entry per line. A comma separated text also works.

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

Maximum number of rows in total, shared between the symbols. Default 100.

## Actor input object example

```json
{
  "mode": "trendingSymbols",
  "maxItems": 100
}
```

# Actor output Schema

## `defaultDataset` (type: `string`):

One row per symbol or message

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("nanodata/stocktwits-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("nanodata/stocktwits-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 '{}' |
apify call nanodata/stocktwits-scraper --silent --output-dataset

```

## MCP server setup

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