# Reddit Comment Scraper (`myagizm/reddit-comment-scraper`) Actor

Scrape Reddit comments as structured JSON — full comment trees from any post or subreddit. No login, no API key.

- **URL**: https://apify.com/myagizm/reddit-comment-scraper.md
- **Developed by:** [MYM](https://apify.com/myagizm) (community)
- **Categories:** Social media
- **Stats:** 2 total users, 0 monthly users, 94.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.10 / 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.

- **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 Comment Scraper — Scrape Reddit Comments as Structured JSON (No API Key, No Login)

<p align="center">
Scrape Reddit comments from any post or subreddit and get clean, structured JSON — <b>no API key, no login, no cookies or account required</b>. Pull entire comment trees at scale and go beyond the limitations of the official Reddit API. Export scraped data to JSON, CSV, Excel, or XML, schedule runs via API, and integrate with your tools and AI workflows.
</p>

<p align="center">
<b>Built for AI agents:</b> plug this scraper into Claude, ChatGPT / Codex, and Cursor through the Apify MCP server to let your agent read and reason over live Reddit discussions.
</p>

<p align="center">
<a href="https://apify.com/myagizm/reddit-comment-scraper"><img src="https://img.shields.io/badge/Try%20Now-Reddit%20Comment%20Scraper-45C88A?style=for-the-badge" alt="Try Now"></a>
<a href="https://apify.com/myagizm/reddit-comment-scraper/input-schema"><img src="https://img.shields.io/badge/Input%20Schema-View-2B6CB0?style=for-the-badge" alt="Input Schema"></a>
<a href="https://apify.com/myagizm/reddit-comment-scraper/api"><img src="https://img.shields.io/badge/API%20Docs-Read-6B46C1?style=for-the-badge" alt="API Docs"></a>
</p>

<p align="center">
<a href="#what-can-reddit-comment-scraper-do">What it does</a> •
<a href="#use-with-ai-agents-mcp">AI agents (MCP)</a> •
<a href="#how-to-scrape-reddit-comments">How to use</a> •
<a href="#what-data-can-you-scrape-from-reddit-comments">Output data</a> •
<a href="#limits">Limiting results</a> •
<a href="#output-example">Output example</a> •
<a href="#how-much-does-scraping-reddit-comments-cost">Pricing</a> •
<a href="#integrations">Integrations</a> •
<a href="#faq">FAQ</a> •
<a href="#want-other-reddit-data">Other actors</a>
</p>

***

### What can Reddit Comment Scraper do? {#what-can-reddit-comment-scraper-do}

**Reddit Comment Scraper** lets you scrape Reddit comments in bulk and returns them as clean, structured JSON. Point it at individual post URLs, or at whole subreddits, and it opens the posts, walks the nested reply threads, and hands you every comment with author, score, timestamps, and the exact permalink — ready for analysis, dashboards, or AI agents.

There is **no API key, no login, and no OAuth** — and no cookies or account required. You paste in what you want, hit run, and the actor handles pagination, nested replies, retries, and rate-limiting for you. It only collects **publicly available data**, and there are no limitations on the number of requests. Results stream into a dataset you can export to JSON, CSV, Excel, or XML, or pull straight from the API. **Get your first results free in under 2 minutes.**

#### 💬 Scrape full Reddit comment trees, not just top-level replies

Traverse the nested reply structure of any thread down to a depth you choose. Each comment keeps its `postId` and `permalink` so you can reconstruct the conversation or link straight back to it on Reddit.

#### 🗂️ Two ways to scrape Reddit comments

Scrape by **post URL** for precise, known threads, or by **subreddit name** to automatically open the latest posts in a community and pull their comments. Mix both in a single run and scrape many Reddit threads at once.

#### 📊 Structured, analysis-ready comment fields

Every comment comes back as a flat JSON object — `id`, `body`, `author`, `score`, `subreddit`, `postTitle`, `createdUtc`, and more. No HTML scraping, no cleanup, no parsing markup on your end.

#### 🔄 Sort and time controls

When scraping subreddits, choose which posts to open — **Hot, New, Top, Rising, or Controversial** — and, for Top and Controversial, a time window from the past hour all the way to all time.

#### ⚡ Fast, fresh data — reliable and polite

Built-in retries, a configurable politeness delay, and automatic pagination keep runs stable. Fresh data every run, with no caching, and a single run is capped at roughly 10 minutes so results land quickly and predictably.

#### ✅ Filter Reddit comments by date

Keep only comments created on or after a date you specify — perfect for incremental scraping and monitoring recent activity in a thread or community.

#### 🤖 Agent- and automation-friendly

Works out of the box with the Apify MCP server, n8n, Zapier, and Make, plus any tool that can call an HTTP API — so Reddit comments can flow into your stack without custom code.

***

### Use with AI agents — Claude, ChatGPT & Cursor (MCP) {#use-with-ai-agents-mcp}

This actor is ready to use as a **tool for AI agents** through the [Apify MCP server](https://mcp.apify.com). Once connected, your agent can call Reddit Comment Scraper on demand — for example, "summarize the top objections in this Reddit thread" or "pull the last week of comments from r/webdev and cluster the themes."

- **Claude** (Claude Desktop, Claude Code, or the API) — add the Apify MCP server and expose `myagizm/reddit-comment-scraper` as a tool.
- **ChatGPT / Codex** — use the MCP connector so the model can fetch live Reddit comments mid-conversation.
- **Cursor** — wire the actor into your editor's MCP tools to enrich code or research tasks with real discussion data.

Because output is clean JSON, agents can parse, filter, and reason over it directly. From there, downstream **MCP connectors** — Slack, Notion, Airtable, Google Sheets, Zapier, Make, and n8n — let you route the scraped comments anywhere: a channel alert, a database row, a spreadsheet, or a workflow trigger.

***

### How to scrape Reddit comments {#how-to-scrape-reddit-comments}

1. Open **[Reddit Comment Scraper](https://apify.com/myagizm/reddit-comment-scraper)** on Apify.
2. Add one or more **Post URLs** under `startUrls`, and/or one or more **Subreddits** under `subreddits`.
3. (Optional) Pick a **Post sort** (`sort`) and, for Top/Controversial, a **Time range** (`time`).
4. Set your limits — **Max comments per post** (`maxComments`), **Max comment depth** (`maxCommentDepth`), and **Max posts to open** (`maxItems`).
5. (Optional) Set **commentDateLimit** to keep only recent comments.
6. Click **Start** and watch results stream into the dataset.
7. **Export** to JSON, CSV, Excel, or XML, or pull the data from the API.

No account credentials are required. The actor takes care of pagination, nested replies, retries, and throttling automatically.

***

### What data can you scrape from Reddit comments? {#what-data-can-you-scrape-from-reddit-comments}

Each item in the dataset is a single Reddit comment with the following fields:

| Field | Type | Description |
|-------|------|-------------|
| `id` | string | Reddit comment ID (e.g. `t1_ouxds1u`). |
| `body` | string | Full comment text. |
| `type` | string | Item type — `comment`. |
| `score` | integer | Net upvote score of the comment. |
| `author` | string | Username of the comment author. |
| `postId` | string | ID of the parent post (e.g. `t3_1ukjn5j`). |
| `postUrl` | string | URL of the post the comment belongs to. |
| `permalink` | string | Direct link to the comment on Reddit. |
| `postTitle` | string | Title of the parent post. |
| `scrapedAt` | string (ISO 8601) | Timestamp when the comment was scraped. |
| `subreddit` | string | Subreddit the comment was posted in. |
| `createdUtc` | string (ISO 8601) | When the comment was created (UTC). |

> Field availability depends on what Reddit exposes for a given comment. The scraper returns only what is publicly visible on the thread.

***

### Use cases for scraping Reddit comments

- **Sentiment & opinion analysis** — gauge how a community reacts to a product, launch, or news event.
- **Market & audience research** — mine real, unfiltered feedback and pain points from niche subreddits.
- **Content & SEO research** — discover the questions and language your audience actually uses.
- **Brand & reputation monitoring** — track mentions and discussions across relevant threads.
- **Academic & social research** — build datasets of public discourse for analysis.
- **AI/LLM training & RAG** — collect structured discussion data to fine-tune or ground models.
- **Community moderation insight** — study how conversations evolve within a subreddit.
- **Lead generation & trend discovery** — surface emerging topics and demand signals from active discussions.

***

### Scrape comments from specific posts {#by-post-url}

Provide exact post URLs to pull their full comment trees. Ideal when you already know the threads you care about.

```json
{
  "startUrls": [
    { "url": "https://www.reddit.com/r/webdev/comments/1ukjn5j/monthly_getting_started_web_dev_career_thread/" },
    { "url": "https://www.reddit.com/r/pics/comments/abc123/title/" }
  ],
  "maxComments": 100,
  "maxCommentDepth": 6
}
```

### Scrape comments from a subreddit {#by-subreddit}

Give one or more subreddit names and the actor opens the latest posts in each (per your `sort`) and scrapes their comments. The `r/` prefix is optional.

```json
{
  "subreddits": ["AskReddit", "news"],
  "sort": "hot",
  "maxPostsPerSource": 10,
  "maxComments": 50
}
```

### Scrape top comments over a time window {#top-with-time}

Combine `sort` with `time` to pull comments from the best-performing posts of a period.

```json
{
  "subreddits": ["webdev"],
  "sort": "top",
  "time": "week",
  "maxItems": 25,
  "maxComments": 50
}
```

### Filter to recent comments only {#date-filter}

Use `commentDateLimit` to keep only comments created on or after a given date — great for incremental monitoring.

```json
{
  "subreddits": ["webdev"],
  "sort": "new",
  "commentDateLimit": "2026-07-01",
  "maxComments": 100
}
```

### Tune reliability and politeness {#advanced}

Adjust retries and the delay between requests for large or sensitive runs.

```json
{
  "subreddits": ["AskReddit"],
  "maxRetries": 5,
  "requestDelayMs": 500,
  "debug": false
}
```

***

### Limiting results {#limits}

Control run size and cost with these fields:

- **`maxComments`** (default `50`, max `100`) — upper bound on comments scraped **per post**.
- **`maxCommentDepth`** (default `6`, max `15`) — how deep into the nested reply tree to traverse. `0` keeps only top-level comments.
- **`maxItems`** (default `25`, max `100`) — how many posts to open in total across all sources.
- **`maxPostsPerSource`** (default `25`, max `100`) — cap on posts opened from each subreddit.
- **`maxPages`** (default `1`, max `20`) — pagination depth per subreddit listing (25 posts per page).

> A single run lasts at most **~10 minutes**, and only one long-running job runs at a time. Keep limits reasonable for the fastest, most predictable results, and split very large jobs across multiple runs.

***

### Output example {#output-example}

A single dataset item looks like this:

```json
{
  "id": "t1_ouxds1u",
  "body": "Thank you for this. As someone who managed to get by in tech with a graphic design degree, with average (at best) understanding dev through my career, this is exactly what I needed. How does one go about creating a portfolio? Are there any staple/foundational elements that need to be presented in it?",
  "type": "comment",
  "score": 3,
  "author": "GT12",
  "postId": "t3_1ukjn5j",
  "postUrl": "https://www.reddit.com/r/webdev/comments/1ukjn5j/monthly_getting_started_web_dev_career_thread/",
  "permalink": "https://www.reddit.com/r/webdev/comments/1ukjn5j/monthly_getting_started_web_dev_career_thread/ouxds1u/",
  "postTitle": "Monthly Getting Started / Web Dev Career Thread",
  "scrapedAt": "2026-07-18T21:59:20.229Z",
  "subreddit": "webdev",
  "createdUtc": "2026-07-01T15:25:59+00:00"
}
```

***

### How much does scraping Reddit comments cost? {#how-much-does-scraping-reddit-comments-cost}

Reddit Comment Scraper is **pay per result** — you are billed for the data you actually get, with no monthly subscription and no separate Reddit API fees. Because the actor is optimized to pull comments efficiently and cap runs at around 10 minutes, costs stay predictable. New Apify accounts include free monthly usage credits, so you can **get your first results free in under 2 minutes** and test the actor at no cost. See the **[Pricing tab](https://apify.com/myagizm/reddit-comment-scraper)** on the actor page for current rates.

***

### Integrate with n8n, Zapier, and Make {#integrations}

You can run Reddit Comment Scraper and fetch its results directly over the Apify API. Use the **run-sync-get-dataset-items** endpoint when you want the data back in a single call, or the **runs** endpoint to start a job and poll asynchronously.

**Synchronous — run and get dataset items in one call:**

```bash
curl -X POST "https://api.apify.com/v2/acts/myagizm~reddit-comment-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "subreddits": ["webdev"],
    "sort": "hot",
    "maxComments": 50
  }'
```

**Asynchronous — start a run, then fetch results later:**

```bash
## 1) Start the run
curl -X POST "https://api.apify.com/v2/acts/myagizm~reddit-comment-scraper/runs?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "startUrls": [
      { "url": "https://www.reddit.com/r/webdev/comments/1ukjn5j/monthly_getting_started_web_dev_career_thread/" }
    ],
    "maxComments": 100
  }'

## 2) Fetch dataset items once the run finishes
curl "https://api.apify.com/v2/datasets/DATASET_ID/items?token=YOUR_APIFY_TOKEN&clean=true&format=json"
```

Beyond raw HTTP, the actor connects to **Make, Zapier, n8n, Slack, Airbyte, Gumloop, CrewAI, IFTTT, Lindy, GitHub, Google Sheets, and Google Drive** through Apify's native integrations and webhooks, so you can trigger scrapes and route comments into spreadsheets, databases, and messaging apps — no code required.

***

### Support {#support}

Questions, feature requests, or hit an edge case? Open an issue on the actor's **[Issues tab](https://apify.com/myagizm/reddit-comment-scraper/issues)** on Apify. Include your input configuration (and a sample post URL or subreddit) so we can reproduce and help quickly.

***

### FAQ {#faq}

#### Is it legal to scrape Reddit comments?

This actor collects **publicly available** data only. Scraping public information is generally permitted in many jurisdictions, but you are responsible for how you use the data — respect Reddit's terms, applicable laws (such as GDPR/CCPA), and individuals' privacy. For legal or commercial use, consult your own counsel.

#### Do I need a Reddit API key or account to scrape Reddit comments?

No. There is **no API key, no login, and no OAuth** — no cookies or account required. Just provide post URLs or subreddits and run.

#### Can I use Reddit Comment Scraper with the Apify API?

Yes. Start runs and fetch datasets over the Apify API using the `run-sync-get-dataset-items` or `runs` endpoints shown above, with the actor path `myagizm~reddit-comment-scraper`.

#### Can I get Reddit comment data through an MCP server (AI agents)?

Yes. Connect the actor through the **Apify MCP server** and call it as a tool from Claude, ChatGPT, Cursor, or any MCP-compatible AI agent.

#### Do I need proxies to scrape Reddit comments?

No. The actor handles connectivity, retries, and throttling for you. You do not need to supply cookies, tokens, or proxy settings.

#### Can I integrate Reddit comment data with other apps?

Yes. Through Apify's integrations and webhooks you can route comments into Make, Zapier, n8n, Slack, Notion, Airtable, Google Sheets, and more.

#### Can I export scraped Reddit comments to CSV, Excel, or JSON?

Yes — JSON, CSV, Excel, XML, HTML, and RSS, from the dataset UI or the API.

#### Can I scrape comments from multiple subreddits at once?

Yes. Add several names to `subreddits` and control per-source volume with `maxPostsPerSource` and total volume with `maxItems`.

#### Can I schedule the scraper to run automatically?

Yes. Use Apify **Schedules** to run the actor hourly, daily, or on any cron expression — ideal for monitoring active threads or communities.

#### Can I scrape comments from private or quarantined subreddits?

No. Only publicly accessible posts and comments can be scraped.

#### How do I scrape comments from a specific Reddit post?

Add the post URL to the `startUrls` field. The actor opens the thread and extracts its comment tree down to your chosen depth.

#### Can I get nested replies, not just top-level comments?

Yes. Set `maxCommentDepth` to how deep you want to traverse (up to 15). Use `0` for top-level comments only.

#### Can I limit results to recent comments only?

Yes. Set `commentDateLimit` to a `YYYY-MM-DD` date to keep only comments created on or after that day.

#### How fast is it, and how long does a run take?

Fast, fresh data with no caching. A single run is capped at roughly **10 minutes** to keep results predictable. Split very large jobs into multiple runs for the best throughput.

#### Why did a post return fewer comments than expected?

The actor returns what is publicly visible and within your `maxComments`, `maxCommentDepth`, and `commentDateLimit` settings. Deleted, removed, or collapsed comments may not appear; raise your limits to capture more.

***

### Want other Reddit data? {#want-other-reddit-data}

Reddit Comment Scraper is part of a full suite of Reddit scrapers by **myagizm**. Whatever Reddit data you need — posts, profiles, search results, or entire communities — there is an actor for it:

- **[Reddit Scraper](https://apify.com/myagizm/reddit-scraper)** — fast all-in-one Reddit scraper for posts, comments, and subreddits.
- **[Reddit Subreddit Scraper](https://apify.com/myagizm/reddit-subreddit-scraper)** — scrape posts and metadata from any subreddit.
- **[Reddit Search Scraper](https://apify.com/myagizm/reddit-search-scraper)** — scrape Reddit search results by keyword.
- **[Reddit Profile Scraper](https://apify.com/myagizm/reddit-profile-scraper)** — scrape a user's posts, comments, and profile data.
- **[Reddit Community Scraper](https://apify.com/myagizm/reddit-community-scraper)** — discover and scrape Reddit communities.

***

### Related searches {#related-searches}

reddit comment scraper · export reddit comments · reddit comment tree scraper · reddit comments csv · reddit sentiment analysis dataset · reddit nlp corpus · scrape reddit comments without api · reddit thread comments export · reddit discussion mining · reddit comment api alternative · x402 actor · ai agent scraper no account · pay with usdc api · mcp scraper for agents

***

### Run it from an AI agent — no Apify account needed (x402) {#x402}

This actor accepts **agentic payments** over the open [x402 protocol](https://docs.apify.com/integrations/x402). An AI agent can pay for a run in **USDC on Base** and get the data without an Apify account, a credit card, or an API key:

```bash
## one-time: wallet + prepaid token (agent side)
npx -y awal auth login <email>
npx awal x402 pay 'https://agi.apify.com/protocols/x402/prepaid-tokens?amount=1&currency=usd' --max-amount 1000000 --json
## then use the returned token exactly like an Apify API token
curl "https://api.apify.com/v2/acts/myagizm~reddit-comment-scraper/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $PREPAID_TOKEN" -H 'Content-Type: application/json' -d '{INPUT}'
```

Why it works here: this actor is **pay per event** and runs with **limited permissions**, the two conditions x402 requires. You are charged per result, so an agent pays only for the rows it receives. The prepaid token is a hard spending cap and expires 14 days after purchase.

***

### Disclaimer

This is an independent tool and is not affiliated with, endorsed by, or sponsored by Reddit. All product names, logos, and brands are property of their respective owners. Use this actor to scrape only publicly available data, and comply with Reddit's terms and all applicable laws and regulations, including data protection laws such as GDPR and CCPA.

***

### Resources {#resources}

- **[Apify API documentation](https://docs.apify.com/api/v2)** — run actors and fetch datasets programmatically.
- **[Apify MCP server](https://mcp.apify.com)** — use this actor as a tool in Claude, ChatGPT, and Cursor.
- **[Dataset export docs](https://docs.apify.com/platform/storage/dataset)** — export results to JSON, CSV, Excel, XML, and more.
- **[Apify Schedules](https://docs.apify.com/platform/schedules)** — automate recurring runs.
- **[Actor input schema](https://apify.com/myagizm/reddit-comment-scraper/input-schema)** — full reference for every input field.

***

## 中文说明 —— Reddit 评论抓取工具（V1）

> **V1 = 轻量低价线。** 本 Actor 为 V1：自包含、价格最低、尽力而为。若需要更稳定的交付与更全的字段，请使用同一功能的 **V2** 版本（见 [myagizm 商店主页](https://apify.com/myagizm)）。

**免登录抓取 Reddit 公开数据** —— 按子版块、帖子链接或用户抓取评论，可控层级深度。不需要 Reddit API Key、不需要 OAuth 应用、不需要登录或 Cookie。结果可导出为 JSON、CSV、Excel、XML，也可通过 Apify API 定时运行并接入 n8n、Zapier、Make 等工具。

> **两分钟内免费拿到第一批数据** —— 填入内容、点击 Start 即可。无需配置，试用不需要信用卡。

### 能做什么

- 💬 **抓取帖子下的评论**，支持按子版块、帖子链接或用户入口。
- 🪜 **可控层级深度**（`maxCommentDepth`），只要顶层或深挖整条讨论线。
- 🔗 **返回 `linkId` / `parentId`**，可完整还原评论树。
- 🗓️ **日期截断**（`commentDateLimit`）。
- 📏 **`maxComments` / `maxItems`** 精确控制成本。
- 🔞 **可选包含成人内容**。

### 谁在用

- 😀 **情感分析** —— 评论区才是真实意见所在。
- 🛒 **电商与产品** —— 挖掘反对意见与购买顾虑。
- 🧑‍💻 **NLP 团队** —— 构建带层级结构的对话语料。
- 🛡️ **审核研究** —— 分析争议性讨论的演化。
- 📊 **市场研究** —— 从长贴讨论中提炼共识与分歧。

### 可以抓取哪些数据

| 字段 | 类型 | 说明 |
|------|------|------|
| `id` | string | 记录 ID（帖子如 `t3_...`，评论如 `t1_...`） |
| `body` | string | 评论正文 |
| `type` | string | 记录类型（`post` / `comment` / `user` / `community`） |
| `score` | integer | 抓取时的净赞数 |
| `author` | string | 作者用户名 |
| `postId` | string | 所属帖子 ID |
| `postUrl` | string | 所属帖子链接 |
| `permalink` | string | 永久链接 |
| `postTitle` | string | 所属帖子标题 |
| `subreddit` | string | 所属子版块 |

> 字段取决于该条目公开了什么；不存在的值返回 `null`，数据结构保持稳定。

### 输入示例

```json
{
  "startUrls": [
    { "url": "https://www.reddit.com/r/webdev/comments/1ukjn5j/monthly_getting_started_web_dev_career_thread/" },
    { "url": "https://www.reddit.com/r/pics/comments/abc123/title/" }
  ],
  "maxComments": 100,
  "maxCommentDepth": 6
}
```

### 输出示例

```json
{
  "id": "t1_ouxds1u",
  "body": "Thank you for this. As someone who managed to get by in tech with a graphic design degree, with average (at best) understanding dev through my career, this is exactly what I needed. How does one go about creating a portfolio? Are there any staple/foundational elements that need to be presented in it?",
  "type": "comment",
  "score": 3,
  "author": "GT12",
  "postId": "t3_1ukjn5j",
  "postUrl": "https://www.reddit.com/r/webdev/comments/1ukjn5j/monthly_getting_started_web_dev_career_thread/",
  "permalink": "https://www.reddit.com/r/webdev/comments/1ukjn5j/monthly_getting_started_web_dev_career_thread/ouxds1u/",
  "postTitle": "Monthly Getting Started / Web Dev Career Thread",
  "scrapedAt": "2026-07-18T21:59:20.229Z",
  "subreddit": "webdev",
  "createdUtc": "2026-07-01T15:25:59+00:00"
}
```

### 价格

采用**按结果计费**：只为真正拿到的数据付费，不按运行时间收费。

- 💸 成本 = 结果数量 × 单价，预算可提前算清。
- 📉 Apify 的 Bronze / Silver / Gold / Platinum / Diamond 套餐享阶梯折扣。
- 🆓 新账号自带每月免费额度，第一次运行不花钱。
- 🚫 无代理附加费、无单次请求费、无最低消费。

实时价格见 [Apify 商店页面](https://apify.com/myagizm/reddit-comment-scraper)。

### 使用建议

- 🪜 **先用浅层深度（2–3）试跑**，深层评论数量会指数增长。
- 🔗 用 `parentId` + `linkId` 在本地重建评论树。
- 🗓️ 监控用 `commentDateLimit` 只取新评论。
- 🤖 把 `body` 批量送入大模型做情感与主题标注。
- 📏 `maxComments` 是成本主开关，务必设合理值。

### 其他 Reddit 数据

- 🤖 **[Reddit 综合抓取](https://apify.com/myagizm/reddit-scraper-v2)** —— 子版块 / 用户 / 社区 / 搜索四合一。
- 🔎 **[Reddit 搜索抓取](https://apify.com/myagizm/reddit-search-scraper-v2)** —— 全站或指定版块关键词搜索。
- 🏘️ **[子版块抓取](https://apify.com/myagizm/reddit-subreddit-scraper-v2)** —— 按版块抓帖子。
- 💬 **[评论抓取](https://apify.com/myagizm/reddit-comment-scraper-v2)** —— 可控深度的评论采集。
- 📇 **[社区信息抓取](https://apify.com/myagizm/reddit-community-scraper-v2)** —— 版块规模与简介。
- 👤 **[用户资料抓取](https://apify.com/myagizm/reddit-profile-scraper-v2)** —— karma、账号年龄、徽章。

其他平台同样采用免登录、按结果计费的方式：**[Instagram](https://apify.com/myagizm/instagram-profile-scraper-v2)** ·
**[TikTok](https://apify.com/myagizm/tiktok-profile-scraper-v2)** · **[X（推特）](https://apify.com/myagizm/x-tweets-scraper)** ·
**[LinkedIn](https://apify.com/myagizm/linkedin-profile-scraper)** · **[YouTube](https://apify.com/myagizm/youtube-channel-scraper)** ·
**[Google 地图](https://apify.com/myagizm/google-maps-scraper)**。完整工具家族见 **[myagizm 商店主页](https://apify.com/myagizm)**。

### 配合 AI 智能体使用（MCP）

本 Actor 已接入 **Apify MCP 服务器**，Claude、ChatGPT、Cursor 等助手可以把它当作工具直接调用，用自然语言提问即可拿到结构化结果，无需写胶水代码。

### 集成与 API

支持 **Make、Zapier、n8n、Slack、Airbyte、Gumloop、CrewAI、IFTTT、Lindy、GitHub、Google Sheets、Google Drive**，以及 Webhook、定时任务与 MCP 服务器。

```bash
curl -X POST "https://api.apify.com/v2/acts/myagizm~reddit-comment-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "startUrls": [
    { "url": "https://www.reddit.com/r/webdev/comments/1ukjn5j/monthly_getting_started_web_dev_career_thread/" },
    { "url": "https://www.reddit.com/r/pics/comments/abc123/title/" }
  ],
  "maxComments": 100,
  "maxCommentDepth": 6
}'
```

把 `format` 改成 `json`、`csv`、`xlsx` 或 `xml` 即可导出不同格式。

### 常见问题

**需要 Reddit API Key 或登录吗？**
不需要。没有 API Key、没有 OAuth 应用、不登录、不用 Cookie。

**抓取 Reddit 合法吗？**
只采集公开可见的数据，即任何未登录访客都能看到的内容。不登录、不访问私密版块或私信。合规责任由使用者承担：如涉及个人数据请遵守 GDPR / CCPA 与平台条款。

**能抓私密版块或已删除内容吗？**
不能，会被跳过并记录在运行日志中。

**需要配置代理吗？**
不需要，已内置托管。

**支持导出 CSV / Excel / JSON 吗？**
支持 JSON、CSV、Excel、XML。

**可以通过 Apify API 调用吗？**
可以，见上方示例。

**支持 AI 智能体（MCP）吗？**
支持，Claude、ChatGPT、Cursor 均可当作工具调用。

**可以定时运行吗？**
可以，支持 Apify Schedules、API 与 Webhook；按 `id` 去重即可实现增量采集。

**V1 和 V2 有什么区别？**
V1 轻量自包含、价格最低、尽力而为；V2 运行在托管基础设施上，交付更稳定、字段更全。两者输入基本一致，可以先用 V1 广筛、再用 V2 精查。

**数据有多新？**
不缓存，每次运行都读取当前公开页面。

### 让 AI 代理直接调用 —— 无需 Apify 账号（x402）

本工具支持基于开放 [x402 协议](https://docs.apify.com/integrations/x402) 的**代理支付**：AI 代理可以用 **Base 链上的 USDC** 直接付费运行，无需 Apify 账号、信用卡或 API 密钥。

```bash
npx -y awal auth login <邮箱>
npx awal x402 pay 'https://agi.apify.com/protocols/x402/prepaid-tokens?amount=1&currency=usd' --max-amount 1000000 --json
curl "https://api.apify.com/v2/acts/myagizm~reddit-comment-scraper/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $PREPAID_TOKEN" -H 'Content-Type: application/json' -d '{INPUT}'
```

之所以可用：本工具采用**按事件计费**且以**受限权限**运行，这正是 x402 的两个前提条件。按结果计费，代理只为拿到的数据付费；预付令牌本身就是消费上限，购买后 14 天到期。

***

### 免责声明

本工具为独立第三方工具，与 Reddit, Inc. 无任何隶属、认可或赞助关系，所有商标归各自所有者。

本 Actor 只采集**公开可见**的数据，不登录、不绕过访问控制、不获取私密内容。数据使用的合规责任由使用者承担。

### 相关搜索

reddit 评论抓取 · reddit 评论导出 csv · reddit 情感分析数据 · reddit 评论树 · 免登录抓取 reddit 评论 · reddit 评论 api · reddit 对话语料 · reddit 用户观点挖掘 · x402 支付 · ai 代理抓取 · usdc 付费 api

# Actor input Schema

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

Reddit post URLs to scrape comments from. Each post's full comment tree is extracted. Example: <code>https://www.reddit.com/r/pics/comments/abc123/title/</code>.

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

Subreddit names — the latest posts in each are opened and their comments scraped. The r/ prefix is optional. Example: <code>AskReddit</code> or <code>r/news</code>.

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

Which posts to pick from a subreddit before scraping their comments. Example: <code>top</code> opens the highest-scoring posts first.

## `time` (type: `string`):

Time window for Top / Controversial sorting. Example: <code>week</code> limits to the past 7 days.

## `maxComments` (type: `integer`):

Upper bound on comments scraped per post. Example: <code>100</code> pulls up to 100 comments from each thread.

## `maxCommentDepth` (type: `integer`):

Maximum nesting depth of the comment tree to traverse. Example: <code>0</code> keeps only top-level comments; <code>6</code> follows replies six levels deep.

## `commentDateLimit` (type: `string`):

Keep only comments created on or after this date. Leave empty for no limit. Example: <code>2026-01-01</code>.

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

How many posts to open in total (comments are then extracted from each). A run lasts at most ~10 minutes. Example: <code>25</code>.

## `maxPostsPerSource` (type: `integer`):

Cap on posts opened from each subreddit. Example: <code>10</code> opens the first 10 posts per community.

## `maxPages` (type: `integer`):

Pagination depth per subreddit listing (25 posts/page). Example: <code>2</code> scans up to 50 posts per subreddit.

## `maxRetries` (type: `integer`):

Retry attempts per failed request. Example: <code>5</code> for large or flaky runs.

## `requestDelayMs` (type: `integer`):

Politeness delay between requests, in milliseconds. Example: <code>500</code> waits half a second between requests.

## `debug` (type: `boolean`):

Emit verbose logs to help diagnose a run. Example: <code>true</code> while troubleshooting.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.reddit.com/r/pics/comments/abc123/title/"
    }
  ],
  "subreddits": [
    "news"
  ],
  "sort": "hot",
  "time": "week",
  "maxComments": 50,
  "maxCommentDepth": 6,
  "commentDateLimit": "2026-01-01",
  "maxItems": 25,
  "maxPostsPerSource": 25,
  "maxPages": 1,
  "maxRetries": 3,
  "requestDelayMs": 300,
  "debug": false
}
```

# Actor output Schema

## `results` (type: `string`):

All scraped items as structured JSON.

# 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": [
        {
            "url": "https://www.reddit.com/r/AskReddit/"
        }
    ],
    "subreddits": [
        "AskReddit"
    ],
    "sort": "hot",
    "time": "week",
    "maxComments": 50,
    "maxCommentDepth": 6,
    "maxItems": 25,
    "maxPostsPerSource": 25,
    "maxPages": 1,
    "maxRetries": 3,
    "requestDelayMs": 300,
    "debug": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("myagizm/reddit-comment-scraper").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": [{ "url": "https://www.reddit.com/r/AskReddit/" }],
    "subreddits": ["AskReddit"],
    "sort": "hot",
    "time": "week",
    "maxComments": 50,
    "maxCommentDepth": 6,
    "maxItems": 25,
    "maxPostsPerSource": 25,
    "maxPages": 1,
    "maxRetries": 3,
    "requestDelayMs": 300,
    "debug": False,
}

# Run the Actor and wait for it to finish
run = client.actor("myagizm/reddit-comment-scraper").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": [
    {
      "url": "https://www.reddit.com/r/AskReddit/"
    }
  ],
  "subreddits": [
    "AskReddit"
  ],
  "sort": "hot",
  "time": "week",
  "maxComments": 50,
  "maxCommentDepth": 6,
  "maxItems": 25,
  "maxPostsPerSource": 25,
  "maxPages": 1,
  "maxRetries": 3,
  "requestDelayMs": 300,
  "debug": false
}' |
apify call myagizm/reddit-comment-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/vLdB4M6tMlwJcRk1b/builds/UmEJ32G6yWCrlJeKQ/openapi.json
