# Reddit Pain Point and Trend Miner (`ghostgrid/reddit-pain-point-miner`) Actor

Mine Reddit pain points using public Reddit endpoints when available, with PullPush archive fallback for post-level data when Reddit blocks cloud traffic.

- **URL**: https://apify.com/ghostgrid/reddit-pain-point-miner.md
- **Developed by:** [GhostGrid](https://apify.com/ghostgrid) (community)
- **Categories:** AI, Business, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.90 / 1,000 posts

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Pain Point and Trend Miner

Scrape data from [www.reddit.com](https://www.reddit.com) with this Actor.

Mine Reddit for pain points, complaints, buyer intent signals, and startup ideas from any subreddit.

### What does this Actor do?

Mines Reddit for pain points, complaints, buyer intent signals, and startup ideas. Analyzes posts and comments with keyword matching, sentiment analysis, and competitor tracking.

The Actor outputs structured JSON data to the Apify dataset, ready for export to CSV, JSON, Excel, or direct API consumption.

### Why use it?

Discover startup ideas by finding recurring complaints and unmet needs in Reddit communities. Useful for founders, product managers, and market researchers doing customer discovery.

### What data can it extract?

| Field | Type | Description |
|-------|------|-------------|
| `type` | String | Extracted field |
| `subreddit` | String | Extracted field |
| `source` | String | Extracted field |
| `title` | String | Extracted field |
| `body` | String | Extracted field |
| `selftext` | String | Extracted field |
| `url` | String | Extracted field |
| `score` | String | Extracted field |
| `num_comments` | String | Extracted field |
| `complaint_category` | String | Extracted field |
| `buyer_intent` | String | Extracted field |
| `sentiment` | String | Extracted field |
| `mentioned_tools` | String | Extracted field |
| `pricing_mentions` | String | Extracted field |
| `keywords_matched` | String | Extracted field |
| `repeated_phrases` | String | Extracted field |
| `mode` | String | Extracted field |
| `fetch_status` | String | Extracted field |
| `error_message` | String | Extracted field |
| `crawled_at` | String | Extracted field |

### How to use it

1. Click **Start** to run the Actor
2. Configure the input parameters (see table below)
3. Wait for the Actor to finish
4. Download results from the **Output** tab in CSV, JSON, or other formats

### How much does it cost?

This Actor uses Pay Per Event (PPE) pricing. You are charged for each result item extracted. A typical scrape of 100 items costs around $0.15.

| Event | Price |
|-------|-------|
| Actor start | $0.005 |
| Per result | $0.001 |

### Input

| Parameter | Description | Type | Default |
|-----------|-------------|------|---------|
| `subreddits` | Subreddits | array | Required |
| `keywords` | Keywords | array | Required |
| `competitor_names` | Competitor Names | array | Required |
| `date_range` | Date Range | string | month |
| `min_score` | Minimum Score | integer | Required |
| `min_comments` | Minimum Comments | integer | Required |
| `mode` | Mining Mode | string | general |
| `max_posts` | Max Posts | integer | 100 |
| `include_comments` | Include Comments | boolean | True |
| `max_comments_per_post` | Max Comments per Post | integer | 20 |
| `proxyConfiguration` | Proxy Configuration | object | {'useApifyProxy': True, 'apifyProxyGroups': [], 'apifyProxyCountry': 'US'} |

### Output

Each result item is pushed to the dataset as a JSON object:

```json
{
  "type": "Sample type",
  "subreddit": "Sample subreddit",
  "source": "Sample source",
  "title": "Sample title",
  "body": "Sample text content..."
}
````

### FAQ

**How do I configure the input?**

Provide the required input parameters (see table below). All optional fields have sensible defaults.

**How many results can I get?**

There is no hard limit. Use the max items or max pages parameters to control how much data is collected.

**Does this Actor use proxies?**

Some targets may require Apify Proxy to avoid rate limits. Enable the proxy configuration in the Actor input if needed.

### Disclaimer

This Actor extracts publicly available data. Personal data may be present in results. Users are responsible for compliance with applicable data protection laws including GDPR. This Actor is not affiliated with the target website.

# Actor input Schema

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

List of subreddit names without the r/ prefix (e.g. SaaS, startups, artificial).

## `keywords` (type: `array`):

Optional keyword filters. Only posts containing at least one of these words will be processed.

## `competitor_names` (type: `array`):

Brand or product names to track mentions of (e.g. Stripe, Intercom, Notion).

## `date_range` (type: `string`):

Time window to search within.

## `min_score` (type: `integer`):

Only include posts with at least this many upvotes.

## `min_comments` (type: `integer`):

Only include posts with at least this many comments.

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

Determines which signals and keywords are prioritized during analysis.

## `max_posts` (type: `integer`):

Maximum number of posts to analyze per subreddit.

## `include_comments` (type: `boolean`):

Whether to fetch and analyze the top comments on each post.

## `max_comments_per_post` (type: `integer`):

Maximum number of top comments to fetch per post.

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

Use Apify Proxy for Reddit requests. Reddit often blocks datacenter traffic, so a US proxy is recommended.

## `llm_api_key` (type: `string`):

Optional. OpenAI-compatible API key for LLM-powered buyer intent scoring. If omitted, rule-based analysis is used.

## `llm_model` (type: `string`):

Model name to use for LLM scoring (e.g. gpt-4o-mini, gpt-4o, deepseek-chat).

## `llm_base_url` (type: `string`):

Base URL for the LLM API (e.g. https://api.openai.com/v1).

## Actor input object example

```json
{
  "subreddits": [
    "SaaS"
  ],
  "keywords": [],
  "competitor_names": [],
  "date_range": "month",
  "min_score": 0,
  "min_comments": 0,
  "mode": "general",
  "max_posts": 100,
  "include_comments": true,
  "max_comments_per_post": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [],
    "apifyProxyCountry": "US"
  },
  "llm_model": "gpt-4o-mini",
  "llm_base_url": "https://api.openai.com/v1"
}
```

# 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": [
        "SaaS"
    ],
    "keywords": [],
    "competitor_names": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("ghostgrid/reddit-pain-point-miner").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": ["SaaS"],
    "keywords": [],
    "competitor_names": [],
}

# Run the Actor and wait for it to finish
run = client.actor("ghostgrid/reddit-pain-point-miner").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 '{
  "subreddits": [
    "SaaS"
  ],
  "keywords": [],
  "competitor_names": []
}' |
apify call ghostgrid/reddit-pain-point-miner --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=ghostgrid/reddit-pain-point-miner",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Reddit Pain Point and Trend Miner",
        "description": "Mine Reddit pain points using public Reddit endpoints when available, with PullPush archive fallback for post-level data when Reddit blocks cloud traffic.",
        "version": "0.2",
        "x-build-id": "eAx042WCfikRyGCeB"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/ghostgrid~reddit-pain-point-miner/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-ghostgrid-reddit-pain-point-miner",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/ghostgrid~reddit-pain-point-miner/runs": {
            "post": {
                "operationId": "runs-sync-ghostgrid-reddit-pain-point-miner",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/ghostgrid~reddit-pain-point-miner/run-sync": {
            "post": {
                "operationId": "run-sync-ghostgrid-reddit-pain-point-miner",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "subreddits"
                ],
                "properties": {
                    "subreddits": {
                        "title": "Subreddits",
                        "type": "array",
                        "description": "List of subreddit names without the r/ prefix (e.g. SaaS, startups, artificial).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "keywords": {
                        "title": "Keywords",
                        "type": "array",
                        "description": "Optional keyword filters. Only posts containing at least one of these words will be processed.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "competitor_names": {
                        "title": "Competitor Names",
                        "type": "array",
                        "description": "Brand or product names to track mentions of (e.g. Stripe, Intercom, Notion).",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "date_range": {
                        "title": "Date Range",
                        "enum": [
                            "day",
                            "week",
                            "month",
                            "year",
                            "all"
                        ],
                        "type": "string",
                        "description": "Time window to search within.",
                        "default": "month"
                    },
                    "min_score": {
                        "title": "Minimum Score",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only include posts with at least this many upvotes.",
                        "default": 0
                    },
                    "min_comments": {
                        "title": "Minimum Comments",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only include posts with at least this many comments.",
                        "default": 0
                    },
                    "mode": {
                        "title": "Mining Mode",
                        "enum": [
                            "startup_ideas",
                            "saas_complaints",
                            "ai_tool_requests",
                            "competitor_monitoring",
                            "support_pain",
                            "general"
                        ],
                        "type": "string",
                        "description": "Determines which signals and keywords are prioritized during analysis.",
                        "default": "general"
                    },
                    "max_posts": {
                        "title": "Max Posts",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of posts to analyze per subreddit.",
                        "default": 100
                    },
                    "include_comments": {
                        "title": "Include Comments",
                        "type": "boolean",
                        "description": "Whether to fetch and analyze the top comments on each post.",
                        "default": true
                    },
                    "max_comments_per_post": {
                        "title": "Max Comments per Post",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum number of top comments to fetch per post.",
                        "default": 20
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Use Apify Proxy for Reddit requests. Reddit often blocks datacenter traffic, so a US proxy is recommended.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [],
                            "apifyProxyCountry": "US"
                        }
                    },
                    "llm_api_key": {
                        "title": "LLM API Key",
                        "type": "string",
                        "description": "Optional. OpenAI-compatible API key for LLM-powered buyer intent scoring. If omitted, rule-based analysis is used."
                    },
                    "llm_model": {
                        "title": "LLM Model",
                        "type": "string",
                        "description": "Model name to use for LLM scoring (e.g. gpt-4o-mini, gpt-4o, deepseek-chat).",
                        "default": "gpt-4o-mini"
                    },
                    "llm_base_url": {
                        "title": "LLM API Base URL",
                        "type": "string",
                        "description": "Base URL for the LLM API (e.g. https://api.openai.com/v1).",
                        "default": "https://api.openai.com/v1"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
