# Reddit Users Actor (`pintostudio/reddit-users-actor`) Actor

Looking on ways to get user profile information, their posts, or their comments with customizable filters and pagination from Reddit? The Reddit User Scraper is an Apify Actor that extracts data from Reddit user profiles.

- **URL**: https://apify.com/pintostudio/reddit-users-actor.md
- **Developed by:** [Pinto Studio](https://apify.com/pintostudio) (community)
- **Categories:** Social media, Developer tools, Other
- **Stats:** 20 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$7.99 / 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/actors/running/actors-in-store.md#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 User Scraper - Documentation

### Overview

The Reddit User Scraper is an Apify Actor that extracts data from Reddit user profiles. You can scrape user profile information, their posts, or their comments with customizable filters and pagination.

### What You Can Scrape

This actor supports three types of operations:

1. **Profile** - Get basic information about a Reddit user
2. **Posts** - Retrieve posts submitted by a user
3. **Comments** - Fetch comments made by a user

### Input Parameters

#### Required Parameters

| Parameter | Type | Description | Example |
|-----------|------|-------------|---------|
| `userUrl` | String | Full Reddit URL of the user to scrape | `https://www.reddit.com/user/wsbapp/` |

#### Optional Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `operationType` | String | `profile` | Type of data to scrape: `profile`, `posts`, or `comments` |
| `limit` | Integer | 25 | Number of items to fetch per page (1-100) |
| `page` | Integer | 1 | Page number to fetch (1-50) |
| `sortBy` | String | `hot` | Sort order for posts/comments: `hot`, `new`, `top`, `rising`, or `controversial` |

### How to Use

#### Example 1: Get User Profile

**Input:**

```json
{
  "operationType": "profile",
  "userUrl": "https://www.reddit.com/user/wsbapp/"
}
```

**Output:**

```json
{
  "success": true,
  "message": "Success",
  "data": {
    "user": {
      "id": "qbvp0eq8b",
      "name": "wsbapp",
      "created": "2023-12-20T07:48:10.000Z",
      "linkKarma": 106831,
      "commentKarma": 176,
      "totalKarma": 107007,
      "isGold": false,
      "isMod": true,
      "verified": true,
      "avatar": "https://www.redditstatic.com/avatars/defaults/v2/avatar_default_3.png",
      "isEmployee": false,
      "hasVerifiedEmail": false,
      "isBanned": false,
      "url": "https://reddit.com/user/wsbapp"
    }
  },
  "error": null
}
```

#### Example 2: Get User Posts

**Input:**

```json
{
  "operationType": "posts",
  "userUrl": "https://www.reddit.com/user/wsbapp/",
  "limit": 25,
  "page": 1,
  "sortBy": "new"
}
```

**Output:**

```json
{
  "success": true,
  "message": "Success",
  "data": {
    "username": "wsbapp",
    "page": 1,
    "limit": 25,
    "count": 25,
    "after": "t3_1pult0m",
    "posts": [
      {
        "id": "1q79zu2",
        "title": "Daily Discussion Thread for January 08, 2026",
        "author": "wsbapp",
        "subreddit": "wallstreetbets",
        "score": 138,
        "upvoteRatio": 0.94,
        "numComments": 3570,
        "created": "2026-01-08T12:01:19.000Z",
        "url": "https://www.reddit.com/r/wallstreetbets/comments/1q79zu2/...",
        "permalink": "https://reddit.com/r/wallstreetbets/comments/1q79zu2/...",
        "isVideo": false,
        "isSelf": true,
        "thumbnail": "self",
        "domain": "self.wallstreetbets",
        "gilded": 0,
        "locked": false,
        "spoiler": false,
        "nsfw": false
      }
    ]
  },
  "error": null
}
```

#### Example 3: Get User Comments

**Input:**

```json
{
  "operationType": "comments",
  "userUrl": "https://www.reddit.com/user/wsbapp/",
  "limit": 10,
  "page": 1,
  "sortBy": "hot"
}
```

**Output:**

```json
{
  "success": true,
  "message": "Success",
  "data": {
    "username": "wsbapp",
    "page": 1,
    "limit": 10,
    "count": 10,
    "after": "t1_ktj7bqs",
    "comments": [
      {
        "id": "ktjb25r",
        "author": "wsbapp",
        "body": "#Ban Bet Won\n\n/u/Storewars56 made a bet...",
        "score": 45,
        "created": "2024-03-06T00:22:00.000Z",
        "parentId": "t3_1b72tbp",
        "gilded": 0,
        "permalink": "https://reddit.com/r/wallstreetbets/comments/1b72tbp/.../ktjb25r/",
        "url": "https://www.reddit.com/r/wallstreetbets/comments/1b72tbp/...",
        "replies": []
      }
    ]
  },
  "error": null
}
```

### Output Data Structure

#### Profile Operation

Returns user account information including:

- Account ID and username
- Creation date
- Karma scores (link, comment, and total)
- Account status (verified, mod, employee, banned)
- Avatar URL
- Profile URL

#### Posts Operation

Returns an array of posts with:

- Post ID and title
- Author and subreddit
- Score and upvote ratio
- Number of comments
- Creation date
- URLs (post URL and permalink)
- Media type indicators (isVideo, isSelf)
- Post status (locked, spoiler, nsfw, gilded)
- Pagination info (page, limit, count, after token)

#### Comments Operation

Returns an array of comments with:

- Comment ID and author
- Comment text (body)
- Score and gilded count
- Creation date
- Parent post ID
- Permalink and post URL
- Replies array
- Pagination info (page, limit, count, after token)

### Tips for Beginners

1. **Start with Profile**: If you're new, begin with the `profile` operation to verify the user exists before fetching posts or comments.

2. **Pagination**: Use the `page` parameter to fetch more results. Start with page 1, then increment to get older content.

3. **Limit Your Requests**: Start with a small `limit` (like 10-25) to test, then increase if needed. Maximum is 100 items per page.

4. **Sort Options**:
   - Use `hot` for currently trending content
   - Use `new` for most recent content
   - Use `top` for highest-scoring content
   - Use `controversial` for divisive content

5. **Valid User URLs**: Make sure your `userUrl` follows this format: `https://www.reddit.com/user/USERNAME/`

### Error Handling

If the actor encounters an error, the output will include:

```json
{
  "success": false,
  "message": "Error description",
  "data": null,
  "error": "Detailed error message"
}
```

Common errors:

- Invalid user URL format
- User doesn't exist

### Limitations

- Maximum 100 items per page
- Maximum 50 pages per request
- Cannot access private or suspended accounts

### Support

For issues, questions, or feature requests, please refer to the Apify platform documentation or:

1. Create an issue and share your resource
2. Send us private message
3. Contact us via Telegram: @pintoflow

# Actor input Schema

## `operationType` (type: `string`):

Type of data to scrape from the Reddit user

## `userUrl` (type: `string`):

The full Reddit URL of the user to scrape (e.g., https://www.reddit.com/user/wsbapp/)

## `limit` (type: `integer`):

Maximum number of comments to fetch (for comments operation)

## `page` (type: `integer`):

Maximum number of comment pages to fetch (for comments operation)

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

How to sort comments (for comments operation)

## Actor input object example

```json
{
  "operationType": "profile",
  "userUrl": "https://www.reddit.com/user/wsbapp/",
  "limit": 25,
  "page": 1,
  "sortBy": "hot"
}
```

# 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 = {
    "operationType": "profile",
    "userUrl": "https://www.reddit.com/user/wsbapp/",
    "limit": 25,
    "page": 1,
    "sortBy": "hot"
};

// Run the Actor and wait for it to finish
const run = await client.actor("pintostudio/reddit-users-actor").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 = {
    "operationType": "profile",
    "userUrl": "https://www.reddit.com/user/wsbapp/",
    "limit": 25,
    "page": 1,
    "sortBy": "hot",
}

# Run the Actor and wait for it to finish
run = client.actor("pintostudio/reddit-users-actor").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 '{
  "operationType": "profile",
  "userUrl": "https://www.reddit.com/user/wsbapp/",
  "limit": 25,
  "page": 1,
  "sortBy": "hot"
}' |
apify call pintostudio/reddit-users-actor --silent --output-dataset

```

## MCP server setup

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

```

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/m8ehTfpT5bQsxEr8S/builds/uFE0zOjWqPB1V8v2o/openapi.json
