# Reddit Comments Scraper (Cheap) (`data_api/reddit-comments-scraper-cheap`) Actor

High-performance Reddit web scraper. Extract thousands of comments instantly from any post, subreddit, or user profile.

- **URL**: https://apify.com/data\_api/reddit-comments-scraper-cheap.md
- **Developed by:** [Data API](https://apify.com/data_api) (community)
- **Categories:** Social media, Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#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.

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

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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 Comments Scraper

![Reddit Comments Scraper](cover.jpg)

Reddit is where people actually say what they think, but pulling that out in bulk is a pain. The official API wants credentials and caps how fast you can read, and copying replies by hand falls apart the moment a thread runs into the hundreds. This scraper reads Reddit's own public JSON feeds, walks the whole comment tree, and gives you every reply as a clean row with the author, text, score, community, and timestamps attached. Point it at a thread, a subreddit, or a user profile and it works out which is which. No login, no API key, no scrolling.

### What you get

Every comment becomes one tidy row with the same shape, so the data drops straight into a sheet or database. Nested replies are flattened into individual rows, so a deep thread comes back fully expanded rather than buried. Each row carries:

- **Who and where** — `authorName`, `subredditName`, `isOriginalPoster`
- **The content** — `commentText`, `voteScore`, `replyCount`
- **Links and IDs** — `commentUrl`, `threadUrl`, `commentId`, `shortId`, `parentNodeId`
- **Timing** — `postedAt`, `collectedAt`

### Quick start

1. Click **Try for free** and open the input form.
2. Paste one or more Reddit links into **Reddit links** — a thread, a subreddit, or a user profile all work.
3. Pick how comments should be ordered and set a **Comment cap** to control the run size.
4. Hit **Start**, then export the results as JSON, CSV, Excel, or XML once it finishes.

![How it works](how-it-works.jpg)

### Use cases

- **Sentiment analysis** — gather raw replies to gauge how people feel about a brand, product, or topic
- **Audience research** — read what real users actually say in the threads that matter to your niche
- **Academic and NLP work** — assemble large conversational datasets for language modeling or social studies
- **Competitor monitoring** — track the discussion under posts that mention rivals or their products
- **Community management** — pull a user's comment history or a subreddit's recent replies for moderation context
- **Trend spotting** — surface the highest-scoring takes early by sorting on Top or Best

### Input

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `redditUrls` | array of strings | Yes | Reddit links to pull comments from. Each can be a thread, subreddit, or user profile; the scraper detects the type per link. |
| `sortOrder` | string | No | How Reddit ranks comments before collection: `confidence` (Best), `top`, `new`, `controversial`, `old`, or `qa`. Default `confidence`. |
| `resultsLimit` | integer | No | Maximum comments to pull per run (hard cap 5000). Default `50`. |
| `proxyConfiguration` | object | No | Proxies that route requests across IPs to avoid throttling. Defaults to Apify Proxy. |

#### Example input

```json
{
    "redditUrls": [
        "https://www.reddit.com/r/dataisbeautiful/comments/18x9k2p/oc_global_coffee_consumption_per_capita/"
    ],
    "sortOrder": "confidence",
    "resultsLimit": 50,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
}
````

### Output

Each comment comes back as one row with a consistent set of fields, ready to export to JSON, CSV, or Excel. Nested replies are flattened into their own rows.

#### Example output

```json
{
    "commentId": "t1_jk2xyz",
    "shortId": "jk2xyz",
    "commentUrl": "https://www.reddit.com/r/dataisbeautiful/comments/18x9k2p/oc_global_coffee_consumption_per_capita/jk2xyz/",
    "threadUrl": "https://www.reddit.com/r/dataisbeautiful/comments/18x9k2p/oc_global_coffee_consumption_per_capita/",
    "parentNodeId": "t3_18x9k2p",
    "authorName": "brewmetrics",
    "subredditName": "r/dataisbeautiful",
    "commentText": "Finland topping the chart tracks with everything I've read. Would love to see this split by age group next.",
    "voteScore": 248,
    "replyCount": 4,
    "isOriginalPoster": false,
    "postedAt": "2024-12-18T09:41:02+00:00",
    "collectedAt": "2026-06-30T08:00:00+00:00"
}
```

#### Output fields

| Field | Type | Description |
|-------|------|-------------|
| `commentId` | string | Fully-qualified Reddit ID, prefix included (for example t1\_abc) |
| `shortId` | string | Bare comment ID with no type prefix |
| `commentUrl` | string | Direct link to the comment on Reddit |
| `threadUrl` | string | Link to the thread the comment belongs to |
| `parentNodeId` | string | Reddit ID of whatever this comment replies to, post or comment |
| `authorName` | string | Handle of the redditor who wrote the comment |
| `subredditName` | string | Community the comment was posted in, with the r/ prefix |
| `commentText` | string | The written content of the comment |
| `voteScore` | integer | Net score, upvotes less downvotes |
| `replyCount` | integer | How many direct replies hang off this comment |
| `isOriginalPoster` | boolean | True when the commenter also started the thread |
| `postedAt` | string | ISO 8601 timestamp for when the comment first went up |
| `collectedAt` | string | ISO 8601 timestamp for when this row was captured |

### Tips for best results

- **Sort on Top or Best for the highlights.** If you only want the comments people actually saw, set `sortOrder` to `top` and keep `resultsLimit` modest.
- **Start with a small cap.** Run 20–50 comments first to confirm the output fits your pipeline, then raise `resultsLimit` for the full pull.
- **Thread links go deepest.** A single post URL walks the whole reply tree; subreddit and user links return recent comments without nesting.
- **Turn on proxies if a run stalls.** Reddit throttles repeat traffic, so enabling Apify Proxy keeps larger jobs moving.
- **Newest vs. Best matters.** User and profile pulls default to newest-first; switch `sortOrder` when you care more about top replies than recency.

### How can I use Reddit comments data?

**How can I use the Reddit Comments Scraper for sentiment analysis?**
Point it at the threads where your brand, product, or topic comes up, set `sortOrder` to `top`, and let it collect the comments. Each row gives you the comment text plus its score, so you can weight opinions by how much the community agreed with them before running them through any sentiment model.

**How can I download every reply from a Reddit thread?**
Paste a single post URL into `redditUrls`. The scraper walks the full comment tree and flattens every nested reply into its own row, so a long discussion comes back complete rather than truncated. Raise `resultsLimit` if the thread is large.

**How can I pull a Reddit user's comment history?**
Drop a profile link such as `https://www.reddit.com/user/someuser/` into `redditUrls`. You get that account's recent comments — text, community, score, and timestamps — which is handy for moderation review, research, or understanding how an account participates across subreddits.

**How can I scrape comments from a whole subreddit?**
Add a subreddit link like `https://www.reddit.com/r/technology/` and the scraper collects the newest comments flowing across that community, no need to list individual threads. Combine it with `resultsLimit` to keep the volume in check.

### Is it legal to scrape data?

Our actors are ethical and do not extract any private user data, such as email addresses or private contact information. They only extract what the user has chosen to share publicly. We therefore believe that our actors, when used for ethical purposes by Apify users, are safe.

However, you should be aware that your results could contain personal data. Personal data is protected by the GDPR in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers.

You can also read Apify's blog post on the [legality of web scraping](https://blog.apify.com/is-web-scraping-legal/).

### Support

Questions, feature requests, or a field you'd like added? Reach out at <data.apify@proton.me> and we'll get back to you.

# Actor input Schema

## `startUrls` (type: `array`):

List of Reddit URLs to scrape comments from. Supports posts, user profiles, subreddits, and search URLs.

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

Sort order for comments.

## `maxItems` (type: `integer`):

Maximum number of comments to collect per run.

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

Select proxies to use for requests. Helps avoid IP blocking.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.reddit.com/r/AskMen/comments/1rt23re/how_to_overcome_lust_as_a_touch_deprived_man/"
  ],
  "sort": "confidence",
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# 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 = {
    "startUrls": [
        "https://www.reddit.com/r/AskMen/comments/1rt23re/how_to_overcome_lust_as_a_touch_deprived_man/"
    ],
    "sort": "confidence",
    "maxItems": 100,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("data_api/reddit-comments-scraper-cheap").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 = {
    "startUrls": ["https://www.reddit.com/r/AskMen/comments/1rt23re/how_to_overcome_lust_as_a_touch_deprived_man/"],
    "sort": "confidence",
    "maxItems": 100,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("data_api/reddit-comments-scraper-cheap").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 '{
  "startUrls": [
    "https://www.reddit.com/r/AskMen/comments/1rt23re/how_to_overcome_lust_as_a_touch_deprived_man/"
  ],
  "sort": "confidence",
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call data_api/reddit-comments-scraper-cheap --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=data_api/reddit-comments-scraper-cheap",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Reddit Comments Scraper (Cheap)",
        "description": "High-performance Reddit web scraper. Extract thousands of comments instantly from any post, subreddit, or user profile.",
        "version": "0.0",
        "x-build-id": "EyhmKI9xber2WZS9E"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/data_api~reddit-comments-scraper-cheap/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-data_api-reddit-comments-scraper-cheap",
                "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/data_api~reddit-comments-scraper-cheap/runs": {
            "post": {
                "operationId": "runs-sync-data_api-reddit-comments-scraper-cheap",
                "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/data_api~reddit-comments-scraper-cheap/run-sync": {
            "post": {
                "operationId": "run-sync-data_api-reddit-comments-scraper-cheap",
                "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": [
                    "startUrls"
                ],
                "properties": {
                    "startUrls": {
                        "title": "Start URLs",
                        "type": "array",
                        "description": "List of Reddit URLs to scrape comments from. Supports posts, user profiles, subreddits, and search URLs.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "sort": {
                        "title": "Sort By",
                        "enum": [
                            "confidence",
                            "top",
                            "new",
                            "controversial",
                            "old",
                            "qa"
                        ],
                        "type": "string",
                        "description": "Sort order for comments.",
                        "default": "confidence"
                    },
                    "maxItems": {
                        "title": "Max Comments",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Maximum number of comments to collect per run.",
                        "default": 100
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Select proxies to use for requests. Helps avoid IP blocking."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
