# Reddit Comments Scraper: Full Threads & Replies, $0.49/1K (`laptime/reddit-comments-scraper`) Actor

$0.49/1K comments, no start fee. Whole threads with every "load more" expanded. No login or API key. Same engine as the fastest Reddit scraper in our head-to-head tests. Inputs: post URLs, subreddits, search terms, sort, reply depth, date windows. Parent and root IDs.

- **URL**: https://apify.com/laptime/reddit-comments-scraper.md
- **Developed by:** [Laptime](https://apify.com/laptime) (community)
- **Categories:** Social media, Lead generation, Agents
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.35 / 1,000 comments

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

### What is Reddit Comments Scraper?

**Reddit Comments Scraper** exports Reddit comments: whole comment threads with every "load more comments" and "continue this thread" link expanded, or the comments that match a keyword across Reddit. Every comment comes with its text (Markdown and HTML), score, author, date, `isSubmitter`, reply count, and `depth`, `parentId` and `rootCommentId` to rebuild the tree. Paste post links, a subreddit or a search term, click **Start**, and download JSON, CSV or Excel. No Reddit API key, login or cookies.

[![How to use Reddit Comments Scraper without coding: 1. Try for free 2. Paste a post link + Start 3. Every comment with author, text, score and depth 4. Export to Excel](https://raw.githubusercontent.com/laptimehq/laptime-assets/main/howto/reddit-comments-scraper-steps.jpg?v=20261122)](https://raw.githubusercontent.com/laptimehq/laptime-assets/main/howto/reddit-comments-scraper-steps.jpg?v=20261122)

- 🧵 **Export a whole thread:** every comment Reddit shows, down to the deepest reply, with a completeness score per post.
- 🔎 **Search comments by keyword:** what people say about a product, inside answers, not just post titles.
- 🤖 **Build AI and sentiment datasets:** Markdown text plus tree fields, in reading order, ready for RAG and fine-tuning.
- 🎯 **Find leads in answers:** who recommends what, and which commenter is the original poster.

> ✅ **Verified working on 22 Nov 2026:** the prefilled input (one r/explainlikeimfive thread, 25 comments) ran on Apify three times in a row and returned the post and its 25 comments in 1.9 to 2.3 s every time.
>
> 💰 **$0.49 per 1,000 comments**, no start fee. That's below the comment list prices of the most-used Reddit scrapers on 18 Nov 2026: automation-lab $0.75, harshmaur $2.00, apify $3.20 and trudax $4.00 per 1,000.
>
> ⚡ **Same engine as [Reddit Scraper](https://apify.com/laptime/reddit-scraper)**, the fastest Reddit scraper in our head-to-head tests: 300 comments from a 1,729-comment thread in 4.5 s (17 Nov 2026).
>
> 🎯 **Only comments that really mention your keyword:** Strict search is on by default here, for comment search too. Reddit's own search, sorted by newest, often returns posts that don't: in our test on 18 Nov 2026, 8 to 9 of 20 results for "HubSpot alternative" mentioned HubSpot in Reddit's results and in two other scrapers'. With Strict search, 20 of 20 did. Dropped results are never charged.
>
> 🧠 **RAG-ready threads:** **Output format** `rag-markdown` turns each thread into one Markdown document with its comments nested inside (plus `chunkId` and flat `metadata` for your vector database); `jsonl-finetune` turns it into an OpenAI chat-format training example. Up to 10 comments per document are included in the post price.
>
> 🔁 **Paste your old input as it is:** `postUrls` lists written for harshmaur's Reddit Comments Scraper, and inputs written for trudax, automation-lab and fatihtahta Reddit scrapers, run unchanged, with the meaning they had there. Change only the Actor ID.

### How to use Reddit Comments Scraper

1. [Create a free Apify account](https://console.apify.com/sign-up). No credit card needed.
2. Open Reddit Comments Scraper and paste one or more post links into **Post URLs** (one is prefilled), or type keywords into **Search comments for**.
3. Set **Max comments per post** (5000 gets a whole big thread). Start small to test.
4. Click **Start**. Most runs finish in seconds.
5. Download the comments as JSON, CSV, Excel or HTML, or fetch them with the API.

**Quick start input** (the prefilled default):

```json
{
  "startUrls": [{ "url": "https://www.reddit.com/r/explainlikeimfive/comments/h9yh9l/" }],
  "maxComments": 25
}
```

A post link returns that post with its comments; `https://redd.it/…` short links, `/s/` share links, comment links and old., new. or m.reddit.com links work too. A subreddit link returns the comments of its first posts (**Max posts per subreddit, or results per search**). Search terms return matching comments by default; turn on **Search for posts** to also get matching posts with their threads.

### Copy-paste inputs

#### The whole thread of one post

```json
{
  "startUrls": [{ "url": "https://www.reddit.com/r/AskReddit/comments/1xy3x8s/" }],
  "maxComments": 5000,
  "maxItems": 5001
}
```

Every reply chain is followed to the end. The post row reports how many comments were scraped and how complete the thread is.

#### Comments that mention a product, last 30 days

```json
{
  "searches": ["Notion", "\"Obsidian vs Notion\""],
  "sort": "new",
  "commentDateLimit": "30 days",
  "maxPostCount": 200
}
```

Each matching comment comes with `postId` and `postTitle`, so you can open the thread around it later.

#### This week's top threads, summarised by AI

```json
{
  "startUrls": [{ "url": "https://www.reddit.com/r/LocalLLaMA/top/?t=week" }],
  "maxPostCount": 10,
  "maxComments": 100,
  "commentSort": "top",
  "aiThreadSummary": true
}
```

Each post row gets `aiThreadSummary` (what people are saying), `aiThreadSentiment`, `aiThreadTopMentions` (products recommended most) and `aiThreadAnswered`.

#### Threads as RAG documents

```json
{
  "startUrls": [{ "url": "https://www.reddit.com/r/LocalLLaMA/top/?t=month" }],
  "maxPostCount": 50,
  "maxComments": 10,
  "commentSort": "top",
  "outputFormat": "rag-markdown"
}
```

One Markdown document per thread, with its top 10 comments nested inside, a stable `chunkId` and flat `metadata` for your vector database. The 10 comments are included in the document price, so 50 documents cost about $0.05.

### How much does Reddit Comments Scraper cost?

Pay per event. Proxies and Apify platform usage are included.

| Event | Price on the Free plan |
|---|---|
| Comment delivered (`comment`) | **$0.49 per 1,000** |
| Post delivered (`post`) | **$0.99 per 1,000** |
| AI labels per row, optional (`ai-label`) | $0.30 per 1,000 |
| AI flag or custom question per row, optional (`ai-custom-label`) | $0.05 per 1,000 per question |
| AI thread summary, optional (`ai-thread-summary`) | $3 per 1,000 |
| Run start | **free** |

| You want | Cost |
|---|---|
| One thread with 5,000 comments | $2.45 |
| 10 posts with 100 comments each | $0.50 |
| 1,000 comments matching a keyword | $0.49 |

Never charged: run starts, placeholder rows (a deleted comment whose replies survive), comments outside your date window, and runs that return nothing. **Max items in total** (2,000 by default) and Apify's **Maximum cost per run** cap every run's bill.

**Works on the Apify free plan:** the $5 of monthly platform credit covers about 10,000 comments with this Actor, no card needed.

### AI enrichment (optional, off by default)

**AI labels** give every comment sentiment, intent (recommendation, complaint, praise, buying intent and more), a 0-100 lead score judged against **What you sell or track**, topic, brands named and language. Add ready-made yes/no flags or up to 10 questions of your own. **Thread summaries** add a 2-3 sentence summary per thread. Bot, moderator and deleted rows are skipped and never charged. With your own OpenRouter, OpenAI, Anthropic or Gemini key, no AI events are charged at all.

### Output

![Reddit Comments Scraper output: table of Reddit comments with author, comment text, upvotes, reply depth and date](https://raw.githubusercontent.com/laptimehq/laptime-assets/main/howto/reddit-comments-scraper-output.jpg?v=20261122)

A post row from a run on r/AskReddit's top posts of the day, 19 Nov 2026 (a few of its fields):

```json
{
  "dataType": "post",
  "id": "t3_1xznz51",
  "title": "Redditors who are *actually* sick today, how are you convincing your boss you didn't ta...",
  "parsedCommunityName": "AskReddit",
  "username": "owen__wilsons__nose",
  "upVotes": 5796,
  "numberOfComments": 1255,
  "flair": null,
  "mediaType": "text",
  "createdAt": "2026-11-18T19:14:03.540Z",
  "url": "https://www.reddit.com/r/AskReddit/comments/1xznz51/redditors_who_are_actually_sick_today_how_are_you/",
  "communitySubscribers": 60189193,
  "commentsScraped": 25,
  "dataSource": "reddit"
}
```

A comment row from the same run (a few of its fields):

```json
{
  "dataType": "comment",
  "id": "t1_19su9alt53pmr",
  "postTitle": "Redditors who are *actually* sick today, how are you convincing your boss you didn't take time off for GTA 6?",
  "username": "owen__wilsons__nose",
  "body": "That's amazing. Hopefully he doesn't have the same idea and come home with one as well haha",
  "upVotes": 43,
  "depth": 1,
  "parentId": "t1_19su8dxn5s2o5",
  "rootCommentId": "t1_19su8dxn5s2o5",
  "createdAt": "2026-11-18T21:27:00.900Z",
  "url": "https://www.reddit.com/r/AskReddit/comments/1xznz51/comment/19su9alt53pmr/",
  "dataSource": "reddit"
}
```

Each comment and each post is one row (`dataType` is `comment` or `post`), with the same **46 comment fields and 74 post fields** as Reddit Scraper: `body`, `upVotes`, `username`, `createdAt`, `depth`, `parentId`, `rootCommentId`, `postId`, `numberOfReplies`, `isSubmitter`, removal markers and more. The Output tab opens on the **Comments** view, with **Overview**, **Posts**, **AI labels**, **Engagement and community** and **Media** next to it. Every field is documented in the [Reddit Scraper output section](https://apify.com/laptime/reddit-scraper#output).

### Integrations and API

Schedule a saved task and send the comments to Google Sheets, Slack, n8n, Make, Zapier or a webhook from its **Integrations** tab ([recipes](https://apify.com/laptime/reddit-scraper#send-reddit-data-to-slack-google-sheets-n8n-make-or-zapier)).

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("laptime/reddit-comments-scraper").call(run_input={
    "startUrls": [{"url": "https://www.reddit.com/r/AskReddit/comments/1xy3x8s/"}],
    "maxComments": 500,
})
for c in client.dataset(run["defaultDatasetId"]).iterate_items():
    if c["dataType"] == "comment":
        print("  " * c["depth"], c["body"][:80])
```

AI agents: add `https://mcp.apify.com?tools=laptime/reddit-comments-scraper` as a remote MCP server in Claude, ChatGPT, Cursor or any MCP client.

### Related Actors

The same engine, with a form made for one job:

- [Reddit Scraper](https://apify.com/laptime/reddit-scraper): posts and full comment threads from subreddits, URLs, search and users, from $0.49/1K.
- [Reddit Posts Scraper](https://apify.com/laptime/reddit-posts-scraper): posts only, the cheapest Reddit export, $0.99/1K.
- [Subreddit Scraper](https://apify.com/laptime/subreddit-scraper): whole subreddits, past Reddit's 1,000-post cap, $0.99/1K.
- [Reddit Search Scraper](https://apify.com/laptime/reddit-search-scraper): keyword search across Reddit or inside one subreddit, from $0.49/1K.
- [Reddit Monitor](https://apify.com/laptime/reddit-monitor): brand and keyword alerts: only posts you haven't received yet, from $0.49/1K.
- [Reddit User Scraper](https://apify.com/laptime/reddit-user-scraper): user profiles (karma, account age, trophies) with their posts and comments, $0.99/1K.

Other Laptime scrapers that pair well with this one, all with no start fee:

- [Threads Scraper](https://apify.com/laptime/threads-scraper): profiles, posts, threaded replies and keyword search, from $0.99/1K.
- [Bluesky Scraper](https://apify.com/laptime/bluesky-scraper): posts, replies, search, profiles, feeds and trends, from $0.79/1K.
- [Telegram Channel Scraper](https://apify.com/laptime/telegram-channel-scraper): public channel messages, comments and subscribers, $0.79/1K.

### FAQ

#### Do I need a Reddit account or API key?

No. Reddit Comments Scraper reads the public pages a logged-out visitor sees, so it keeps working after Reddit closed anonymous `.json` pages and stopped giving out new API access in 2026.

#### Does it get every comment of a thread?

It expands every "load more comments" and "continue this thread" link Reddit shows, up to **Max comments per post**. Comments Reddit no longer shows to logged-out visitors (mostly removed or deleted ones) can be added from the Arctic Shift archive with **Fill comments from archive**; they keep their place in the tree and are marked `dataSource: "archive"`.

#### How is Reddit Comments Scraper different from Reddit Scraper?

It's the same engine with a form set up for one job: comments first, more of them per post, and keyword search over comments by default. Every Reddit Scraper input field is also accepted here through the API or the JSON tab, with the same output and the same prices.

#### Is it reliable?

Yes. Reddit Comments Scraper runs the same engine as [Reddit Scraper](https://apify.com/laptime/reddit-scraper). A daily automated check runs the default input and alerts us when it returns nothing or a key field goes empty. When Reddit refuses a listing or "load more comments", the run carries on with the Arctic Shift archive (rows marked `dataSource: "archive"`) instead of failing. A run that returns nothing fails with the reason and costs nothing; it never reports an empty success.

#### Is it legal to scrape Reddit?

Reddit Comments Scraper only collects data Reddit shows publicly without logging in. Comments contain personal data (usernames and what people wrote), so GDPR and similar laws may apply to how you store and use it. You're responsible for your use case; ask a lawyer if you're unsure.

*Unofficial. Not affiliated with, endorsed by or sponsored by Reddit, Inc. Reddit is a trademark of Reddit, Inc.*

### Feedback and support

Open an issue on the **Issues** tab: issues are answered within a day.

If Reddit Comments Scraper saved you time, a short review on the **Reviews** tab helps other people find it. We read every one, thank you!

***

Built by **Laptime**: every Actor timed, with dated benchmarks in its README.

# Changelog

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

# Actor input Schema

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

Reddit links, one per row. A post link (https://www.reddit.com/r/name/comments/abc123/..., https://redd.it/abc123, /s/ share links, comment links; old., new. and m.reddit.com too) returns that post with its comments. A subreddit link (https://www.reddit.com/r/name/top/?t=week) returns the comments of its first posts (Max posts per subreddit). Search and user links work too. Combine with Search comments for: both run.

## `searches` (type: `array`):

Optional. Keywords to find in Reddit comments, one per row, across Reddit or inside Search in subreddit: notion, "exact phrase", nike OR adidas. Each matching comment comes with postId and postTitle; each term returns up to Max posts per subreddit, or results per search. Turn on Search for posts to also get matching posts with their threads.

## `searchCommunityName` (type: `string`):

Optional. Run every search term inside one subreddit only: webscraping, r/webscraping or the subreddit's link. Empty = all of Reddit. Has no effect on Post URLs.

## `searchComments` (type: `boolean`):

true (default here) = Search terms return matching comments (dataType "comment", with postId and postTitle; depth and rootCommentId are null because the thread isn't loaded). Reddit ignores the time range for comment search, so it is applied by date here.

## `searchPosts` (type: `boolean`):

false (default here) = Search terms return only matching comments. true = also return matching posts, each with its comment thread (Max comments per post).

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

Maximum comments per post, in Comment order, counting nested replies (each reply is one comment). Default 100. No upper limit: 5000 gets a whole big thread, with every "load more" and "continue this thread" expanded. 0 = posts only. $0.49 per 1,000 comments.

## `maxPostCount` (type: `integer`):

For a subreddit link: how many of its posts to read, each with its comments. For a search term: how many matching comments (and, with Search for posts, posts). A post link always returns its one post. Default 10.

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

Leave out replies nested deeper than this: 0 = top-level comments only, 1 = plus direct replies, and so on. Empty (default) = every depth, down to the deepest reply chain. A limit makes very big threads much faster. Not charged: left-out replies are never loaded.

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

Hard cap on posts + comments for the whole run (default 2,000). The run stops as soon as it is reached, so it doubles as a budget cap: 2,000 comments cost at most $0.98.

## `commentSort` (type: `string`):

One of: confidence (= Reddit's "Best"), top, new, controversial, old, qa. Decides which comments come first, and so which ones you get when Max comments per post cuts a thread short. Always sent to Reddit, so it wins over a subreddit's suggested order. Complete threads contain the same comments in any order.

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

Skip comments created before this (same formats as Only posts newer than). Skipped comments are not charged. Empty = no limit.

## `commentDateTo` (type: `string`):

Skip comments created after this (same formats as Only posts newer than). Empty = no limit.

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

Order of the posts read from subreddit links without a sort in the link (hot, new, top, rising, controversial; relevance and Default mean hot), and of search results (relevance, new or top). With top, Time range picks the period. Comment order inside a thread is set by Comment order. Best, Old and Q\&A are comment orders, accepted for inputs from other comment Actors and applied as Comment order.

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

One of: all, hour, day, week, month, year. Reddit's own time filter, used by Sort = top or controversial and by searches; hot, new and rising ignore it. With All time and Only posts newer than set, the narrowest range that covers your window is used (e.g. 7 days = past week), so you get more posts inside it.

## `postDateLimit` (type: `string`):

Skip posts created before this. A date (2026-11-01), a full ISO timestamp, or a relative time: 24 hours, 7 days, 2 weeks, 3 months, 1 year (short forms 24h, 7d; m = months). Relative times are counted from each run's start, so a schedule never needs editing. Skipped posts are not charged, and with Sort = new the run stops at the first older posts. Empty = no limit.

## `strictSearch` (type: `boolean`):

true (default here) = keep only comments (and posts) that really contain your search words: every word (plurals and any case are fine), "quoted phrases" as written, -word absent, OR for alternatives. Reddit's comment search also returns loosely related comments; those are dropped and not charged. false = keep what Reddit returns.

## `minUpVotes` (type: `integer`):

Keep only posts with at least this score (from subreddit links, post links and Search for posts). Skipped posts are not charged and their comments are not loaded. Comments themselves are not filtered by score. Empty or 0 = no minimum.

## `minComments` (type: `integer`):

Keep only posts that have at least this many comments on Reddit (the numberOfComments field), e.g. to skip quiet threads in a subreddit. Skipped posts are not charged and their comments are not loaded. Empty or 0 = no minimum.

## `includeNSFW` (type: `boolean`):

true (default) = keep posts marked NSFW (18+). false = skip them; skipped posts are not charged.

## `excludeAuthors` (type: `array`):

Leave out posts by these accounts (ignoring case, "u/" optional), with their comment threads. Skipped and not charged. Comments these accounts wrote under other posts are kept. Empty = keep all authors.

## `fillCommentsFromArchive` (type: `boolean`):

true = after loading a thread from Reddit, also add the comments the Arctic Shift archive has that Reddit no longer shows logged out (mostly removed or deleted since; about 1-5% of big threads). They keep their place in the tree and have dataSource "archive". Default false. (When Reddit refuses to load a thread's remaining comments, the archive fills in automatically while Archive fallback is on.)

## `archiveFallback` (type: `boolean`):

true (default) = if Reddit refuses a subreddit, a search limited with Search in subreddit, a user's posts or comments, or the rest of a comment thread, fill up from the Arctic Shift archive instead of failing. Archive rows have dataSource "archive", and their scores are from when they were archived. Searches across all of Reddit have no archive fallback.

## `includeAuthorDetails` (type: `boolean`):

true = add each author's post karma, comment karma, account creation date and full-size avatar to posts and comments (authorPostKarma, authorCommentKarma, authorCreatedAt). One small request per distinct author, so runs with many authors take longer. Not charged. Default false.

## `outputFormat` (type: `string`):

"standard" = one row per post and per comment. "rag-markdown" = one document per post (dataType "rag": markdown/pageContent with the post and its comments, chunkId, flat metadata). "jsonl-finetune" = one OpenAI chat example per post (messages: system, user = post, assistant = comments). Documents: the post price includes 10 comments; more are charged as comments. Export as JSONL.

## `aiAnalysis` (type: `boolean`):

true = every post and comment gets aiSentiment (positive, negative, neutral, mixed) with aiSentimentScore (-1 to 1), aiIntent (buying_intent, recommendation_request, question, complaint, praise, self_promotion, job_post, news, discussion), aiEmotion, aiLeadScore (0-100) with aiLeadReason, aiTopic, aiEntities, aiLanguage and aiSummary. One "ai-label" event per labelled row ($0.30 per 1,000).

## `aiScope` (type: `string`):

One of: all, posts, comments. "posts" labels only posts, the cheapest way to find leads; comments are still scraped.

## `aiContext` (type: `string`):

One or two sentences about your product, brand or competitors. The lead score and its reason are judged against this. Empty = general buying intent.

## `aiFlags` (type: `array`):

Ready-made questions answered for every labelled row, returned in aiLabels (e.g. aiLabels.wantsHelp = true). Each flag is one "ai-custom-label" event per row ($0.05 per 1,000). Turns on AI labels.

## `aiCustomLabels` (type: `object`):

Your own questions as {"name": "instruction"}, up to 10, returned in aiLabels.name. Start an instruction with "yes/no:" for a true/false answer; otherwise you get a short text answer (null for none). Same format as harshmaur's customLabels. Each label is one "ai-custom-label" event per row ($0.05 per 1,000). Turns on AI labels.

## `aiThreadSummary` (type: `boolean`):

For each post with at least 2 comments, reads the post and its top comments (up to 40) and adds aiThreadSummary (what people are saying), aiThreadSentiment, aiThreadTopMentions (products recommended or discussed most) and aiThreadAnswered (did the author get a useful answer) to the post row. Uses the comments you scrape (Max comments per post). One "ai-thread-summary" event per summarised thread ($3 per 1,000).

## `aiApiKey` (type: `string`):

Bring your own key and pay no AI fees: the AI events above are not charged and your provider bills you for tokens (about $0.05-0.10 per 1,000 rows). Detected by prefix: OpenRouter (sk-or-...), Anthropic (sk-ant-...), Google Gemini (AIza...), anything else is treated as OpenAI. Stored encrypted.

## `aiModel` (type: `string`):

Only with your own key: the model name at your provider. Defaults: meta/muse-ember (OpenRouter), gpt-4.1-nano (OpenAI), claude-haiku-5-5 (Anthropic), gemini-2.5-flash-lite (Gemini). Without your own key our tuned models are always used and this field is ignored.

## `aiBaseUrl` (type: `string`):

Optional base URL of any OpenAI-compatible chat completions API (Groq, Together, Azure, a self-hosted model). Use with your API key and Model. No AI fees are charged.

## `maxConcurrency` (type: `integer`):

Parallel sessions (1-50, default 10), each on its own residential IP. Higher is faster for big runs. It does not change the price.

## `ignoreStartUrls` (type: `boolean`):

Compatibility switch for integrations built for trudax/reddit-scraper-lite that always send Start URLs. true = skip Start URLs and run only the Search terms.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.reddit.com/r/explainlikeimfive/comments/h9yh9l/"
    }
  ],
  "searches": [
    "web scraping",
    "apify"
  ],
  "searchComments": true,
  "searchPosts": false,
  "maxComments": 25,
  "maxPostCount": 10,
  "maxItems": 2000,
  "commentSort": "confidence",
  "sort": "relevance",
  "time": "all",
  "postDateLimit": "7 days",
  "strictSearch": true,
  "minUpVotes": 10,
  "minComments": 5,
  "includeNSFW": true,
  "excludeAuthors": [
    "AutoModerator",
    "u/some_bot"
  ],
  "fillCommentsFromArchive": false,
  "archiveFallback": true,
  "includeAuthorDetails": false,
  "outputFormat": "standard",
  "aiAnalysis": false,
  "aiScope": "comments",
  "aiContext": "We sell an affordable CRM with email marketing for small businesses. Competitors: HubSpot, Pipedrive, Zoho.",
  "aiCustomLabels": {
    "wants_software": "yes/no: the author is looking for a software product or an alternative to one; no for job ads, news and self-promotion",
    "service_wanted": "the service the author wants, in three words or fewer, or none"
  },
  "aiThreadSummary": false,
  "aiModel": "meta/muse-ember",
  "aiBaseUrl": "https://api.groq.com/openai/v1",
  "maxConcurrency": 10,
  "ignoreStartUrls": false
}
```

# Actor output Schema

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

Every post and comment row, in the order scraped.

## `posts` (type: `string`):

The Posts view: post columns (comment rows are in the same dataset; filter on dataType = "post").

## `comments` (type: `string`):

The Comments view: comment columns (filter on dataType = "comment").

## `searchResults` (type: `string`):

The Search results view: what your Search terms found, with searchQuery and matchesQuery (does the text really contain the term).

## `runStats` (type: `string`):

RUN_STATS: posts, comments, seconds, requests, errors and why the run stopped.

# 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/explainlikeimfive/comments/h9yh9l/"
        }
    ],
    "maxComments": 25,
    "maxPostCount": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("laptime/reddit-comments-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/explainlikeimfive/comments/h9yh9l/" }],
    "maxComments": 25,
    "maxPostCount": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("laptime/reddit-comments-scraper").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 '{
  "startUrls": [
    {
      "url": "https://www.reddit.com/r/explainlikeimfive/comments/h9yh9l/"
    }
  ],
  "maxComments": 25,
  "maxPostCount": 10
}' |
apify call laptime/reddit-comments-scraper --silent --output-dataset

```

## MCP server setup

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

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/Um5c4oDNJYoWjtvsT/builds/co5dWnM9wwhiTktog/openapi.json
