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

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

- **URL**: https://apify.com/fetch_cat/stocktwits-scraper.md
- **Developed by:** [Fetch Cat](https://apify.com/fetch_cat) (community)
- **Categories:** Social media, News, Business
- **Features:** Limited permissions
- **Stats:** 15 total users, 6 monthly users, 99.5% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.03 / 1,000 message scrapeds

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 Scraper exports public ticker-stream messages with text, author details, bullish or bearish labels, engagement counts and source links. Use the Stocktwits data in watchlist research, market-discussion dashboards or your own analysis workflow.

It collects messages for known ticker symbols. It does not search company names, predict prices or calculate sentiment from message text.

### Quick start

Enter a small watchlist in **Stocktwits symbols**, choose a message limit and click **Start**. Open the dataset when the run finishes.

```json
{
  "symbols": ["AAPL", "TSLA"],
  "maxMessagesPerSymbol": 20
}
```

Use Stocktwits ticker symbols, not page URLs. Available public history can be shorter than the requested limit.

Prefer a video guide? This short Apify walkthrough shows you how to set up and run an Actor. It uses a different Actor, but the setup steps are the same.

https://youtu.be/1OW8gOqlZbY?t=25

### Ready-to-run examples

Choose an example to start with a preconfigured input:

- [Track Stocktwits sentiment for AAPL, TSLA, NVDA, and MSFT](https://apify.com/fetch_cat/stocktwits-scraper/examples/track-tech-stocktwits-sentiment) — Collect up to 25 recent messages per ticker with the source's sentiment labels.
- [Export Stocktwits messages for BTC, ETH, and COIN](https://apify.com/fetch_cat/stocktwits-scraper/examples/crypto-stocktwits-message-export) — Collect up to 20 messages each for BTC.X, ETH.X, COIN and MSTR.

### What you get

- **Message-level records:** cleaned message text, IDs, timestamps and direct links.
- **Public author details:** available user IDs, handles, display names and avatars.
- **Source sentiment and engagement:** bullish/bearish labels where supplied, likes and replies.
- **Cashtags and optional original JSON:** mentioned symbols alongside normalized fields.
- **Collection boundaries:** message-ID inputs for newer or older content.

### Who is it for?

- **Market researchers** comparing public discussions across a watchlist.
- **Data teams** combining messages with market data or news.
- **Social-listening teams** reviewing company mentions and recurring themes.
- **Researchers** studying trader language and source-provided sentiment labels.

### Input settings

| Setting | API key | Meaning |
| --- | --- | --- |
| Stocktwits symbols | `symbols` | Required list, such as `AAPL`, `$TSLA` or `BTC.X`. |
| Messages per symbol | `maxMessagesPerSymbol` | Maximum saved per ticker, 1–1,000. Default 20. |
| Since message ID | `sinceMessageId` | Request messages newer than a known ID, when supported. |
| Continue when a symbol fails | `continueOnError` | Try other symbols after a source error. Default false. |
| Before message ID | `beforeMessageId` | Begin before a known message ID for older content. |
| Include raw message JSON | `includeRaw` | Add the original message object. Default false. |
| Proxy configuration | `proxyConfiguration` | Optional explicit connection settings. Disabled by default. |

Symbols are trimmed, uppercased and deduplicated. A leading `$` is removed. Use letters, numbers, dots, hyphens or underscores, up to 20 characters.

#### Collect more messages or original JSON

```json
{
  "symbols": ["NVDA"],
  "maxMessagesPerSymbol": 100,
  "includeRaw": true
}
```

#### Continue across a watchlist

```json
{
  "symbols": ["AAPL", "MSFT", "TSLA"],
  "maxMessagesPerSymbol": 50,
  "continueOnError": true
}
```

Use a saved message ID with `sinceMessageId` for newer-message collection or `beforeMessageId` for older content. These boundaries apply to every requested symbol. Use separate runs when each symbol needs a different boundary.

### Output data

Each dataset row represents one public message from the requested symbol stream.

| Fields | Meaning |
| --- | --- |
| `symbol`, `messageId` | Requested normalized symbol and message identifier. |
| `body`, `createdAt` | Cleaned text and available timestamp. |
| `userId`, `username`, `userName`, `avatarUrl` | Available public author details. Missing values are null. |
| `sentiment` | Source label: `bullish`, `bearish` or null. |
| `likes`, `replies` | Engagement counts, defaulting to zero when absent. |
| `mentionedSymbols` | List of mentioned ticker symbols. |
| `sourceUrl` | Message link derived from the author handle and ID. |
| `raw` | Original message JSON, only when requested. |

Illustrative shape only, not a collected message:

```json
{
  "symbol": "AAPL",
  "messageId": 1,
  "body": "Illustrative message text",
  "createdAt": null,
  "userId": null,
  "username": null,
  "userName": null,
  "avatarUrl": null,
  "sentiment": null,
  "likes": 0,
  "replies": 0,
  "mentionedSymbols": ["AAPL"],
  "sourceUrl": "https://stocktwits.com/message/message/1"
}
```

The **Run summary** output links to `RUN_SUMMARY`, which reports saved-message totals, completed, failed and pending symbols and the run status. A partial run can have useful dataset rows without completing the entire watchlist. `PENDING_WORK`, when present, supports recovery after an interrupted collection.

#### Download your results

Open your run's dataset, choose **Export** and select JSON, CSV or Excel. JSON keeps nested fields together. CSV and Excel are useful when you want to review the records in a spreadsheet.

See [Apify's download and export guide](https://docs.apify.com/storage/dataset#apify-console) for the available formats and field options.

### Pricing

This Actor uses pay-per-event pricing. `run-started` is charged once after input validation and connection setup, including runs that later return no matching messages.

`message-scraped` is charged for each message saved to the dataset. Empty streams and summary records do not create message-result charges. A message appearing in more than one requested symbol stream can produce a row for each stream.

See the [live Pricing tab](https://apify.com/fetch_cat/stocktwits-scraper/pricing) for current rates and discounts.

### Tips for best results

- **Start with a small watchlist.** Check a few tickers before expanding the collection.
- **Keep message limits focused.** The maximum is an upper bound, not a promise of available history.
- **Save message IDs.** Use them as boundaries for later collections and deduplicate in your workflow.
- **Inspect the run summary.** Partial output may omit failed or pending symbols.
- **Request raw JSON only when useful.** Normalized fields are easier to use in spreadsheets.

### Limits and caveats

Only public symbol streams are supported. Private content, account inboxes, user-profile streams, trending discovery and full historical archives are not included. Availability depends on Stocktwits and can change.

Sentiment is the label supplied with a message, not a new AI assessment. An unlabeled message has null sentiment. A generated source link may not resolve when the author handle is unavailable or a post is removed.

A valid stream with no matching messages completes with an empty dataset. An explicit Stocktwits “Symbol not found” response also completes without message rows, with a warning and a per-symbol reason in `RUN_SUMMARY.unavailableSymbols`. Other symbols are still collected, regardless of `continueOnError`. This does not treat blocking, unknown responses or request failures as empty results. Request failures with no saved messages can fail the run. When a later source error occurs with `continueOnError` disabled, previously saved rows remain available and remaining work is recorded. Enabling it lets other symbols continue, but does not guarantee complete results.

This is an independent tool and is not affiliated with Stocktwits. Messages are discussion data, not investment advice.

### Automation and integrations

#### Save your settings for next time

Once you have an input that works for you, [save it as an Apify task](https://docs.apify.com/actors/running/tasks). This keeps your settings together so you can use them again without filling in the form from scratch.

#### Run on a schedule

Need fresh results regularly? You can [schedule the Actor or a saved task](https://docs.apify.com/actors/running/schedules) to run at a time that suits you.

Each scheduled run collects the data again. If you want to compare results or highlight changes, add that step in your own workflow.

#### Send results to your other tools

Use **n8n, Make or Zapier** to connect this scraper to the rest of your workflow. For example, you could pass its results to an AI assistant or add records to a spreadsheet. Follow the [Apify integration guides](https://docs.apify.com/integrations) for your chosen tool.

For a custom connection, an [Apify webhook](https://docs.apify.com/integrations/webhooks) can notify your app when a run finishes or fails. Your app can then fetch the results or handle the failure.

### API usage

Want to collect this data from your own app or automation? The examples below send input to the scraper and show how to collect its results.

The Node.js and Python examples wait for the run to finish before reading its results. The cURL example starts the run and returns its details. Wait for that run to finish, then use its `defaultDatasetId` to fetch the results.

For setup instructions, see Apify's [JavaScript client guide](https://docs.apify.com/api/client/js), [Python client guide](https://docs.apify.com/api/client/python) and [Actor runs API reference](https://docs.apify.com/api/v2/acts-runs-post).

#### cURL

```bash
curl -X POST 'https://api.apify.com/v2/acts/fetch_cat~stocktwits-scraper/runs' \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"symbols":["AAPL","TSLA"],"maxMessagesPerSymbol":20}'
```

#### Node.js

```javascript
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

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ['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)
```

### MCP and AI agents

You can ask your AI assistant to collect data with **Stocktwits Scraper** and help you work with the results. The scraper returns the data, and your assistant can then summarize it, compare records or prepare notes.

Connect your assistant through the [Apify MCP server](https://mcp.apify.com/). MCP gives your assistant a way to find this scraper, run it and read the results. Follow the [official setup and sign-in guide](https://docs.apify.com/mcp) for your app.

#### Easier setup with an Apify plugin

If you use a supported coding assistant, the [official Apify plugin](https://docs.apify.com/agents/plugins) can set up the connection for you. It connects your assistant to Apify and includes instructions for common tasks. Follow the guide for your particular app.

#### Use Apify AI in Console

Prefer to keep everything in Apify? Open [Apify AI in Console](https://docs.apify.com/account/apify-ai) and ask it to find Fetch Cat's **Stocktwits Scraper**. You can describe the data you want and ask questions about the results.

Apify AI is currently in beta. It asks for confirmation before starting an Actor, and normal run charges apply.

#### Choose your assistant

- **Claude and Claude Code (Anthropic):** [Apify setup guide](https://docs.apify.com/integrations/claude).
- **ChatGPT and Codex (OpenAI):** [Apify setup guides](https://docs.apify.com/integrations/openai).
- **Grok Bot (xAI):** [Apify plugin guide](https://docs.apify.com/integrations/grok-bot).
- **Gemini CLI (Google):** [MCP server setup guide](https://geminicli.com/docs/tools/mcp-server/). Use the server URL below with the HTTP configuration supported by Gemini CLI.

#### Connect just this scraper

To keep your setup focused on this scraper, add this server configuration to a compatible MCP client:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=fetch_cat/stocktwits-scraper"
    }
  }
}
```

Sign in to Apify when your client asks. If your client uses a Bearer token instead, follow its setup guide and keep the token in its secure configuration. Configuration formats vary by app, so use the linked guide if your client needs a different format.

#### Use Apify's general server

Already connected to the general Apify MCP server at `https://mcp.apify.com`? You can use it to find this scraper without adding another server. Ask your assistant to use **Stocktwits Scraper** by Fetch Cat, or give it the identifier `fetch_cat/stocktwits-scraper`.

Your assistant can check the available settings and retrieve the results from the returned run. If the run is still working, it should follow that run rather than start it again. Both connection options use Apify's hosted service.

#### Example requests

- "Get recent public messages about Apple and Tesla, then summarize the main discussion themes."
- "Collect NVIDIA's latest ticker messages and compare the bullish and bearish labels supplied by the authors."
- "Collect recent messages for Bitcoin and Ethereum using their Stocktwits symbols, then prepare a table of message links and engagement counts."

Normal Apify charges apply. Check the [live Pricing tab](https://apify.com/fetch_cat/stocktwits-scraper/pricing) before asking your assistant to run a larger batch.

### Pay with x402

If your AI agent has a funded wallet, it can pay for Apify usage through [x402](https://docs.apify.com/integrations/x402). This experimental option lets an agent use Apify without a conventional account.

[Apify AGI](https://agi.apify.com/) provides a prepaid API token with a spending cap after payment. Your agent can use that token to run this scraper through the Apify API or an authenticated MCP connection.

Some MCP setups also support paying for each request directly. That is a different payment option, so check the official guide for its availability.

Follow the official guide for wallet setup, supported payment options and current terms. Apify handles the payments. Keep wallet keys and payment tokens in your agent's secure configuration.

#### Other ways for agents to pay

Apify also supports **MPP** for prepaid access through AGI and **Skyfire** for eligible Actors. If your agent already uses one of these, see the [agentic payment guide](https://docs.apify.com/agents/payments) to choose the right setup.

### FAQ

#### Can I use this as a Stocktwits API alternative?

You can call the Actor through Apify's API to collect public ticker-stream messages. It is not an official Stocktwits API and does not cover every Stocktwits feature.

#### Can I export Stocktwits data to CSV or JSON?

Yes. Export the dataset as JSON, CSV or Excel, or fetch it through the Apify API. JSON is best when you include nested raw messages.

#### Does it calculate market sentiment?

No. It returns the bullish or bearish label already attached to a message when one is supplied. You can calculate aggregates or perform your own text analysis afterward.

#### Does it fetch every historical message?

No. Message boundaries help collect accessible older or newer messages, but source availability limits coverage. The requested message limit is not a guarantee.

#### Does it require a proxy?

No. Direct access is the default. Optional connection settings are explained in the input form. A failed direct request does not automatically enable a paid route.

#### Can I use it with an AI assistant?

Yes, through the Apify API or the supported MCP setup above. Ask the assistant to use bounded inputs and read the returned dataset before summarizing it.

### Related Actors

- [Yahoo Finance Stock & OHLCV Data Scraper](https://apify.com/fetch_cat/yahoo-finance-stock-data-scraper) — Add price and market-history context.
- [Google News Scraper](https://apify.com/fetch_cat/google-news-scraper) — Collect relevant headlines.
- [Reddit Scraper](https://apify.com/fetch_cat/reddit-scraper) — Review broader public discussions.
- [Reddit Post Monitor & Keyword Scraper](https://apify.com/fetch_cat/reddit-post-monitor-lite) — Collect recent matching public Reddit posts, with optional cross-run history to exclude previously discovered IDs.
- [Hacker News Search Scraper](https://apify.com/fetch_cat/hacker-news-search-scraper) — Find technology and company discussions.

### Support and feedback

For custom additions or integrations, email <hello@fetchcat.dev>.

Found an error or have a feature request? [Open an issue](https://apify.com/fetch_cat/stocktwits-scraper/issues) with the run URL, a non-sensitive input example and what you expected.

Need help sharing it? See [Apify’s guide to sharing a run when reporting an issue](https://docs.apify.com/account/collaboration/general-resource-access#automatically-sharing-runs-via-actor-issues). Sharing a run can give the developer access to its input, logs and results, so use a run that contains no sensitive data. Please leave out API tokens, passwords, cookies, private documents and personal data. Use a public sample URL or a redacted example instead.

Tried this scraper? We'd love to hear how it worked for you. [Leave a review](https://apify.com/fetch_cat/stocktwits-scraper/reviews) to help others choose the right tool and help us improve it. Your feedback means a lot to us.

Made with care for curious people, AI agents and the possibilities in data. ♥

# Changelog

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

# Actor input Schema

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

Ticker or cashtag symbols to scrape from Stocktwits. Use values like AAPL, TSLA, MSFT, or $NVDA.

## `maxMessagesPerSymbol` (type: `integer`):

Maximum number of messages to save for each Stocktwits symbol.

## `sinceMessageId` (type: `integer`):

Only request messages newer than this Stocktwits message ID, when supported by the public stream.

## `continueOnError` (type: `boolean`):

When enabled, continue with other symbols after a source failure. When disabled, a later-page failure preserves saved rows, records pending symbols, and stops admitting new symbols.

## `beforeMessageId` (type: `integer`):

Start pagination before this Stocktwits message ID to collect older messages.

## `includeRaw` (type: `boolean`):

Add the raw Stocktwits message object to each dataset item for debugging or custom parsing.

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

Direct access is the default. Enable Apify Proxy or supply custom proxy URLs only when you explicitly want those settings used for every request. Managed groups and custom settings are honored. Leave disabled to avoid proxy use. There is no automatic proxy fallback after a direct request fails. Proxy usage may add platform charges.

## Actor input object example

```json
{
  "symbols": [
    "AAPL",
    "TSLA"
  ],
  "maxMessagesPerSymbol": 20,
  "continueOnError": false,
  "includeRaw": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `runSummary` (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"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("fetch_cat/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 = { "symbols": [
        "AAPL",
        "TSLA",
    ] }

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

```

## MCP server setup

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