# Reddit User Comments (`opspilot.cc/reddit-user-comments`) Actor

👤 Reddit User Comments | What a user actually says, and where they say it Give it Reddit usernames and get every comment as a row — text, score, the post it belongs to, and when it was written.

- **URL**: https://apify.com/opspilot.cc/reddit-user-comments.md
- **Developed by:** [wang wei](https://apify.com/opspilot.cc) (community)
- **Features:** Limited permissions
- **Stats:** 26 total users, 8 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.005 / actor start

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/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 User Comments

> What a Reddit user actually says — and where they say it.

### ✨ What you get

One dataset row per comment:

| Field | What it is |
|---|---|
| `text` / `hasText` | comment body; `hasText: false` marks a removed or empty comment |
| `score` | upvotes on that comment |
| `postId` / `postTitle` | the post it was written under — chain into the post-comments Actor for the full thread |
| `subreddit` | `null` on this data source (Reddit does not return it here) rather than a guess |
| `createdAt` | when it was written |
| `username` / `sort` / `position` | whose comment it is, the sort used, and its position |

The run summary reports, per user: comments collected, how many had text, **how many distinct posts and active days** they span, median and total score, and the account's karma if available — plus top keywords across the run.

### 💼 Use cases

- **Deciding whether an account is a real participant or a burst account** — read `distinctPosts` and `activeDays` next to `commentsCollected`. Twenty comments on one post in one day is a burst; the same volume spread over many posts and many days is someone who actually holds a place in the community, and only one of those two is worth contacting.
- **Reading a user's best-known contributions instead of their latest** — `sort: TOP` returns the comments the community rewarded, which is the argument to make in a pitch. `NEW` tells you whether they are still active at all; run both and the gap between them is the profile.
- **Pulling the threads a user showed up in** — `postId` and `postTitle` ride along on every row, so a user's comment history doubles as a map of the discussions they care about. Chain those ids into the Reddit Post Comments Actor to recover the full exchange around any single remark.
- **Sizing an outreach list** — up to 30 usernames per run with per-user counts, karma where available and top keywords across the run, so you can qualify a batch of candidates on behaviour before you spend a single DM.

### ✅ Who this is for

- **Community managers** trying to tell a genuinely active participant from a drive-by, who need `distinctPosts` and `activeDays` rather than a follower count to make that call.
- **User-research leads** building a picture of how one person talks about a category across many threads, and who need their words rather than a summary of them.
- **Reddit outreach and partnership teams** prospecting people who already contribute in the space, using `TOP`-sorted comments as evidence of what the user is known for.
- **Analysts qualifying accounts at scale** — up to 30 users per run, with karma and keyword signals in the summary, is enough to cut a long candidate list down before anyone spends time on it.

### ❌ Who this is NOT for

- **Anything that needs the subreddit on each comment** — `subreddit` is `null` on this data source because Reddit does not return it here, and this Actor does not guess it back out of the post id. So you cannot ask "which communities does this person post in" from these rows alone: take the `postId` values and look them up with the subreddit posts Actor.
- **Grouping a user's comments by community** — a direct consequence of the above, and the one that quietly ruins a "which subreddits is this person active in" report. Chaining to another Actor is the fix, not a workaround you can skip.
- **Deleted, suspended or simply quiet accounts** — these return an empty response with no error, so "no comments returned" does not mean you mistyped the username. The reason is listed in `warnings`; there is no data to recover for them here.
- **Reading `hasText: false` rows as content** — it marks a removed or empty comment. Those rows are structural placeholders, so keyword and sentiment work over them measures nothing.
- **Treating one account's comment history as a market view** — this is a single person's activity, on one platform, before purchase. It is not review data and not a sentiment score for anything; and one prolific commenter is not a sample of the buyers you care about.

### 🚀 Quick start

1. Open the Actor and press **Start** (defaults to `u/spez`).
2. Add usernames — `spez`, `u/spez` or a profile URL all work.
3. Read `distinctPosts` and `activeDays` in the summary: that is how you tell a niche participant from a community organiser.

### 📥 Input parameters

| Parameter | Type | Default | What it does |
|---|---|---|---|
| `usernames` | list | `spez` | Users to pull, one per line, up to 30 per run. |
| `sort` | select | `NEW` | `NEW` for current activity, `TOP` for their best-known contributions, `HOT`, `CONTROVERSIAL`. |
| `maxCommentsPerUser` | number | `50` | Cap per user (1–200). Cost scales linearly with the number of users. |

### 📤 Output

- **Dataset** — one row per comment (or a notice when nothing was collected)
- **SUMMARY** — per-user activity stats, karma, top keywords, warnings

### ⚙️ How it works

1. Each input is reduced to a username.
2. Comments are paged with Reddit's own cursor and de-duplicated by comment id.
3. The comment body is read from Reddit's `content` object (plain-text preview first, rendered HTML as a fallback).
4. The user's post count and active days are computed from the collected rows rather than trusted from a profile field that may not exist.

### 💰 Billing

**Billed per run.** A single `apify-actor-start` charge applies when the run begins, at the price shown on this Actor's page. A run that returns 300 rows costs the same as one that returns 3. There is no daily run cap.

**Free plan limit.** One run collects **5 users over 2 pages, 50 comments each**. That is a hard ceiling on the upstream cost, so it cannot be raised from the input form. A capped run still succeeds: it writes a `notice` row to the dataset, sets `appliedLimits.capped: true` in `SUMMARY`, and logs why. Any paid Apify plan lifts the cap to 30 users over 4 pages.

### ❓ FAQ

**Why is `subreddit` empty?**
This data source returns the post id and title but not the subreddit. Rather than guessing from the post id, the field stays `null`. If you need the subreddit, take the `postId` values and look them up with the subreddit posts Actor.

**The run says "no comments returned" for a user — is the account wrong?**
Not necessarily. Deleted, suspended or quiet accounts return an empty response with no error, and the reason is listed in `warnings`.

**How do I judge whether a user is worth targeting?**
Look at `distinctPosts` and `activeDays` next to `commentsCollected`. Many comments on one post in one day is a burst; comments spread over many posts and days is a genuinely active participant.

**Can I get the full thread a comment belongs to?**
Yes — feed the `postId` values to the Reddit Post Comments Actor.

### 📚 Resources

- Reddit public comment data (no login required)
- Apify free plan: monthly credit covers usage, no separate daily cap

# Changelog

This Actor's version history is a separate document: https://apify.com/opspilot.cc/reddit-user-comments/changelog.md

# Actor input Schema

## `usernames` (type: `array`):

One per line, up to 30 per run. Accepts spez, u/spez or a full reddit.com/u/spez URL.

## `sort` (type: `string`):

New for a user's current activity, top for their best-known contributions.

## `maxCommentsPerUser` (type: `integer`):

Cap on collected comments per user. Cost scales linearly with users.

## Actor input object example

```json
{
  "usernames": [
    "spez"
  ],
  "sort": "NEW",
  "maxCommentsPerUser": 50
}
```

# Actor output Schema

## `dataset` (type: `string`):

One row per comment, or a single notice when nothing was collected.

## `summary` (type: `string`):

Per-user activity stats, karma, top keywords and warnings.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("opspilot.cc/reddit-user-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("opspilot.cc/reddit-user-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 '{}' |
apify call opspilot.cc/reddit-user-comments --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,opspilot.cc/reddit-user-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/EDX54GXAKY3nSiD3e/builds/Y4qZnceAuSBfRaael/openapi.json
