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

Reddit Comment Scraper — Extract Reddit comments with usernames, comment text, scores, timestamps, post details, subreddit information, and comment URLs. Useful for audience research, sentiment analysis, content insights, competitor analysis, and social listening.

- **URL**: https://apify.com/socialdataapi/reddit-comment-scraper.md
- **Developed by:** [Social Data API](https://apify.com/socialdataapi) (community)
- **Stats:** 3 total users, 2 monthly users, 84.6% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 Comment Scraper — Comments, Replies, Authors and Upvotes

Reddit Comment Scraper extracts the comments and replies of public Reddit posts, pasted as links or found from a subreddit, a search or a keyword. Each comment comes with its author, upvotes, posting time, text, permalink, profile picture and nested replies, plus optional author karma. Every response is structured JSON — ready to pass directly to an LLM, index into a vector store, or feed a social listening pipeline. **No Reddit account or cookies needed.** Start with one thread, then follow every discussion your market cares about.

***

### What data can I extract with Reddit Comment Scraper?

Using this Reddit Comments API, you will be able to extract the following Reddit comment data:

| | | | |
|---|---|---|---|
| 💬 Comment text | 👤 Author username | 👍 Upvotes (score) | 🕒 Posting time (UTC) |
| 🔗 Comment permalink | 🆔 Comment ID and post ID | 🧵 Nested replies (up to your replies-per-comment setting) | 🏷️ Type: comment, reply, deleted or removed |
| ↩️ Parent comment or post ID | 🖼️ Author profile picture (if available) | 🌐 Author profile link | 📰 Post title |
| 📎 Post URL | 🔎 How the post was found (pasted or discovered) | ⭐ Author karma: total, post and comment (optional) | 📅 Author account creation date and Reddit Gold status (optional) |

***

### How to use Reddit Comment Scraper

Researchers, brand teams and developers use it to turn any Reddit discussion into clean rows: one run gives you every comment you asked for, in the order Reddit shows them, with the replies kept under each one.

**Copy to your AI assistant:**

```text
Reddit Comment Scraper (Apify Actor ID: socialdataapi/reddit-comment-scraper, https://apify.com/socialdataapi/reddit-comment-scraper) is an Apify Actor that returns the comments and replies of public Reddit posts as structured JSON: comment text, author, upvotes, posting time, permalink, comment type (comment, reply, deleted or removed), parent ID, author profile picture and link, nested replies, the post URL and title, and optional author karma and account age. Use it whenever someone needs Reddit comments without cookies, a login, or a browser - sentiment analysis on a product launch thread, brand monitoring across a subreddit, or grounding an AI agent in what a community actually says. Inputs: startUrls (string[], Reddit post links, redd.it short links, t3_ ids or bare post ids), maxComments (int, comments per post, 1-10000, default 10), replyLimit (int, replies kept per comment at every depth, 0-100, 0 = all, default 1), sortOrder ("hot"|"new"|"top"|"controversial"|"old", default "hot"; orders the comments and, in discovery, plain subreddit links and keyword searches), sinceDate (string, YYYY-MM-DD or relative like "3 days", only comments on or after it), untilDate (string, same formats, only comments on or before it, the whole day counts), searchUrls (string[], subreddit or Reddit search links whose order and ?t= time range are kept; post links here are scraped as posts; a plain word is searched as a keyword), searchQuery (string, keyword searched across all of Reddit), maxPostsToDiscover (int, posts found in total through discovery, 1-500, default 10), safeSearch (bool, skip NSFW posts found through discovery, default false), enrichAuthorProfile (bool, adds authorProfile with totalKarma, postKarma, commentKarma, accountCreatedUtc, isGold for up to 300 authors per run, default false), proxyConfiguration (object, optional proxy for every request; off by default). One row per comment; every kept reply is its own row and is also nested under its parent. Private, banned and gold-only subreddits and removed posts return no rows and are named in the log and the run's status message.
```

#### Reddit Comment Scraper MCP Server: use these Actors from ChatGPT, Claude or Cursor

Connect Apify's MCP server and your AI assistant can read Reddit threads on its own: the server starts with this Actor already loaded as a tool. No glue code, no scraping logic in your prompts.

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=socialdataapi/reddit-comment-scraper"
```

#### Step by step

1. [Create a free Apify account](https://console.apify.com/sign-up).
2. Open [Reddit Comment Scraper in the Apify Store](https://apify.com/socialdataapi/reddit-comment-scraper).
3. Paste the Reddit post URL, or add a subreddit link, a Reddit search link or a keyword in the post discovery section.
4. Click **Start** (or send your API request).
5. Download or stream your results in JSON, CSV or Excel.

#### How to scale Reddit Comment Scraper to bulk

Paste as many post links as you like into the post URLs list; up to 8 posts are scraped at the same time and each post's comments are saved as soon as that post is done. To cover a whole community, add subreddit or search links and a keyword, and set how many posts to discover in total (up to 500 per run). Posts found twice are scraped once. For ongoing monitoring, schedule the same input daily with "Only comments since" set to 1 day, so each run collects only new comments.

***

### ✨ Features

Reddit Comment Scraper fetches clean, structured comments from Reddit ⚡. It's ideal for Reddit sentiment analysis, brand and product monitoring, community research and feeding AI agents with real discussions. It works as a Reddit comments extractor, a Reddit thread scraper and a Reddit replies scraper in one run.

It extracts, per comment:

- **Comment text** – the full comment on one line
- **Author and profile link** – who wrote it, with a link to their Reddit profile
- **Upvotes** – the comment's score
- **Posting time** – when it was written, in UTC
- **Type** – a comment on the post, a reply, or a deleted or removed comment
- **Nested replies** – the kept replies under each comment, each with the same details
- **Author karma and account age** – optional, looked up once per author

⚡ No login and no browser: you control cost with comments per post, replies per comment, posts to discover and a date window.

***

### Use cases 💡

- **Brand manager** — scrape Reddit comments on launch threads and track complaints by upvotes.
- **Market researcher** — run Reddit sentiment analysis on comment text by posting time.
- **Community manager** — use the subreddit comments scraper mode to review a community's top threads weekly.
- **Trust and safety analyst** — flag low-karma or brand-new accounts from the author details.
- **Data analyst** — export Reddit comments to CSV and chart reply depth per thread.
- **AI engineer** — index comment text into a vector store as grounded context for a RAG agent.

Building an AI agent? [Connect Reddit Comment Scraper over MCP](#mcp-integration-for-ai-agents) and let it call the actor on its own.

***

### Why choose this actor?

- **Whole threads, collapsed comments included.** A recorded run returned 300 comments from one thread plus 48 from a second post in 8.7 seconds, while naming a missing post and a non-post link in the log.
- **The context behind each comment.** A recorded reply came back with 1,613 upvotes, its parent comment ID, its nested replies, and its author's 274,200 karma and 2016 account creation date.
- **12 settings, 16 fields.** Post links or discovery from subreddits, searches and keywords, five sort orders, a date window, NSFW skipping, replies per comment and optional author details.

***

### ⬇️ Input

The Actor accepts a list of Reddit post links, or a subreddit link, a Reddit search link or a keyword to find posts for you. No field is required on its own, but a run needs at least one post URL, discovery link or keyword.

| Parameter | Required | Type | Description | Example value |
|---|---|---|---|---|
| `startUrls` | No\* | Array | Reddit posts to scrape: www, old, new or mobile reddit.com post links, redd.it short links, t3\_ IDs or bare post IDs. | `["https://www.reddit.com/r/ChatGPT/comments/1epeshq/these_are_all_ai/"]` |
| `maxComments` | No | Integer | Comments saved per post, 1 to 10,000 (default 10), in thread order. | `10` |
| `replyLimit` | No | Integer | Replies kept under each comment at every depth, 0 to 100 (default 1); 0 keeps all replies. | `2` |
| `sortOrder` | No | String | `hot` (Reddit's default order), `new`, `top`, `controversial` or `old` (default `hot`). Also orders plain subreddit links and keyword searches in discovery. | `"top"` |
| `sinceDate` | No | String | Only comments posted on or after this date (YYYY-MM-DD) or relative value (for example 3 days). | `"2024-01-01"` |
| `untilDate` | No | String | Only comments posted on or before this date (the whole day counts) or relative value. | `"1 day"` |
| `searchUrls` | No\* | Array | Subreddit or Reddit search links to find posts from; the link's own order and time range are kept. A post link here is scraped as a post; a plain word is searched as a keyword. | `["https://www.reddit.com/r/ChatGPT/top/?t=week"]` |
| `searchQuery` | No\* | String | Keyword or phrase searched across all of Reddit. | `"gpt-5 release"` |
| `maxPostsToDiscover` | No | Integer | Posts found in total through discovery, 1 to 500 (default 10); a post found twice counts once. | `2` |
| `safeSearch` | No | Boolean | Skip NSFW posts found through discovery (default false); pasted post URLs are always scraped. | `true` |
| `enrichAuthorProfile` | No | Boolean | Add author karma, account creation date and Reddit Gold status to every row, for up to 300 authors per run (default false). | `true` |
| `proxyConfiguration` | No | Object | Optional proxy for every request; off by default, the Actor switches to a proxy by itself when Reddit slows it down. | `{"useApifyProxy": false}` |

\* Fill in at least one of the post URLs, the subreddit or search links, or the keyword. A run without any of them stops right away with a clear status message.

Accepted post link formats:

- `https://www.reddit.com/r/<subreddit>/comments/<id>/<title>/` (also old., new., np. and m.reddit.com)
- `https://redd.it/<id>`
- `t3_<id>` or the bare post ID, for example `1epeshq`

#### Free plan limits

Users on the Apify free plan can fetch up to 20 comments per run (all posts together) and 200 comments per month. When the limit is reached, the run finishes successfully with a status message explaining the limit. Upgrade to any paid Apify plan to remove these limits.

#### Example input

This input was used for a real test run (3 posts, 30 comments with author details, 7.0 seconds):

```json
{
  "startUrls": ["https://www.reddit.com/r/ChatGPT/comments/1epeshq/these_are_all_ai/"],
  "maxComments": 10,
  "replyLimit": 2,
  "sortOrder": "top",
  "sinceDate": "2024-01-01",
  "untilDate": "1 day",
  "searchUrls": ["https://www.reddit.com/r/ChatGPT/top/?t=week"],
  "searchQuery": "gpt-5 release",
  "maxPostsToDiscover": 2,
  "safeSearch": true,
  "enrichAuthorProfile": true,
  "proxyConfiguration": { "useApifyProxy": false }
}
```

***

### ⬆️ Output

Every comment is one typed, normalized JSON item with the same fields on every run, and values Reddit doesn't provide are null. Export it as JSON (default), CSV or Excel; the key-value store also keeps the same comments grouped by post URL in one record.

#### Example output

A real row from the test run above (the nested reply's own replies are shortened):

```json
{
  "url": "https://www.reddit.com/r/ChatGPT/comments/1epeshq/these_are_all_ai/",
  "comment_id": "lhklt5t",
  "post_id": "t3_1epeshq",
  "author": "y8man",
  "permalink": "https://www.reddit.com/r/ChatGPT/comments/1epeshq/these_are_all_ai/lhklt5t/",
  "upvotes": 1613,
  "content_type": "reply",
  "parent_id": "lhk4jkv",
  "author_avatar": "https://styles.redditmedia.com/t5_d0q2r/styles/profileIcon_tqviyu6odn9d1.jpeg?width=256&height=256&crop=256:256,smart&s=b8e6e69b4419f6881cc1e43659f115455ccb42d1",
  "userUrl": "https://www.reddit.com/user/y8man/",
  "contentText": "The wild thing is I've seen posts going around where it's a couple of AI pics and then OP will say one of them is actually real (or even all as a gotcha moment).  It's becoming increasingly more difficult to tell at a single glance. And let's be real, a lot of people don't spend time scrutinising each photo they come across in socmed.",
  "created_time": "2024-08-11T11:00:47Z",
  "replies": [
    {
      "comment_id": "lhkpgsm",
      "post_id": "t3_1epeshq",
      "author": "copperwatt",
      "permalink": "https://www.reddit.com/r/ChatGPT/comments/1epeshq/these_are_all_ai/lhkpgsm/",
      "upvotes": 499,
      "content_type": "reply",
      "parent_id": "lhklt5t",
      "author_avatar": "https://www.redditstatic.com/avatars/defaults/v2/avatar_default_6.png",
      "userUrl": "https://www.reddit.com/user/copperwatt/",
      "contentText": "Agreed.  One question I have... Some of these have a bad case of Sameface. It makes it look like it's a family reunion with brothers and sisters, lol...",
      "created_time": "2024-08-11T11:36:11Z",
      "replies": []
    }
  ],
  "discovered_via": "direct_url",
  "discovered_post_title": "These are all AI",
  "authorProfile": {
    "totalKarma": 274200,
    "postKarma": 64183,
    "commentKarma": 210017,
    "accountCreatedUtc": "2016-04-23T17:18:11Z",
    "isGold": false
  }
}
```

***

### How does it work?

The Actor reads the same public comment data any logged-out visitor can see, so you never need a Reddit account, a password or cookies. It uses plain HTTP requests, no browser. For each post it collects the comments in the order you choose, opens the collapsed parts of the thread by itself and keeps the replies under each comment, until your maximum per post is reached. Every request gets up to 3 attempts with growing waits; the Actor starts with a direct connection and switches to a proxy by itself when Reddit slows it down, or sends everything through your own proxy when you set one. Private or removed content is never returned. The output fields stay the same from run to run, so your code and spreadsheets keep working even when Reddit changes its site.

***

### How do you integrate Reddit Comment Scraper into your stack?

The Actor works with what you already use: the REST API from any language, MCP for AI agents, and no-code tools.

#### MCP integration for AI agents

Add Apify's MCP server to your agent with one command:

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=socialdataapi/reddit-comment-scraper"
```

This connects your agent to Apify's MCP server with this Actor already loaded as a tool, so it can call it directly, run it on a thread or keyword, and use the comments mid-conversation. It works with Claude Code, Cursor and Windsurf.

#### No-code tools (n8n, Make, LangChain)

- **n8n**: add the Apify node, choose "Run an Actor", pick this Actor and pass the input JSON; the node returns the dataset items for the next step.
- **Make**: use the Apify app's "Run an Actor" module with the same input, then "Get Dataset Items" to pass the comments on to a sheet or a database.
- **LangChain**: install `langchain-apify` and wrap the Actor with `ApifyActorsTool`, using the Actor ID `socialdataapi/reddit-comment-scraper`, so your chain can fetch Reddit comments on demand.

***

### Is it legal to scrape Reddit data?

Scraping publicly available Reddit data is generally lawful, though Reddit's User Agreement restricts automated access and you remain responsible for how you use the data. Reddit Comment Scraper returns only publicly available data — what any user sees without logging in — and nothing from private subreddits or behind a login. Usernames, profile pictures and karma can count as personal data under GDPR and CCPA even though Reddit names are pseudonymous: scraping public data is generally permissible, but storing and using it must comply with local data-protection law. Consult legal counsel if your use case involves bulk storage of personal data.

***

### Frequently asked questions

#### What fields does Reddit Comment Scraper return?

It returns the comment text, the author, the upvotes, the posting time and the nested replies, plus the permalink, comment type, parent ID, profile picture, post URL and title. See [the data fields section](#what-data-can-i-extract-with-reddit-comment-scraper) for the full list.

#### Does Reddit Comment Scraper require a Reddit account or login?

No. Only public comment data is extracted, so no Reddit account, password, cookies or developer app is needed.

#### How fast does Reddit Comment Scraper run?

A recorded run collected 348 comments from two posts in 8.7 seconds, and a run with author details collected 30 comments from three posts in 7.0 seconds. Data is read live from Reddit on every run, not from a cache.

#### What happens if a comment is private or doesn't exist?

A post that was removed, doesn't exist or sits in a private, banned or gold-only subreddit returns no rows; it is named in the log and in the run's status message, and the other posts carry on. Deleted and removed comments keep their place in the thread with the type set to deleted or removed, so check that type in your code before using the text.

#### Can I scrape multiple Reddit comments at once?

Yes. Paste many post links in one run, or let discovery find up to 500 posts from subreddit links, search links and a keyword; up to 8 posts are scraped at the same time.

#### Does Reddit Comment Scraper work with Claude, ChatGPT, and other AI agent tools?

Yes — Reddit Comment Scraper is available as an MCP tool through Apify's MCP server. Register the server in Claude Code, Cursor or Windsurf with `claude mcp add --transport http apify "https://mcp.apify.com?tools=socialdataapi/reddit-comment-scraper"`, and any agent that can call an HTTP endpoint can use the REST API directly.

#### Does Reddit Comment Scraper return data in a format LLMs can use directly?

Yes. Every comment is typed, normalized JSON with consistent field names, so there is no HTML parsing and no selectors. Pass it straight to an LLM, index it into a vector store, or feed it to an agent tool — no transformation step.

#### What happens when Reddit changes its layout or updates its anti-bot system?

The Actor is maintained, and when Reddit changes, it is updated so your calls keep returning the same JSON fields with no changes on your end.

#### Can I use Reddit Comment Scraper without managing proxies or browser infrastructure?

Yes. Retries and the switch to a proxy when Reddit slows the connection run on the Actor's side, and no browser is involved. You send one request and get structured JSON back, with no proxy account to set up.

#### Which Reddit comment fields work best for AI training data and RAG indexing?

For RAG, use the comment text together with the post title and the permalink as the source link. For training data, use the upvotes, the comment type, the posting time and the author karma. The values are plain strings, integers and booleans, with replies nested as lists of the same shape.

***

### Your feedback

Found a bug or missing a field? Let us know through the Issues tab on this Actor's page. Every report is read, and fixes ship as Reddit changes.

# Actor input Schema

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

Reddit posts to scrape, one per line. Accepts www, old, new and mobile reddit.com post links, redd.it short links or a bare post ID, for example https://www.reddit.com/r/subreddit/comments/post_id/title/. Optional when you fill in the post discovery section instead.

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

Maximum number of comments to save from each post, direct or discovered (1 to 10,000). Comments are taken in thread order: top-level comments with their kept replies. Free plan: up to 20 comments per run (all posts together) and 200 per month; paid plans have no limit.

## `replyLimit` (type: `integer`):

How many replies to keep under each comment, at every depth (0 to 100). Kept replies are saved as their own rows and also nested in the parent's replies field. Set 0 to keep all replies.

## `sortOrder` (type: `string`):

Order of the comments, which also decides which comments are kept when a post has more than the maximum. Hot uses Reddit's default (best) order. In post discovery it also orders plain subreddit links (for example https://www.reddit.com/r/ChatGPT/) and keyword searches; a link that names its own order, such as /top/ or ?sort=new, keeps it. Reddit has no oldest-first post list, so Old lists the newest posts first in discovery, and keyword searches use Top for Controversial. Top and Controversial lists cover the past day unless the link sets a time range such as ?t=week.

## `sinceDate` (type: `string`):

Only save comments created on or after this date. Use a date (YYYY-MM-DD) or a relative value such as 3 days or 1 week.

## `untilDate` (type: `string`):

Only save comments created on or before this date; the whole day counts. Use a date (YYYY-MM-DD) or a relative value such as 3 days or 1 week.

## `searchUrls` (type: `array`):

Subreddit links (for example https://www.reddit.com/r/ChatGPT/ or https://www.reddit.com/r/ChatGPT/top/) or Reddit search links (for example https://www.reddit.com/r/ChatGPT/search/?q=gpt5) to find posts from. A time range in the link, such as ?t=week or ?t=all, is used. A post link pasted here is scraped as a post. A plain word instead of a link is searched as a keyword.

## `searchQuery` (type: `string`):

A keyword or phrase to search all of Reddit for matching posts. Works together with or instead of the subreddit or search URLs.

## `maxPostsToDiscover` (type: `integer`):

Maximum number of posts to find in total from the subreddit or search URLs and the search keyword combined (1 to 500). A post found twice, or already in your post URLs, is counted once. Not used when you only paste post URLs.

## `safeSearch` (type: `boolean`):

Skip posts marked NSFW (over 18) that are found through discovery. Pasted post URLs are always scraped.

## `enrichAuthorProfile` (type: `boolean`):

Adds an authorProfile object to every row: total, post and comment karma, account creation date and Reddit Gold status. Looked up once per unique author, for up to 300 authors per run; later authors and deleted accounts get an empty object.

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

Off by default: the Actor connects directly and moves to Apify's US residential proxy when Reddit slows the direct connection down. Switch it on to send every request through the proxy you choose here, with a fresh session on each retry.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.reddit.com/r/ChatGPT/comments/1epeshq/these_are_all_ai/"
  ],
  "maxComments": 10,
  "replyLimit": 1,
  "sortOrder": "hot",
  "searchUrls": [],
  "maxPostsToDiscover": 10,
  "safeSearch": false,
  "enrichAuthorProfile": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

One row per comment: post URL, comment and post IDs, author, permalink, upvotes, content type, parent ID, avatar, user URL, text, created time, nested replies, discovery source, post title and optional author profile.

## `groupedByUrl` (type: `string`):

JSON object under the OUTPUT key mapping each post URL to the comments saved from it (an empty list for posts that failed).

# 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/ChatGPT/comments/1epeshq/these_are_all_ai/"
    ],
    "searchUrls": [],
    "searchQuery": "",
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("socialdataapi/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": ["https://www.reddit.com/r/ChatGPT/comments/1epeshq/these_are_all_ai/"],
    "searchUrls": [],
    "searchQuery": "",
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("socialdataapi/reddit-comment-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/ChatGPT/comments/1epeshq/these_are_all_ai/"
  ],
  "searchUrls": [],
  "searchQuery": "",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call socialdataapi/reddit-comment-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,socialdataapi/reddit-comment-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/l3dpfusFc9smTRuIc/builds/nLeZlCOLawN6Rki5U/openapi.json
