# Reddit Sentiment & Trend Tracker — Mention Volume & Charts (`b2b_leads/reddit-sentiment-and-trend-tracker`) Actor

Track Reddit mention volume & sentiment for stocks, crypto, brands & topics. Chart-ready hourly/daily trends, per-mention scores, top posts & spike webhooks. Finance & product lexicons. Search + scan mode. Zero API key. Schedule runs on Apify.

- **URL**: https://apify.com/b2b\_leads/reddit-sentiment-and-trend-tracker.md
- **Developed by:** [Chidubem Aneke](https://apify.com/b2b_leads) (community)
- **Categories:** Social media, News, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 results

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/platform/actors/running/actors-in-store#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

## Reddit Sentiment & Trend Tracker — Mention Volume + Sentiment Over Time

**Track how Reddit talks about your ticker, brand, product, or topic — with chart-ready time series.** This Actor monitors mention volume and sentiment across subreddits (or site-wide), outputs **per-mention rows** with sentiment scores, and **aggregated trend buckets** you can plug straight into dashboards.

**No setup. Just results.** Schedule it, webhook spikes to Slack, and build living sentiment charts without heavy ML or expensive compute.

> ⚡ **Built for speed & cost.** Runs on **512 MB**, streams results live, and stays cheap even on scheduled hourly runs.

***

### ⚡ Why this Actor?

| Metric | This Actor | Typical alternative |
|--------|-----------|---------------------|
| **Speed** | Fast, lightweight | Slow page loads |
| **Default memory** | **512 MB** | 2–4 GB |
| **Setup** | **Works out of the box** | Often complex configuration |
| **Output** | Mentions + trend buckets + top content | Raw posts only |
| **Sentiment** | Built-in lexicon (finance/product presets) | Bring your own |
| **Scheduling** | Incremental cursors + saved state | Manual dedupe |

***

### Who is this for?

| You are… | You get… |
|----------|----------|
| **Finance / crypto analyst** | Ticker mention volume + bullish/bearish pulse (WSB, stocks, crypto subs) |
| **Brand / product team** | Perception tracking, complaint spikes, campaign impact |
| **Market researcher** | Topic sentiment trends over time with exportable buckets |
| **PR / comms** | Early warning when mention volume or net sentiment jumps |
| **Developer / integrator** | Clean JSON for BI tools, MCP agents, and custom dashboards |

***

### What you get

#### Per-mention rows (`featureType: "mention"`)

Every matched post or comment includes: source fields (id, title/body, url, permalink, subreddit, author, score, createdAtISO), plus **term**, **matchedAliases**, **matchedSnippet**, **sentimentScore** (-1 to 1), **sentimentLabel** (positive/neutral/negative), and **sentimentTerms** (words that drove the score).

#### Trend buckets (`featureType: "trend_bucket"`)

Chart-ready time series per term + interval (`hour` | `day` | `week`):

- `mentions`, `uniqueAuthors`, `totalUpvotes`
- `avgSentiment`, `netSentiment`
- `positive`, `neutral`, `negative` counts
- `bucketStartISO`, `bucketEndISO`

**Perfect for:** Google Sheets, Looker, Grafana, Power BI, or any tool that plots `(bucketStartISO, mentions, netSentiment)`.

#### Top content (`featureType: "top_content"`)

Top N posts/comments per term ranked by **score** and **engagement** — spot the posts driving the conversation.

***

### Discovery modes

1. **Search** — find mentions by keyword across Reddit or within chosen subreddits, with sort and time filters.
2. **Scan** — watch recent posts and comments in target subreddits for your terms.
3. **Both** — combine for maximum coverage (default).

***

### Sentiment engine

- **Default:** Fast **rule-based lexicon** with negation handling, boosters, and emoji signals. **Works offline — no third-party services required.**
- **Presets:** `general`, `finance` (moon, calls, puts, rug, dump…), `product` (buggy, refund, love it…)
- **Custom:** Add your own word → score map via `customLexicon`
- **Optional:** Enable `useLlmSentiment` + `openaiApiKey` for higher accuracy when you need it

***

### How to run

1. Add **keywords** — one per line, e.g. `Nvidia: NVDA, $NVDA` or just `Tesla`.
2. Set **subreddits** (e.g. `stocks`, `wallstreetbets`) or `["all"]` for site-wide.
3. Pick **interval** (`day` for daily charts).
4. Choose **lexiconPreset** (`finance` for tickers).
5. Keep **Proxy → Residential US** enabled on Apify.
6. Run — download results or connect a **schedule** + **webhook**.

**Pro tip:** Schedule every hour with `interval: "hour"` and webhook `spikeThreshold` to catch mention surges in real time.

***

### Example input (Apify / MCP)

```json
{
  "termGroups": ["Nvidia: NVDA, $NVDA"],
  "mode": "both",
  "subreddits": ["stocks", "wallstreetbets"],
  "stream": "both",
  "interval": "day",
  "lexiconPreset": "finance",
  "searchTime": "week",
  "resultsPerTerm": 100,
  "lookback": 500,
  "emitMentions": true,
  "emitAggregates": true,
  "topN": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"],
    "apifyProxyCountry": "US"
  }
}
```

#### Shorthand terms

```json
{
  "termGroups": ["Tesla", "Apple: AAPL"],
  "subreddits": ["investing"],
  "interval": "week",
  "lexiconPreset": "finance"
}
```

***

### Example output

**Mention row:**

```json
{
  "featureType": "mention",
  "streamType": "post",
  "term": "Nvidia",
  "matchedAliases": ["NVDA"],
  "matchedSnippet": "… loaded up on NVDA calls before earnings …",
  "sentimentScore": 0.42,
  "sentimentLabel": "positive",
  "sentimentTerms": ["calls"],
  "subreddit": "wallstreetbets",
  "title": "NVDA yolo",
  "score": 847,
  "createdAtISO": "2026-07-06T14:22:11.000Z",
  "permalink": "https://www.reddit.com/r/wallstreetbets/comments/..."
}
```

**Trend bucket row:**

```json
{
  "featureType": "trend_bucket",
  "term": "Nvidia",
  "interval": "day",
  "bucketStartISO": "2026-07-06T00:00:00.000Z",
  "bucketEndISO": "2026-07-07T00:00:00.000Z",
  "mentions": 34,
  "uniqueAuthors": 28,
  "avgSentiment": 0.18,
  "netSentiment": 6.12,
  "positive": 14,
  "neutral": 12,
  "negative": 8,
  "totalUpvotes": 4200
}
```

***

### Input reference

| Field | Description | Default |
|-------|-------------|---------|
| `termGroups` | Keywords to track (`Label: alias1, alias2` or just `Label`) | — |
| `mode` | `search`, `scan`, or `both` | `both` |
| `subreddits` | Target subs; `["all"]` = site-wide | `["all"]` |
| `stream` | `posts`, `comments`, or `both` | `both` |
| `interval` | Bucket size: `hour`, `day`, `week` | `day` |
| `lexiconPreset` | `general`, `finance`, `product` | `general` |
| `customLexicon` | Word → score overrides | `{}` |
| `useLlmSentiment` | Optional OpenAI sentiment | `false` |
| `resultsPerTerm` | Search fetch limit per term | `100` |
| `lookback` | Scan depth per subreddit (1–1000) | `500` |
| `minScore` | Minimum upvote score filter | `0` |
| `topN` | Top content rows per term | `10` |
| `emitMentions` | Output per-mention rows | `true` |
| `emitAggregates` | Output trend buckets | `true` |
| `spikeThreshold` | Webhook trigger threshold | `0` (off) |
| `webhookUrl` | Spike alert destination | — |
| `sinceId` | Incremental item cursor | — |
| `maxItems` | Cap mention rows (0 = unlimited) | `0` |

***

### Scheduling + incremental runs

Scheduled re-runs **extend your time series without duplicates**:

- Pass `sinceId` for a one-shot incremental cutoff, **or**
- Let the Actor persist **newest-seen cursors** per term/subreddit automatically.

Each scheduled run adds only **new** mentions and updates trend buckets.

***

### Spike webhooks

Set `spikeThreshold` (e.g. `25`) and `webhookUrl` to get alerts when a term's **latest bucket** crosses the threshold on mention count or net sentiment magnitude.

```json
{
  "spikeThreshold": 30,
  "webhookUrl": "https://hooks.slack.com/services/...",
  "webhookFormat": "slack"
}
```

***

### Local development

```bash
npm install
cp local.input.example.json local.input.json
npm run start:local           # writes output/local_results.json
npm run build                 # compile for Apify
```

***

### FAQ

**Do I need any special setup?**\
No. Open the Actor, add your terms, and click Start.

**Does sentiment work without extra services?**\
Yes. The default lexicon path runs entirely in-process. LLM mode is optional.

**Can I track multiple terms at once?**\
Yes. Each term gets its own buckets, mentions, and top content.

**How do I chart trends?**\
Filter dataset view `trends` or export CSV. Plot `bucketStartISO` vs `mentions` or `netSentiment` grouped by `term`.

**What proxy should I use?**\
Residential US on Apify is recommended for the most reliable runs.

***

### Contact me

Need something built beyond this Actor? I design and ship **custom data projects** end to end — from one-off automations to production pipelines.

**What I can help with:**

- **Data extraction & automation** — any website, marketplace, social platform, or internal tool; scheduled runs, deduplication, clean JSON/CSV output
- **Apify Actors** — purpose-built actors like this one, tuned for your use case and budget
- **Web apps** — dashboards, admin panels, SaaS products, landing pages, and full-stack applications of any kind
- **Integrations** — webhooks, Slack alerts, Google Sheets, BI tools, CRMs, and custom APIs

Whether you need a custom data pipeline, a sentiment monitoring tool, or a complete web product, reach out and let's talk scope.

- **Email:** <dubem115@gmail.com>
- **GitHub:** [github.com/DrunkCodes](https://github.com/DrunkCodes)

***

### License

ISC

# Actor input Schema

## `termGroups` (type: `array`):

One entry per keyword group on your charts. Format: Label: alias1, alias2 (aliases optional). Examples: Nvidia: NVDA, $NVDA — or just Tesla if you only need one spelling.

## `subreddits` (type: `array`):

Communities to scan (scan mode) and to scope search queries. Add a single entry all to search site-wide, or list subreddit names (e.g. stocks, wallstreetbets).

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

search = run queries through keyword search; scan = pull recent posts/comments from subreddits; both = maximum coverage.

## `stream` (type: `string`):

Which content types to include when matching your terms.

## `interval` (type: `string`):

Time bucket size for mention volume and sentiment charts.

## `emitMentions` (type: `boolean`):

Output one dataset row for every matched post or comment with sentiment score and snippet.

## `emitAggregates` (type: `boolean`):

Output chart-ready time-series rows (mentions, sentiment breakdown per bucket).

## `topN` (type: `integer`):

Capture the top N posts/comments per term ranked by score and engagement.

## `lexiconPreset` (type: `string`):

Built-in word list tuned for your use case. Finance adds bullish/bearish market slang.

## `customLexiconEntries` (type: `array`):

Optional word:score pairs merged onto the preset. Score from -1 (negative) to 1 (positive). Example: moon:0.8, rug:-0.9

## `useLlmSentiment` (type: `boolean`):

When enabled, uses OpenAI for higher-accuracy sentiment instead of the built-in lexicon.

## `openaiApiKey` (type: `string`):

Required only when OpenAI sentiment is enabled above.

## `searchQueries` (type: `array`):

Custom search queries for search mode. Leave empty to auto-build queries from your term aliases.

## `searchSort` (type: `string`):

Sort order for keyword search results.

## `searchTime` (type: `string`):

Limit search results to a recent time window.

## `resultsPerTerm` (type: `integer`):

How many search results to examine per term (1–1000). Fetched in batches of 100.

## `lookback` (type: `integer`):

How many recent posts/comments to scan per subreddit in scan mode (1–1000). Fetched in batches of 100.

## `minScore` (type: `integer`):

Skip items with fewer net upvotes than this. 0 keeps everything including brand-new posts.

## `includeNsfw` (type: `boolean`):

Include posts marked NSFW (over\_18). Off by default.

## `ignoreKeywords` (type: `array`):

Skip any post/comment containing one of these words (case-insensitive).

## `subredditAllowlist` (type: `array`):

If set, only keep matches from these subreddits.

## `subredditDenylist` (type: `array`):

Never count matches from these subreddits.

## `spikeThreshold` (type: `number`):

Fire a webhook when the latest bucket's mention count or absolute net sentiment crosses this value. 0 = disabled.

## `webhookUrl` (type: `string`):

Optional. When set, spike alerts are POSTed here (Slack, Zapier, Make, or your own endpoint). All data is always saved to the dataset.

## `webhookFormat` (type: `string`):

Payload format for spike webhooks.

## `sinceId` (type: `string`):

Optional item cursor — only emit matches newer than this ID. Scheduled runs also save cursors automatically.

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

Stop after this many mention rows. 0 = unlimited.

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

Keep original source payloads during processing for debugging. Not included in output rows.

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

Use Apify Proxy with US Residential for best results. Leave the default unless you know you need something else.

## Actor input object example

```json
{
  "termGroups": [
    "Nvidia: NVDA, $NVDA",
    "Bitcoin: BTC, $BTC",
    "Tesla: TSLA, $TSLA"
  ],
  "subreddits": [
    "stocks",
    "wallstreetbets"
  ],
  "mode": "both",
  "stream": "both",
  "interval": "day",
  "emitMentions": true,
  "emitAggregates": true,
  "topN": 10,
  "lexiconPreset": "finance",
  "customLexiconEntries": [],
  "useLlmSentiment": false,
  "searchQueries": [],
  "searchSort": "relevance",
  "searchTime": "week",
  "resultsPerTerm": 100,
  "lookback": 500,
  "minScore": 0,
  "includeNsfw": false,
  "ignoreKeywords": [],
  "subredditAllowlist": [],
  "subredditDenylist": [],
  "spikeThreshold": 0,
  "webhookUrl": "",
  "webhookFormat": "json",
  "sinceId": "",
  "maxItems": 0,
  "includeRaw": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

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

No description

## `mentions` (type: `string`):

No description

## `trends` (type: `string`):

No description

## `topPosts` (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 = {
    "termGroups": [
        "Nvidia: NVDA, $NVDA",
        "Bitcoin: BTC, $BTC",
        "Tesla: TSLA, $TSLA"
    ],
    "subreddits": [
        "stocks",
        "wallstreetbets"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("b2b_leads/reddit-sentiment-and-trend-tracker").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 = {
    "termGroups": [
        "Nvidia: NVDA, $NVDA",
        "Bitcoin: BTC, $BTC",
        "Tesla: TSLA, $TSLA",
    ],
    "subreddits": [
        "stocks",
        "wallstreetbets",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("b2b_leads/reddit-sentiment-and-trend-tracker").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "termGroups": [
    "Nvidia: NVDA, $NVDA",
    "Bitcoin: BTC, $BTC",
    "Tesla: TSLA, $TSLA"
  ],
  "subreddits": [
    "stocks",
    "wallstreetbets"
  ]
}' |
apify call b2b_leads/reddit-sentiment-and-trend-tracker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=b2b_leads/reddit-sentiment-and-trend-tracker",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/z34HtnHP9vhDsyQhW/builds/xzkWMFNOxbhSTeC8X/openapi.json
