# Reddit Intelligence AI v1 (`actor_researcher.48/reddit-intelligence-ai-v1`) Actor

Analyze Reddit with AI-powered sentiment analysis, viral prediction, crisis detection & brand monitoring. MCP automation integrates Linear, Slack, Notion, Airtable & Sheets for auto-workflows. Works in free demo mode or with Reddit API for real-time data.

- **URL**: https://apify.com/actor_researcher.48/reddit-intelligence-ai-v1.md
- **Developed by:** [ANIRBAN ROY](https://apify.com/actor_researcher.48) (community)
- **Categories:** Social media, SEO tools, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

from $35.00 / 1,000 complete analysis runs

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

## 📊 Reddit Intelligence AI v1

> **Championship-Level Reddit Analysis**  5 MCP Integrations | Interactive 3D Visualizations

Transform Reddit data into actionable business intelligence with AI-powered sentiment analysis, viral prediction, crisis detection, and automated workflows.

***

#### **1. 🤖 5 MCP Integrations - Full Automation**

Connect to your entire workflow:

- **Linear** - Auto-create support tickets from negative posts
- **Slack** - Real-time crisis alerts
- **Notion** - Build knowledge base from viral content
- **Airtable** - Track all mentions in database
- **Google Sheets** - Auto-populate spreadsheets

#### **2. 🌌 Interactive 3D Visualizations**

- **3D Sentiment Galaxy** - Explore posts in 3D space (Three.js)
- Colored spheres by sentiment (green/yellow/red)
- Click & drag to rotate, scroll to zoom
- Click spheres to view post details
- Auto-rotate with starfield background

#### **3. 💰 Business-Focused Analytics**

- **ROI Calculator** - Estimate marketing value of posts
- **Crisis Detection** - Alert on negative sentiment spikes
- **Viral Prediction** - AI identifies trending content early
- **Bot Detection** - Find suspicious accounts
- **Competitive Intelligence** - Track competitor mentions

#### **4. 🎨 Beautiful HTML Reports**

- Professional gradient design
- Interactive charts (Chart.js)
- Network graphs (D3.js)
- Mobile-responsive
- Export to CSV/JSON

***

### 🚀 **Quick Start**

#### **Option 1: No Setup (FREE Mode)**

Just run the actor! Works immediately without ANY credentials:

```json
{
  "subreddits": ["artificial", "MachineLearning"],
  "maxPosts": 100
}
```

#### **Option 2: Full Power (Reddit API)**

Get 100+ posts per subreddit:

```json
{
  "subreddits": ["artificial"],
  "maxPosts": 500,
  "redditClientId": "YOUR_CLIENT_ID",
  "redditClientSecret": "YOUR_CLIENT_SECRET",
  "redditUsername": "YOUR_USERNAME",
  "redditPassword": "YOUR_PASSWORD"
}
```

**How to get Reddit API credentials:**

1. Go to: https://www.reddit.com/prefs/apps
2. Click "Create App" → "Script"
3. Copy Client ID & Secret

***

### 📊 **Features**

#### **Core Analysis**

- ✅ **Sentiment Analysis** - VADER + optional AI (OpenAI/Claude/Grok)
- ✅ **Viral Prediction** - ML algorithm predicts trending posts
- ✅ **Crisis Detection** - Real-time negative sentiment alerts
- ✅ **ROI Calculator** - Estimate marketing value ($$$)
- ✅ **Bot Detection** - Identify suspicious accounts
- ✅ **Controversy Detection** - Find conflicting sentiment
- ✅ **Trending Topics** - Extract top keywords
- ✅ **User Personas** - Categorize commenters
- ✅ **Influence Network** - Map key voices
- ✅ **Best Posting Times** - Optimize engagement

#### **MCP Automation Modes**

Choose from 4 pre-built workflows:

##### **1. Support Intelligence**

Auto-creates Linear tickets from negative posts:

```json
{
  "mode": "support_intelligence",
  "linearApiKey": "YOUR_KEY"
}
```

##### **2. Crisis Detector**

Sends Slack alerts for sentiment spikes:

```json
{
  "mode": "crisis_detector",
  "slackWebhookUrl": "YOUR_WEBHOOK"
}
```

##### **3. Content Miner**

Saves viral posts to Notion knowledge base:

```json
{
  "mode": "content_miner",
  "notionApiKey": "YOUR_KEY"
}
```

##### **4. Brand Guardian**

Tracks brand mentions in Airtable:

```json
{
  "mode": "brand_guardian",
  "brandKeywords": ["YourBrand"],
  "airtableApiKey": "YOUR_KEY"
}
```

#### **AI Enhancement (Optional)**

Add AI provider for natural language insights:

```json
{
  "aiProvider": "openai",
  "openaiApiKey": "YOUR_KEY"
}
```

**Supported AI Providers:**

- OpenAI (GPT-4)
- Anthropic (Claude)
- Grok (xAI)

***

### 📋 **Input Parameters**

#### **Basic Settings**

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `subreddits` | array | `["artificial"]` | List of subreddits (max 10) |
| `maxPosts` | integer | `100` | Posts per subreddit (1-1000) |
| `sortBy` | string | `"hot"` | Sort: hot/new/top/rising |
| `timeFilter` | string | `"week"` | Time: hour/day/week/month/year |
| `includeComments` | boolean | `true` | Fetch comments |

#### **Reddit API (Optional)**

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `redditClientId` | string | No | Your Reddit app client ID |
| `redditClientSecret` | string | No | Your Reddit app secret |
| `redditUsername` | string | No | Your Reddit username |
| `redditPassword` | string | No | Your Reddit password |

#### **Analysis Features (All FREE)**

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `detectControversy` | boolean | `true` | Find conflicting sentiment |
| `detectBotsEnabled` | boolean | `true` | Identify bot accounts |
| `enableCrisisDetection` | boolean | `true` | Alert on negative spikes |
| `calculateROIEnabled` | boolean | `true` | Estimate marketing value |
| `brandKeywords` | array | `[]` | Track specific brands |

#### **AI Enhancement (Optional)**

| Parameter | Type | Default | Options |
|-----------|------|---------|---------|
| `aiProvider` | string | `"none"` | none/openai/anthropic/grok |
| `openaiApiKey` | string | `""` | Your OpenAI API key |
| `anthropicApiKey` | string | `""` | Your Claude API key |
| `grokApiKey` | string | `""` | Your Grok API key |

#### **MCP Automation (Optional)**

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `mode` | string | `"analysis"` | analysis/support_intelligence/crisis_detector/content_miner/brand_guardian |
| `linearApiKey` | string | `""` | For Linear integration |
| `slackWebhookUrl` | string | `""` | For Slack alerts |
| `notionApiKey` | string | `""` | For Notion integration |
| `airtableApiKey` | string | `""` | For Airtable tracking |
| `googleSheetsCredentials` | string | `""` | For Sheets integration |

***

### 📦 **Outputs**

#### **1. REPORT.html**

Beautiful interactive report with:

- 📊 Sentiment distribution charts
- 🔥 Viral candidate predictions
- 🚨 Crisis alerts (if detected)
- 💰 ROI calculations
- 🌌 3D Sentiment Galaxy (interactive!)
- 🎨 Network influence graph
- 📈 Trending topics word cloud

#### **2. JSON Files**

- `posts.json` - All posts with analysis
- `sentiment.json` - Sentiment breakdown
- `viral_candidates.json` - High-potential posts
- `trending_topics.json` - Top keywords
- `crisis_alerts.json` - Urgent issues
- `bot_detection.json` - Suspicious accounts
- `roi_calculations.json` - Marketing value

#### **3. CSV Export**

- `posts.csv` - Import to Excel/Sheets

#### **4. Output Tab**

Summary statistics visible immediately:

```json
{
  "totalPosts": 100,
  "totalComments": 450,
  "overallSentiment": "0.42 (Positive)",
  "viralCandidates": 12,
  "crisisAlerts": 0,
  "dataSource": "RSS Feed (Real Data)"
}
```

***

### 💡 **Use Cases**

#### **Marketing Teams**

- Track brand mentions across subreddits
- Identify viral content opportunities
- Monitor competitor activity
- Calculate campaign ROI

#### **Community Managers**

- Detect crises before they escalate
- Find influential community members
- Understand sentiment trends
- Generate engagement reports

#### **Product Teams**

- Collect feature requests from comments
- Monitor product reception
- Track competitor mentions
- Identify content gaps

#### **Customer Support**

- Auto-create tickets from negative posts
- Track recurring issues
- Monitor brand reputation
- Prioritize by sentiment

***

### 🎯 **Examples**

#### **Example 1: Brand Monitoring**

```json
{
  "subreddits": ["technology", "gadgets", "apple"],
  "brandKeywords": ["iPhone", "Apple"],
  "mode": "brand_guardian",
  "airtableApiKey": "YOUR_KEY",
  "enableCrisisDetection": true,
  "webhookUrl": "YOUR_SLACK_WEBHOOK"
}
```

**Result:** Tracks all iPhone mentions, logs to Airtable, alerts on negative sentiment

#### **Example 2: Competitor Analysis**

```json
{
  "subreddits": ["saas", "startups"],
  "competitorKeywords": ["Slack", "Teams", "Discord"],
  "calculateROIEnabled": true,
  "aiProvider": "openai",
  "openaiApiKey": "YOUR_KEY"
}
```

**Result:** Compare competitor mentions with AI-powered insights

#### **Example 3: Content Research**

```json
{
  "subreddits": ["MachineLearning", "artificial"],
  "maxPosts": 200,
  "mode": "content_miner",
  "notionApiKey": "YOUR_KEY",
  "notionDatabaseId": "YOUR_DB_ID"
}
```

**Result:** Saves viral AI posts to Notion for content inspiration

***

### 🔒 **Privacy & Compliance**

- ✅ **No data stored** - Everything deleted after run
- ✅ **Public data only** - Only scrapes publicly visible posts
- ✅ **Rate limited** - Respects Reddit's limits
- ✅ **GDPR compliant** - No personal data collected
- ✅ **Terms compliant** - Follows Reddit API terms

***

### 🛠️ **Technical Details**

#### **Technologies**

- **Backend:** Node.js 22, Apify SDK 3.5
- **Analysis:** VADER sentiment, custom ML algorithms
- **Visualization:** Three.js (3D), Chart.js, D3.js
- **Styling:** Modern CSS gradients, responsive design
- **APIs:** Reddit OAuth 2.0, Public JSON, RSS

#### **Performance**

- ⚡ **Speed:** 100 posts in ~10 seconds
- 💰 **Cost:** ~$0.01 per 100 posts
- 🎯 **Accuracy:** 85%+ sentiment accuracy
- 📊 **Scale:** Up to 1,000 posts per run

***

### 📚 **Resources**

#### **Documentation**

- [Reddit API Docs](https://www.reddit.com/dev/api/)
- [Apify Platform Docs](https://docs.apify.com/)
- [MCP Integration Guide](https://modelcontextprotocol.io/)

#### **Support**

- 🐛 Found a bug? Report it!
- **Apify Platform Support:** Use the built-in messaging system in [Apify Console](https://console.apify.com/)

***

### 🏆 **Built for Apify Challenge 2025**

This actor demonstrates:

- ✅ **Production-ready code** - Error handling, fallbacks, normalization
- ✅ **Real business value** - ROI calculator, automation, crisis detection
- ✅ **Technical excellence** - 3D viz, MCP integration, multi-tier system
- ✅ **Beautiful UX** - Interactive reports, responsive design
- ✅ **Comprehensive docs** - Clear examples, use cases, parameters

**Not a demo. A complete intelligence platform.** 🚀

***

### 📜 License

Apache 2.0 - Free to use,

***

#### Author

**Created by:** Anirban Roy\
**GitHub:** (https://github.com/ar48code-dev)

### 🙏 **Credits**

Built with:

- [Apify SDK](https://apify.com/)
- [VADER Sentiment](https://github.com/cjhutto/vaderSentiment)
- [Three.js](https://threejs.org/)
- [Chart.js](https://www.chartjs.org/)
- [D3.js](https://d3js.org/)

***

**⭐ If you find this useful, please star the actor!**

**🚀 Ready to transform Reddit data into insights? [Run the Actor →](#)**

# Actor input Schema

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

Subreddits to analyze (without r/ prefix, max 10)

## `maxPosts` (type: `integer`):

Maximum posts to collect (1-1000)

## `includeComments` (type: `boolean`):

Fetch and analyze comments

## `redditClientId` (type: `string`):

For 100+ posts/subreddit. Get from: https://www.reddit.com/prefs/apps

## `redditClientSecret` (type: `string`):

Your Reddit app secret

## `redditUsername` (type: `string`):

Your Reddit username

## `redditPassword` (type: `string`):

Your Reddit password

## `detectControversy` (type: `boolean`):

Find posts with conflicting sentiment

## `detectBotsEnabled` (type: `boolean`):

Identify suspicious bot accounts

## `enableCrisisDetection` (type: `boolean`):

🚨 Alert on negative sentiment spikes

## `calculateROIEnabled` (type: `boolean`):

💰 Estimate marketing value

## `extractUserPersonas` (type: `boolean`):

👥 Identify user types

## `analyzeInfluenceNetwork` (type: `boolean`):

🌐 Map key influencers

## `brandKeywords` (type: `array`):

Track mentions of specific brands/products

## `aiProvider` (type: `string`):

Enhanced insights with AI (optional)

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

Your OpenAI API key

## `anthropicApiKey` (type: `string`):

Your Claude API key

## `grokApiKey` (type: `string`):

Your Grok API key

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

Analysis or automation workflow

## `linearApiKey` (type: `string`):

Auto-create support tickets. Get from: https://linear.app/settings/api

## `slackWebhookUrl` (type: `string`):

Send alerts to Slack. Get from: https://api.slack.com/messaging/webhooks

## `notionApiKey` (type: `string`):

Create knowledge base pages. Get from: https://www.notion.so/my-integrations

## `notionDatabaseId` (type: `string`):

Your target Notion database

## `airtableApiKey` (type: `string`):

Track data in Airtable. Get from: https://airtable.com/create/tokens

## `airtableBaseId` (type: `string`):

Your Airtable base

## `sortBy` (type: `string`):

Post sorting method

## `timeFilter` (type: `string`):

Time range for posts

## `includeNSFW` (type: `boolean`):

Include NSFW posts

## `minPostScore` (type: `integer`):

Filter posts below this score

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

Send alerts to Discord/Slack webhook

## `notifyOnKeywords` (type: `array`):

Get webhook alerts when these keywords appear

## Actor input object example

```json
{
  "subreddits": [
    "artificial"
  ],
  "maxPosts": 100,
  "includeComments": true,
  "detectControversy": true,
  "detectBotsEnabled": true,
  "enableCrisisDetection": true,
  "calculateROIEnabled": true,
  "extractUserPersonas": true,
  "analyzeInfluenceNetwork": true,
  "brandKeywords": [],
  "aiProvider": "none",
  "mode": "analysis",
  "notionDatabaseId": "",
  "airtableBaseId": "",
  "sortBy": "hot",
  "timeFilter": "week",
  "includeNSFW": false,
  "minPostScore": 0,
  "webhookUrl": "",
  "notifyOnKeywords": []
}
```

# 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 = {
    "subreddits": [
        "artificial"
    ],
    "maxPosts": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("actor_researcher.48/reddit-intelligence-ai-v1").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 = {
    "subreddits": ["artificial"],
    "maxPosts": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("actor_researcher.48/reddit-intelligence-ai-v1").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 '{
  "subreddits": [
    "artificial"
  ],
  "maxPosts": 100
}' |
apify call actor_researcher.48/reddit-intelligence-ai-v1 --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,actor_researcher.48/reddit-intelligence-ai-v1"
        }
    }
}
```

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/TyYpbN3ropnbH2EM5/builds/26WzvEhZQyrFNs3w2/openapi.json
