# Reddit Comments Scraper & API: Export Full Comment Threads (`quarra/reddit-comments-scraper`) Actor

Scrape Reddit comments from any post link: every comment and reply with text, score, author, date, depth and parent, the whole tree with no comment left out, or the thread as Markdown for LLMs. Date filters on comments, new comments only on a schedule.

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

## Pricing

from $2.20 / 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

## Reddit Comments Scraper: Full Comment Threads

Paste Reddit post links and get all their comments: text, score, author, date, depth, parent and root comment, with
the post itself. Or get each thread as one Markdown record for an LLM. No login, no cookies, no API key. Export as
JSON, CSV or Excel, or read it through the Apify API.

- **The whole tree, no comment left out**: on a 1,650-comment thread, 263 of 263 recent comments down to depth 12 in
  our tests, each with `parentId`, `depth` and `rootCommentId`, so the thread can be rebuilt in a spreadsheet.
- **Huge threads, fast**: on October 21, 2026, the 2012 Obama AMA came back with 22,754 comments (Reddit's counter
  showed 22,717) in 2 minutes 40 seconds in our tests, and a 1,560-comment thread took 18 seconds on Apify, start included.
- **Threads as Markdown for LLMs** (`outputFormat: threadMarkdown`): one record per post with its comment tree, 7.2
  times fewer characters than the same thread as JSON records, at the same price.
- **Comment date filters**: only the comments written after or before a date; the tree is still walked, so a new reply
  under an old comment is found.
- **Only new comments on a schedule**: turn on **Only new since the last run** and each run returns and charges only
  the comments earlier runs did not return.

**$2.50 per 1,000 comments, $2.50 per 1,000 posts**, less on paid plans, plus $0.005 per run. Posts that fail,
duplicates and comments outside your dates are not charged.

Optional **AI analysis** of each post and comment (sentiment, intent, entities, summary, pain point, business
signals, your own labels): **$0.50 per 1,000** analyzed records.

### What people use it for

- Reading what buyers say about a product: export the threads where it is discussed, then sort the comments by score
  or let the AI analysis flag complaints, praise and switching intent.
- Finding leads: comments where someone asks for a recommendation or names a budget come out with `wantsHelp` and
  `buyingSignal` set to `true` when the AI analysis is on.
- Feeding an LLM or a RAG index: one Markdown record per thread keeps who answered whom, in about 7 times fewer characters than JSON.
- Archiving an AMA or a support thread, or following a launch thread hour by hour with **Only new since the last run**.
- Research on public discussions, with the full reply tree so a conversation can be studied as it happened.

### How to scrape all the comments of a Reddit post

1. Paste post links into **Post URLs**, one per line.
2. **Max comments per post** comes set to 50 for the example: empty it for the whole thread, or set your own cap.
3. Click **Start** and read the comments in the run's **Output** tab.

Through the API:

```json
{
  "startUrls": ["https://www.reddit.com/r/IAmA/comments/z1c9z/"],
  "commentSort": "top",
  "maxCommentDepth": 2
}
```

New comments of a launch thread, each hour:

```json
{
  "startUrls": ["https://www.reddit.com/r/technology/comments/1x3b0mi/"],
  "onlyNew": true,
  "watchName": "launch-thread"
}
```

Like any Apify Actor, it can be scheduled, connected to webhooks, Make, Zapier, n8n, or called by AI agents through
Apify's MCP server.

### Output

One record for the post, then one per comment. A real comment from our benchmark thread (author replaced, some fields
left out):

```json
{
  "type": "comment",
  "id": "pd0smho",
  "url": "https://www.reddit.com/r/technology/comments/1wu4lnz/palantir_ceo_alex_karp_quietly_purchased_37000/pd0smho/",
  "postId": "1wu4lnz",
  "postTitle": "Palantir CEO Alex Karp quietly purchased 37,000 acres of forests in Sweden—and locals found out when hunters lost leases to use the property",
  "parentId": "t1_pd02xdu",
  "parentType": "comment",
  "rootCommentId": "pczzr78",
  "depth": 3,
  "subreddit": "technology",
  "author": "example_user",
  "body": "Not a Swede, but don’t want him there either. ",
  "createdAt": "2026-09-30T15:31:09Z",
  "score": 920,
  "scorePerHour": 8.72,
  "isDeletedOrRemoved": false,
  "scrapedAt": "2026-10-05T00:58:22Z"
}
```

| Field | What it holds |
|---|---|
| `body`, `score`, `createdAt` | the comment as written, its score and date |
| `parentId`, `parentType`, `rootCommentId`, `depth` | where it sits in the tree (0 = a top-level comment) |
| `postId`, `postTitle` | the post it belongs to |
| `isDeletedOrRemoved` | `true` for a comment deleted or removed after it got replies; its `score` can then be `null` |

With `threadMarkdown`, each post is one `thread` record: title, counters, and the comment tree as indented Markdown
(author, score, date, text). The run summary is the `OUTPUT` record of the run's key-value store.

#### Export Reddit comments to CSV or Excel

Open the run's **Output** tab, then **Export**: CSV, Excel, JSON, XML or HTML. Each comment is one row; `parentId`
and `depth` let you rebuild the tree in a spreadsheet, and sorting by `score` puts the most upvoted on top.

### Scraping Reddit comments without the Reddit API

Since November 11, 2025, every new app needs Reddit's approval before it gets an API key (the Responsible Builder
Policy). Self-service keys are gone. The other old route, adding `.json` to a
Reddit URL, also closed: on October 14 and 15, 2026, Reddit stopped serving those listings and the "load more
comments" endpoint to readers without an account, from every IP we tried. Scripts built on them now get a login page
or a 403.

This Actor reads what any logged-out visitor can see on Reddit, with no account, no cookies and no API key, and it
walks the "load more" and "continue this thread" branches itself. We test every route it depends on each morning and
fix it when Reddit changes something.

### How complete is it? Measured against other Reddit scrapers

The three most used Reddit scrapers on the Apify Store and ours, run with their default settings on October 4 and 5,
2026\. We compared every returned comment with what Reddit showed at the same minute.

| Test | This Actor | The three most used scrapers |
|---|---|---|
| A 1,650-comment thread: the 263 comments written since October 1 | 263 of 263 | 245 and 224 (the third was not run) |
| Deepest reply level reached in that thread | 12 | 9 and 9 |
| A 137-comment thread (6 comments were deleted on Reddit) | 131 | 131, 131, and 25 with the run marked as a success |

We looked up the 40 comments the others missed on the big thread: all of them exist on Reddit, under the same parent,
with the same text. Scrapers change, so these are the results on those dates; we keep the raw runs.

Huge threads, measured on October 21, 2026 (whole thread, default settings):

| Thread | Comments returned | Time |
|---|---|---|
| r/technology, 1,669 comments on Reddit's counter | 1,560, every branch opened | 18 seconds |
| The 2012 Obama AMA in r/IAmA, 22,717 on Reddit's counter | 22,754 | 2 minutes 40 seconds |

An AMA comes back nearly whole, not cut at the first few thousand comments.

### AI analysis (optional)

Turn on **AI analysis** and every post and comment gets an `aiAnalysis` object next to its own fields:
**$0.50 per 1,000 analyzed records, every field and signal included**. A real result (post "Best and inexpensive CRM
for small businesses" in r/CRM, analyzed October 14, 2026, with two labels of our own; some entities left out):

```json
"aiAnalysis": {
  "language": "en",
  "sentiment": "mixed",
  "sentimentScore": -0.2,
  "emotion": "anticipation",
  "intent": "seeking_recommendation",
  "category": "software",
  "topics": ["crm alternatives", "hubspot pricing", "small business software"],
  "entities": [{"name": "HubSpot", "type": "brand"}, {"name": "Zoho", "type": "brand"}, {"name": "Pipedrive", "type": "brand"}],
  "summary": "A user seeks a cheaper CRM alternative to HubSpot that retains key features like lead tracking and reporting for their small businesses.",
  "painPoint": "HubSpot is becoming too expensive",
  "wantsHelp": true,
  "buyingSignal": true,
  "mentionsPrice": true,
  "featureRequest": false,
  "isVendor": false,
  "relevance": null,
  "labels": {"switching": true, "budget": true}
}
```

| Field | What it holds |
|---|---|
| `sentiment`, `sentimentScore` | positive, negative, neutral or mixed, and a score from -1 to 1 |
| `emotion` | the main emotion (joy, frustration, anger, curiosity, confusion, none…) |
| `intent` | what the author wants: question, seeking_recommendation, complaint, praise, purchase_intent, comparison, announcement, self_promotion, discussion, humor |
| `category`, `topics`, `entities` | a category, up to 3 topics, and the brands, products, companies, people and places named |
| `summary`, `painPoint` | one English sentence, and the problem or frustration the author expresses (or null) |
| `wantsHelp`, `buyingSignal`, `mentionsPrice`, `featureRequest`, `isVendor` | business signals, true or false: asks for help, ready to buy or pay, names a price or budget, asks for a feature, sells or builds what they talk about |
| `relevance` | search results only (in [Reddit Search Scraper](https://apify.com/quarra/reddit-search-scraper)): how much the record is about the query, 0 to 1 |
| `labels` | your own yes/no labels |

**Your own labels**: up to 5, as `{"label_name": "what makes it true"}`, for example
`{"switching": "The author wants to switch from one product to another"}`. Included in the price.

- Charged once per record analyzed in full. Deleted, removed, bot (AutoModerator) and empty records are not analyzed
  and not charged. If an analysis fails, the record is still delivered (and charged as usual), its
  `aiAnalysisStatus` is `failed` with the reason in `aiAnalysisError`, and the analysis is not charged.
- Any language in, summaries in English. The first ~2,500 characters of a very long text are analyzed.
- Works with the one-record-per-item output format (not the Markdown thread format).
- It adds time: about a minute and a half per 100 records.

### Inputs

- **Post URLs**: reddit.com and old.reddit.com links, redd.it links, share links, gallery or v.redd.it links, or a
  comment permalink.
- **Max comments per post**: empty = the whole thread, even with tens of thousands of comments; 0 = the post only.
- **Max comment depth**: empty = all levels; 0 = top-level comments only.
- **Comment sort**: Reddit's default order, top, new, controversial, old, Q\&A.
- **Comments posted after / before**.
- **AI analysis** and **Your own labels**: the optional analysis described above.
- **Output format**: one record per item, or each thread as one Markdown record.
- **Only new since the last run** and **Watch name**, for scheduled runs.

### Pricing

Pay per event:

| Apify plan | Comments | Posts |
|---|---|---|
| Free | $2.50 / 1,000 | $2.50 / 1,000 |
| Starter | $2.40 / 1,000 | $2.40 / 1,000 |
| Scale | $2.30 / 1,000 | $2.30 / 1,000 |
| Business and above | $2.20 / 1,000 | $2.20 / 1,000 |

AI analysis (optional): $0.50 / 1,000 analyzed records on every plan.

Plus the start: $0.005 per GB of run memory. A full 1,650-comment thread came to about $3.91 on the Free plan in our tests. The
Markdown format is charged the same way (one post, plus one comment per comment in the record). Not charged: posts
that fail, error records, duplicates, comments outside your dates, comments already returned to a watch. Set
**Maximum cost per run** in the run options and the run stops before going over it.

### Run it in production

To follow a thread, or a list of threads, keep one saved input and let Apify run it on a schedule.

1. In Apify Console open **Schedules** and create a schedule with a cron time (`0 */6 * * *` is every six hours).
2. Add this Actor with your post links. Turn on **Only new since the last run** and give a **Watch name**: each run
   returns and charges only the comments the earlier runs did not return, even new replies under old comments.
3. Choose the rhythm from how fast the thread moves. Each run costs the start ($0.005) even when nothing is new, so an
   hourly schedule is $3.60 a month in starts alone; every six hours is $0.60 and daily is $0.15.
4. Without **Only new**, set **Comments posted after** to the length of your rhythm (`12 hours`, `1 day`) and remove the
   overlap on `id` in your own storage.

**What it costs per month** (Free plan prices; Business prices in brackets), for 1,000 new comments in the month:

| Schedule | Cost per month |
|---|---|
| Daily (30 runs) | $2.65 ($2.35) |
| Every 6 hours (120 runs) | $3.10 ($2.80) |
| Every hour (720 runs) | $6.10 ($5.80) |

A full thread read once: 1,650 comments came to about $3.91 on the Free plan. Optional AI analysis adds $0.50 per 1,000
records analyzed. Set **Maximum cost per run** so that a run never goes over what you planned.

**Call it from code.** Start a run and wait for the results in one request (this call waits up to 300 seconds, so use
it for small jobs):

```bash
curl -X POST "https://api.apify.com/v2/acts/quarra~reddit-comments-scraper/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"startUrls": ["https://www.reddit.com/r/technology/comments/1x3b0mi/"], "onlyNew": true, "watchName": "launch-thread"}'
```

For bigger jobs, start the run, wait for it to end, then read its dataset:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("quarra/reddit-comments-scraper").call(run_input={"startUrls": ["https://www.reddit.com/r/technology/comments/1x3b0mi/"], "onlyNew": True, "watchName": "launch-thread"})
items = list(client.dataset(run["defaultDatasetId"]).iterate_items())
```

**Connect it.** Add a webhook on the event `ACTOR.RUN.SUCCEEDED` (Console, **Integrations** tab) to be called when a
run ends, then read the dataset of that run. Make, Zapier and n8n have Apify modules: run the Actor, get the dataset
items, then send each one to Slack, Google Sheets, Airtable or your CRM. AI agents can call the Actor through Apify's
MCP server.

### Send results to Slack, Notion or Discord

Pick one of your Apify MCP connectors in "Send results to your app" (Notion connects in one click), or paste a Slack, Discord, Make, Zapier or n8n webhook URL. After each successful run, a summary lands there: the number of results, the first 25 with their links, and a link to the full dataset. Schedule the Actor with "Only new since the last run (monitoring)" turned on and new results reach your team every day without opening Apify.

### Limits

- Reddit does not serve deleted comments that have no replies; they are counted in the run summary, not returned.
- Quarantined communities are visible to logged-in accounts only. The Actor reports them and does not log in.

### FAQ

**Why did I get zero comments?** The usual causes: the post has no comments yet, or only deleted ones with no replies (they
are counted in the run summary, not returned); **Comments posted after / before** leaves nothing in the window; **Max
comments per post** is set to 0, which returns the post only; with **Only new**, every comment was already returned
under the same **Watch name**. A link that cannot be read gets a free error record, and a run with no result costs the
start only.

**How fast is it?** A 1,560-comment thread in 18 seconds, a 22,000-comment AMA in under 3 minutes (October 21, 2026).

**Can I get every comment of a big thread, including the ones behind "load more comments"?** Yes. Leave **Max
comments per post** empty: the Actor opens every "load more" and "continue this thread" branch, even on AMAs with
tens of thousands of comments.

**Can I scrape the comments of many posts in one run?** Yes, paste as many post links as you want, one per line. Each
post is followed by its own comments in the output.

**Does it work for AI agents?** Yes, through Apify's MCP server or the API. Use the Markdown thread format to give a
model a whole discussion in one record.

**Do I need a Reddit account or API key?** No account, no cookies, no API key. Platform costs are included in the
price.

**Is it legal?** It collects public comments any logged-out visitor can see. Reddit's terms and privacy law (GDPR in
the EU) apply to how you use the data.

**Does the Actor send anything to Quarra?** Only when a run fails or runs out of time: the Actor, its build, the error type, the line of our code where it happened, and the memory and time the run was given, so we can fix it fast. Never your input, your results, your account or the run ID.

### Related Actors

- [Reddit Scraper](https://apify.com/quarra/reddit-scraper): subreddits, searches, post URLs and users in one Actor.
- [Reddit Search Scraper](https://apify.com/quarra/reddit-search-scraper): posts and comments by keyword.
- [Reddit Comments Search Scraper](https://apify.com/quarra/reddit-comments-search-scraper): comments by keyword.
- [Reddit Subreddit Scraper](https://apify.com/quarra/reddit-subreddit-scraper): the posts of any subreddit.
- [Reddit Post Scraper](https://apify.com/quarra/reddit-post-scraper): posts from their links, or refreshed by ID to follow their score.
- [Reddit Lead Finder](https://apify.com/quarra/reddit-lead-finder): the posts and comments where people ask for a recommendation or show buying intent.

# Actor input Schema

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

Post URLs, one per line: reddit.com and old.reddit.com links, redd.it links, share links, gallery or v.redd.it links, or a comment permalink. Each one returns the post and its comment tree.

## `maxCommentsPerPost` (type: `integer`):

Empty = the complete thread, even with tens of thousands of comments. 0 returns the post only. With Only new, each run returns up to this many comments of a thread that earlier runs did not return.

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

Empty = all levels. 0 = top-level comments only, 1 = plus direct replies, and so on. Deeper branches are not even requested (faster).

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

Order of comments inside each thread (Best is Reddit's default).

## `commentsPostedAfter` (type: `string`):

Only comments written after this date (2026-10-01, or 12 hours), in threads and user histories. The tree is still walked, so a new reply under an old comment is found (reading stops after 10,000 comments in a row outside your dates); only matching comments are saved and charged.

## `commentsPostedBefore` (type: `string`):

Only comments written before this date.

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

Adds aiAnalysis to every post and comment: language, sentiment and score (-1 to 1), emotion, intent (question, recommendation request, complaint, praise, purchase intent, comparison…), category, topics, named brands, products and people, a one-sentence English summary, the pain point, and business signals (wants help, buying signal, mentions a price, feature request, vendor). Search results also get a relevance score (0 to 1) against your query. Charged once per post or comment analyzed in full; deleted, removed, bot or empty records and failed analyses are free. Works with the items output format.

## `aiLabels` (type: `object`):

Up to 5 yes/no labels of your own, as {"label_name": "what makes it true"}. Each analyzed record gets labels: {label_name: true or false}. Example: {"switching": "The author wants to switch from one product to another", "budget": "The author states a budget"}. Included in the analysis price.

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

Thread Markdown: one record per post with its whole comment tree as indented Markdown (author, score, date, text), about 7 times fewer characters than the same thread as JSON. A thread too big for one record (over ~20,000 comments) comes as numbered parts. Same price: 1 post + 1 comment per comment included. Profiles stay normal records.

## `onlyNew` (type: `boolean`):

Remember what earlier runs of the same watch returned and output only new posts and new comments (with Include comments, also comments that earlier runs did not return under posts already seen; with Max comments per post, each run adds up to that many of them per thread, oldest included). Nothing already delivered is charged again, even after a run that timed out, was aborted or overlapped another. One run per watch at a time: a second one does nothing and charges nothing. Memory: key-value store quarra-reddit-watch-\<this Actor's ID, lowercase> of your account (a watch already kept in quarra-reddit-watch stays there). Set a watch name, then schedule the Actor.

## `watchName` (type: `string`):

Name of this watch's memory for 'Only new'. Recommended: runs with the same name share it even when you add or remove sources. Empty: the memory belongs to this exact set of inputs and filters, so adding a source starts a new watch that returns everything again (limits, output format and proxy don't count).

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

Connection. Keep the default (automatic). Costs are included in the price.

## `deliveryConnector` (type: `string`):

Pick one of your Apify MCP connectors: at the end of each run, a summary of the results (count, the first 25 with their links, a link to the full dataset) is posted there. With a schedule and 'Only new', you get each day's new results where your team works. Nothing is sent when a run finds nothing. Notion connects in one click; Slack and Google need your own OAuth app in Apify, or use the webhook field below.

## `deliveryTarget` (type: `string`):

Slack channel ID (C0123…), Notion page ID, Google Sheet ID… Leave empty if the app needs no target (a new Notion page is then created at the top of your workspace).

## `deliveryWebhookUrl` (type: `string`):

No connector needed. A Slack Incoming Webhook (hooks.slack.com/…) gets a message, a Discord channel webhook gets a message, any other URL receives the summary as JSON (title, text, count, datasetUrl, items).

## `deliveryTool` (type: `string`):

Name of the connector's tool to call. Leave empty: the best tool that posts a message, creates a page or appends rows is picked, and the run log lists every tool the connector offers.

## `deliveryArguments` (type: `object`):

Extra arguments for the tool, merged last, for example {"channel": "#reddit-leads"} or {"parent": {"database_id": "…"}}.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.reddit.com/r/IAmA/comments/z1c9z/"
  ],
  "maxCommentsPerPost": 50,
  "commentSort": "confidence",
  "aiAnalysis": false,
  "outputFormat": "items",
  "onlyNew": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Every record: posts, comments, profiles, communities and Markdown threads, each with a type field.

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

Posts only (type post).

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

Comments with parentId, depth and rootCommentId (type comment).

## `threads` (type: `string`):

With outputFormat threadMarkdown: one record per post with its whole comment tree as Markdown.

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

Per-input status, errors, posts dropped by filters, per-thread completeness and watch statistics.

# 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/IAmA/comments/z1c9z/"
    ],
    "maxCommentsPerPost": 50,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("quarra/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": ["https://www.reddit.com/r/IAmA/comments/z1c9z/"],
    "maxCommentsPerPost": 50,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("quarra/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": [
    "https://www.reddit.com/r/IAmA/comments/z1c9z/"
  ],
  "maxCommentsPerPost": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call quarra/reddit-comments-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,quarra/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/SxA3dDHHLH98NHNjz/builds/3Vr7vwdaw2y1o9bS1/openapi.json
