# StockTwits Scraper — Ticker Messages & Sentiment (`hipersoft/stocktwits-scraper`) Actor

Scrape StockTwits messages and retail Bullish/Bearish sentiment for any ticker in bulk (stocks, ETFs, crypto, forex). One row per message with body, author, timestamp, sentiment, likes and replies. Fast, reliable and account-free.

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

## Pricing

from $0.0004 / message scraped

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## StockTwits Scraper — Ticker Messages & Bullish/Bearish Sentiment

Scrape **StockTwits** retail-investor messages and their **Bullish / Bearish sentiment** for any ticker, in bulk. Pass a list of symbols — stocks, ETFs, crypto or forex — and this actor pages back through each ticker's message stream and returns one clean row per message: the text, author, timestamp, sentiment tag, likes and replies. Fast reliable HTTP, no login and no API key. Export to JSON, CSV, Excel or XML.

### What does StockTwits Scraper do?

StockTwits is a social platform where traders post short messages about tickers and often tag them **Bullish** or **Bearish**. This scraper turns that stream into a structured dataset. Give it the tickers you care about and a per-ticker message limit, and it collects the latest messages (newest first, paging into older history), normalizes each into a flat record, and hands you a dataset ready for sentiment analysis, dashboards or research.

### What data can you scrape from StockTwits?

| Data point | Description |
| --- | --- |
| `ticker` | The ticker symbol the message was pulled for. |
| `id` | Unique StockTwits message id. |
| `body` | Full text of the message. |
| `username` | Author's StockTwits handle. |
| `name` | Author's display name. |
| `createdAt` | ISO 8601 timestamp of when the message was posted. |
| `sentiment` | `Bullish`, `Bearish`, or `null` when the author added no tag. |
| `likeCount` | Number of likes on the message. |
| `replyCount` | Number of replies in the message's thread. |
| `source` | Client the message was posted from (e.g. StockTwits Web, iPhone). |

### Use cases

- **Sentiment analysis** — measure the Bullish/Bearish balance on a ticker over time.
- **Trading signals** — feed retail chatter and sentiment into quant models or alerts.
- **Dashboards** — power a live "social buzz" panel for a watchlist of symbols.
- **Research & backtesting** — build a historical corpus of messages per ticker.
- **Market monitoring** — watch how sentiment shifts around earnings or news.

### How to scrape StockTwits data

1. Add **StockTwits Scraper** to your Apify account and open its input.
2. Enter one or more **tickers** (e.g. `AAPL`, `TSLA`, `BTC.X`), one per line.
3. Set **Max messages per ticker**.
4. Optionally enable **Only sentiment-tagged messages** to keep just Bullish/Bearish posts.
5. Click **Run**, then export the results as JSON, CSV, Excel or XML — or fetch them through the Apify API.

### Input

```json
{
  "tickers": ["AAPL", "TSLA", "BTC.X"],
  "maxMessages": 100,
  "sentimentOnly": false
}
```

| Field | Description |
| --- | --- |
| `tickers` | Ticker symbols to scrape, one per line. Stocks & ETFs use the plain symbol; crypto uses a `.X` suffix (e.g. `BTC.X`). |
| `maxMessages` | Maximum messages to collect per ticker. The scraper pages older messages until this limit or the stream runs out. |
| `sentimentOnly` | When `true`, keep only messages tagged Bullish or Bearish. |

### What you get

Each record is a flat JSON object, ready to export to CSV, Excel, JSON or XML:

```json
{
  "ticker": "AAPL",
  "id": 662981305,
  "body": "$AAPL We push to 320 by tomorrow.",
  "username": "chintu76",
  "name": "sam",
  "createdAt": "2026-08-27T12:48:56Z",
  "sentiment": "Bullish",
  "likeCount": 5,
  "replyCount": 1,
  "source": "StockTwits Web"
}
```

#### Output schema

| Field | Type | Description |
| --- | --- | --- |
| `ticker` | string | Ticker the message belongs to. |
| `id` | number | Unique message id. |
| `body` | string | Message text. |
| `username` | string | Author handle. |
| `name` | string | Author display name. |
| `createdAt` | string | ISO 8601 timestamp. |
| `sentiment` | string / null | `Bullish`, `Bearish`, or `null`. |
| `likeCount` | number | Likes on the message. |
| `replyCount` | number | Replies in the thread. |
| `source` | string | Posting client. |

### Need more market data?

- [CoinGecko Scraper](https://apify.com/hipersoft/coingecko-scraper) — live crypto prices, market cap, volume and ATH/ATL.
- [Yahoo Finance Scraper](https://apify.com/hipersoft/yahoo-finance-scraper) — live quotes and OHLCV history for stocks, ETFs, crypto and forex.
- [DefiLlama Scraper](https://apify.com/hipersoft/defillama-scraper) — DeFi protocols, yields, chains and stablecoins.

### FAQ

**Do I need an account or API key?**
No. There is no login or key — set your tickers and click Run.

**How many messages can I get per ticker?**
Set `maxMessages` to whatever you need. The scraper pages back through older messages until it reaches that limit or the ticker has no more history.

**Which tickers are supported?**
Any symbol StockTwits tracks — US stocks and ETFs by plain symbol, and crypto with a `.X` suffix (for example `BTC.X`, `ETH.X`).

**What does the sentiment field mean?**
It is the tag the message author selected: `Bullish` or `Bearish`. Messages without a tag come back as `null`. Enable **Only sentiment-tagged messages** to drop the untagged ones.

**How fresh is the data?**
Each run starts from the newest messages available at that moment and pages backward.

**What export formats are available?**
JSON, CSV, Excel and XML, plus programmatic access through the Apify API.

**Can I use this with n8n?**
Yes. Use the [Apify n8n integration](https://apify.com/integrations/n8n) (or the official Apify node) to run this actor from an n8n workflow and pipe the message dataset straight into your automation — sentiment scoring, alerts, a database, or an LLM node. Every run's dataset is available over the [Apify API](https://docs.apify.com/api/v2) as JSON, so it drops into any workflow tool.

**Can I connect this to my other tools?**
The StockTwits Scraper connects with almost any cloud service or web app through [integrations on the Apify platform](https://apify.com/integrations): [Make](https://apify.com/integrations/make), [Zapier](https://apify.com/integrations/zapier), [n8n](https://apify.com/integrations/n8n), [Slack](https://docs.apify.com/platform/integrations/slack), [Google Drive](https://docs.apify.com/platform/integrations/drive) and [many more](https://apify.com/integrations), plus the [Apify API](https://docs.apify.com/api/v2), JavaScript/Python clients and MCP. Or use [webhooks](https://docs.apify.com/platform/integrations/webhooks) to trigger an action whenever a run finishes.

**Is this official StockTwits data?**
The data reflects public StockTwits messages, but this actor is an independent tool and is not affiliated with or endorsed by StockTwits.

### Related Actors

- [CoinGecko Scraper](https://apify.com/hipersoft/coingecko-scraper)
- [Yahoo Finance Scraper](https://apify.com/hipersoft/yahoo-finance-scraper)
- [DefiLlama Scraper](https://apify.com/hipersoft/defillama-scraper)

### Notes

Original clean-room implementation. Returns only public message data; you are responsible for compliant use. Not affiliated with StockTwits; all trademarks belong to their respective owners.

# Actor input Schema

## `tickers` (type: `array`):

Ticker symbols to scrape, one per line. Works for stocks and ETFs (e.g. "AAPL", "TSLA", "SPY"), crypto (append .X, e.g. "BTC.X", "ETH.X") and forex. Case-insensitive.

## `maxMessages` (type: `integer`):

Maximum number of messages to scrape for each ticker. The scraper pages back through older messages (30 per request) until this limit is hit or no more messages exist.

## `sentimentOnly` (type: `boolean`):

When enabled, only keep messages the author tagged as Bullish or Bearish and skip untagged chatter. The scraper still pages until it collects up to Max messages of tagged messages (or runs out).

## Actor input object example

```json
{
  "tickers": [
    "AAPL",
    "TSLA",
    "BTC.X"
  ],
  "maxMessages": 100,
  "sentimentOnly": false
}
```

# Actor output Schema

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

The results as dataset items.

# 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 = {
    "tickers": [
        "AAPL",
        "TSLA",
        "BTC.X"
    ]
};

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

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

```

## MCP server setup

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