# Reddit Search Comments (`shareze001/reddit-search-comments`) Actor

A Reddit comment search tool that finds and collects comments based on keywords across public discussions. It returns full context including comment content, engagement metrics, related posts, communities, and author details.

- **URL**: https://apify.com/shareze001/reddit-search-comments.md
- **Developed by:** [shareze](https://apify.com/shareze001) (community)
- **Categories:** Developer tools, E-commerce, Social media
- **Stats:** 3 total users, 0 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$10.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period. You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#rental-actors

## 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 Search Comments

This tool allows you to **search Reddit comments by keywords** and collect detailed context about each comment, including the post, community, author, and engagement metrics.
It’s ideal for sentiment analysis, brand monitoring, topic research, and audience insights.

***

### 🚀 How It Works

1. Provide **keywords** to search within Reddit comments.
2. Set the **number of comments** you want to retrieve.
3. The scraper searches Reddit discussions and returns structured data with full comment context.

***

### ⚙️ Input Parameters

| Parameter    | Type      | Required | Default | Description                                                             |
| ------------ | --------- | -------- | ------- | ----------------------------------------------------------------------- |
| **keywords** | `string`  | ✅        | –       | Keywords to search in Reddit comments (e.g., `"nike"`, `"golf shoes"`). |
| **size**     | `integer` | ✅        | `10`    | Number of comments to return (minimum: 1).                              |

#### Example Input

```json
{
  "keywords": "nike",
  "size": 10
}
```

***

### 📦 Output Structure

Each comment result follows this structure:

```json
{
  "comment_id": "t1_nvvx3ex",
  "post_id": "t3_1pvgefo",
  "post_title": "Watching this for the hundredth time and it still hits the same",
  "post_url": "https://www.reddit.com/r/golf/comments/1pvgefo/watching_this_for_the_hundredth_time_and_it_still/",
  "post_votes": "8733",
  "post_comments": "285",

  "community_id": "t5_2qhcs",
  "community_name": "r/golf",
  "community_url": "https://www.reddit.com/r/golf/",
  "community_icon": "https://styles.redditmedia.com/t5_2qhcs/styles/communityIcon_gxrgkk0azli81.png",
  "community_description": "",
  "community_members": "1690426",
  "community_online_members": "897",

  "comment_created_timestamp": "2025-12-25T16:05:00",
  "comment_content": "Every Nike executive came in their pants when this happened.",
  "comment_votes": "1050",
  "comment_url": "https://www.reddit.com/r/golf/comments/1pvgefo/watching_this_for_the_hundredth_time_and_it_still/nvvx3ex/",

  "author_name": "Code_Bones",
  "author_icon": "https://www.redditstatic.com/avatars/defaults/v2/avatar_default_4.png"
}
```

***

### 🧠 Field Description

#### Comment

| Field                         | Description                       |
| ----------------------------- | --------------------------------- |
| **comment\_id**                | Unique identifier of the comment. |
| **comment\_content**           | Text content of the comment.      |
| **comment\_created\_timestamp** | Time when the comment was posted. |
| **comment\_votes**             | Number of upvotes received.       |
| **comment\_url**               | Direct link to the comment.       |

#### Post

| Field             | Description                     |
| ----------------- | ------------------------------- |
| **post\_id**       | ID of the related post.         |
| **post\_title**    | Title of the Reddit post.       |
| **post\_url**      | URL of the post.                |
| **post\_votes**    | Total upvotes of the post.      |
| **post\_comments** | Number of comments on the post. |

#### Community

| Field                        | Description                      |
| ---------------------------- | -------------------------------- |
| **community\_id**             | Subreddit ID.                    |
| **community\_name**           | Subreddit name (e.g., `r/golf`). |
| **community\_url**            | Subreddit URL.                   |
| **community\_icon**           | Community icon image.            |
| **community\_members**        | Total subscribers.               |
| **community\_online\_members** | Currently active users.          |

#### Author

| Field           | Description                            |
| --------------- | -------------------------------------- |
| **author\_name** | Reddit username of the comment author. |
| **author\_icon** | Avatar image of the author.            |

***

### 🪄 Notes

- Searches **public Reddit comments only**.
- Returns full context including post and subreddit metadata.
- Useful for keyword-based discussion discovery.

***

### 🧰 Use Cases

- Brand and sentiment monitoring
- Topic and trend analysis
- Community research
- Collecting real user opinions
- Training NLP or AI models on discussion data

# Actor input Schema

## `keywords` (type: `string`):

Search keywords, for example: nike, nike shoes etc.

## `size` (type: `integer`):

comments size

## Actor input object example

```json
{
  "keywords": "nike",
  "size": 10
}
```

# 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 = {
    "keywords": "nike",
    "size": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("shareze001/reddit-search-comments").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 = {
    "keywords": "nike",
    "size": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("shareze001/reddit-search-comments").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 '{
  "keywords": "nike",
  "size": 10
}' |
apify call shareze001/reddit-search-comments --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,shareze001/reddit-search-comments"
        }
    }
}

```

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/rd9nyG1eE3NfnXiNK/builds/AmDckdfdma3OIj6Zn/openapi.json
