# Reddit Scraper - Posts, Comments, Subreddits & Users (`scrapesage/reddit-scraper`) Actor

Scrape Reddit posts, comments, subreddits and user profiles by keyword or URL. Full comment threads, 40+ fields, search, NSFW and monitoring mode. No login, no API key, no browser. Independent tool, not affiliated with Reddit.

- **URL**: https://apify.com/scrapesage/reddit-scraper.md
- **Developed by:** [Scrape Sage](https://apify.com/scrapesage) (community)
- **Categories:** Social media, Lead generation, Agents
- **Stats:** 22 total users, 11 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$7.00 / 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.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#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 Scraper — Posts, Comments, Subreddits & User Profiles (No Login)

> **Disclaimer:** This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by Reddit, Inc. or any of its subsidiaries. All trademarks mentioned are the property of their respective owners. "Reddit" is referenced only to describe the publicly available website this Actor collects data from.

Scrape **Reddit** at scale without an API key, without login, and without a browser. Pull **posts, full comment threads, subreddit feeds, keyword search results, communities and user profiles** into clean, structured JSON — by URL or by keyword — with **monitoring mode** so scheduled runs only return what's new.

Built for market research, **AI / LLM training data**, brand & reputation monitoring, sentiment analysis, social selling and trend discovery.

### Why this Reddit scraper?

- **No login, no API key, no rate-limit headaches.** Reddit's public API is gated and throttled; this actor reads the public site directly and rotates IPs automatically.
- **Reliable where others fail.** Reddit hard-blocks the old `.json` endpoints that most scrapers depend on. This actor uses the fully server-rendered site over residential proxies, so it keeps returning data when cheaper tools return errors.
- **Richest record in class** — 40+ fields per post and per comment: score, comment count, exact timestamps, flair, NSFW/spoiler/stickied flags, domain, author, permalinks, full comment depth and parent/child relationships.
- **Clean data, no junk** — `[deleted]` / `[removed]` / empty comments are filtered out by default, and **you are never charged for them**. Every record also carries a unified `text` column (post title, comment body, community description or user summary) so the default **Overview** view is fully populated at a glance — no half-empty rows.
- **Everything in one actor** — posts, comments, subreddits, search, communities and users. No need to chain five different scrapers.
- **Monitoring mode** — remember what you've already pulled and return only *new* posts/comments on the next run. Perfect with [Schedules](https://docs.apify.com/platform/schedules).
- **Pay per result, no start fee.** You only pay for the records you actually receive.

### Use cases

- **AI & LLM training data** — harvest high-signal discussions and Q\&A threads from any subreddit.
- **Brand & product monitoring** — track every new mention of your brand, product or competitor across Reddit.
- **Market & customer research** — mine real opinions, pain points and buying questions in niche communities.
- **Sentiment & trend analysis** — feed posts and comments into your NLP pipeline.
- **Social selling / lead discovery** — find people actively asking for recommendations in your space.
- **Community & influencer analysis** — profile subreddits and prolific users by karma and activity.

### How to use

1. Tell the actor **what to scrape** — paste Reddit **Start URLs** (subreddit, post, user or search pages), and/or list **subreddits**, **search keywords** or **usernames**.
2. Set **Sort**, **Time range** and **Max items**.
3. (Optional) Turn on **Include comments** to pull comment threads for every post, and **Monitoring mode** for new-only runs.
4. Run it. Download the dataset as JSON, CSV, Excel, or push it anywhere via API and integrations.

### Input

| Field | Description |
|---|---|
| `startUrls` | Any Reddit URLs — subreddit, post/comments, user, search or `/subreddits/search`. Auto-detected and routed. |
| `subreddits` | Subreddit names (e.g. `RealEstate`, `r/AskReddit`) to pull posts from. |
| `searches` | Keyword queries — returns posts (default) or communities. |
| `usernames` | Reddit users — returns their profile (karma, cake day) plus recent posts and comments. |
| `searchScope` | What `searches` returns: `posts` or `communities`. |
| `sort` / `time` | Order (`hot`/`new`/`top`/`rising`/`controversial`/`relevance`) and time window for top. |
| `maxItems` | Global cap across all record types. |
| `includeComments` / `maxCommentsPerPost` / `commentSort` | Pull comment threads for posts; how many and in what order. |
| `expandMoreComments` | Follow "load more comments" links for deeper threads. |
| `includeDeletedComments` | Off by default — skip (and never charge for) `[deleted]`/`[removed]`/empty comments. Turn on to keep them with an `isDeleted` flag. |
| `onlyPostsNewerThan` | Keep only fresh items — ISO date or `"7 days"`, `"24 hours"`, etc. |
| `includeNSFW` / `skipAds` | Include 18+ content; skip promoted posts. |
| `monitorMode` / `monitorStoreName` | Return only records not seen in previous runs. |
| `proxyConfiguration` | Defaults to Apify **Residential** (strongly recommended for Reddit). |

#### Example input

```json
{
  "subreddits": ["RealEstate", "FirstTimeHomeBuyer"],
  "sort": "top",
  "time": "week",
  "maxItems": 500,
  "includeComments": true,
  "maxCommentsPerPost": 30,
  "commentSort": "top"
}
```

### Output

Every row carries a `type` (`post`, `comment`, `community` or `user`) and a unified **`text`** column holding its main content (post title, comment body, community description, or a user's karma summary). The dataset opens on a single **Overview** table where every row reads as full regardless of type — then switch to the focused **Posts / Comments / Communities / Users** views for type-specific columns.

```json
{
  "type": "post",
  "id": "1ucvvkb",
  "fullId": "t3_1ucvvkb",
  "subreddit": "RealEstate",
  "author": "throwaway_homebuyer",
  "score": 41,
  "createdAt": "2026-06-22T20:35:40.000Z",
  "text": "Attorney won't finish house escrow closing, asking for more money (NY)",
  "title": "Attorney won't finish house escrow closing, asking for more money (NY)",
  "subredditPrefixed": "r/RealEstate",
  "permalink": "https://www.reddit.com/r/RealEstate/comments/1ucvvkb/...",
  "url": "https://www.reddit.com/r/RealEstate/comments/1ucvvkb/...",
  "domain": "self.RealEstate",
  "isSelf": true,
  "linkFlair": "Financing",
  "numComments": 117,
  "createdUtc": 1750624540,
  "isNSFW": false,
  "isSpoiler": false,
  "isStickied": false,
  "selfText": "We're closing on a house in NY and our attorney...",
  "scrapedAt": "2026-06-23T00:00:00.000Z"
}
```

```json
{
  "type": "comment",
  "id": "ot74y68",
  "fullId": "t1_ot74y68",
  "subreddit": "RealEstate",
  "author": "real_estate_atty",
  "score": 28,
  "createdAt": "2026-06-22T20:55:40.000Z",
  "text": "It doesn't sound like the addendum was written in a way which...",
  "body": "It doesn't sound like the addendum was written in a way which...",
  "postId": "1ucvvkb",
  "postTitle": "Attorney won't finish house escrow closing, asking for more money (NY)",
  "parentFullId": "t3_1ucvvkb",
  "depth": 0,
  "isSubmitter": false,
  "isDeleted": false,
  "permalink": "https://www.reddit.com/r/RealEstate/comments/1ucvvkb/.../ot74y68/"
}
```

User records carry `postKarma`, `commentKarma`, `totalKarma` and `cakeDay`; community records carry `name`, `title`, `publicDescription` and `url`.

### How much does it cost to scrape Reddit?

This Actor uses Apify's **pay-per-event** pricing: you are charged only for the results it delivers, with no monthly rental and no start fee. The events it can charge are:

- **Result** - Each record (post, comment, community or user) written to the dataset.

The current price of each event is shown on the **Pricing** tab of this page. Set a maximum total charge on the run if you want a hard cap on spend, and use the input limits to control how much the Actor fetches.

### Automate & schedule

Run this actor on autopilot and pull results into your own stack:

- **[Apify API](https://docs.apify.com/api/v2)** — start runs, fetch datasets, and manage schedules over REST.
- **[apify-client for JavaScript](https://docs.apify.com/api/client/js/)** and **[apify-client for Python](https://docs.apify.com/api/client/python/)** — official SDKs.
- **[Schedules](https://docs.apify.com/platform/schedules)** — run it hourly/daily with **monitoring mode** to capture only new posts and comments in a subreddit or for a keyword; perfect for brand monitoring and fresh AI data.
- **[Webhooks](https://docs.apify.com/platform/integrations/webhooks)** — trigger downstream actions (Slack alert, database insert, AI summary) the moment a run finishes.

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'MY_APIFY_TOKEN' });

const run = await client.actor('scrapesage/reddit-scraper').call({
    searches: ['best CRM for small business'],
    searchScope: 'posts',
    sort: 'new',
    maxItems: 300,
    includeComments: true,
    maxCommentsPerPost: 25,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Got ${items.length} Reddit records`);
```

### Integrate with any app

Connect the dataset to 5,000+ apps — no code required:

- **[Make](https://docs.apify.com/platform/integrations/make)** — multi-step automation scenarios.
- **[Zapier](https://docs.apify.com/platform/integrations/zapier)** — push new mentions straight into Slack, Sheets or your CRM.
- **[Slack](https://docs.apify.com/platform/integrations/slack)** — get pinged when a monitored subreddit or keyword gets new posts.
- **[Google Drive / Sheets](https://docs.apify.com/platform/integrations/drive)** — auto-export every run to a spreadsheet.
- **[Airbyte](https://docs.apify.com/platform/integrations/airbyte)** — pipe results into your data warehouse.
- **[GitHub](https://docs.apify.com/platform/integrations/github)** — trigger runs from commits or releases.

### Use with AI assistants (MCP)

The output is clean, LLM-ready JSON. Call this actor from Claude, ChatGPT, or any agent framework through the **[Apify MCP server](https://docs.apify.com/platform/integrations/mcp)** — ask your assistant to "find the top posts about mortgage rates in r/RealEstate this week with their comments" and let it run this scraper for you.

### Agent-ready: autonomous payments (x402 & Skyfire)

This actor is **agent-ready** — AI agents can discover it, run it, and **pay for it autonomously**, with no Apify account and no human in the loop. It uses [pay-per-event](https://docs.apify.com/platform/actors/publishing/monetize/pay-per-event) pricing and [limited permissions](https://docs.apify.com/platform/actors/development/permissions), so it qualifies for Apify's agentic-payment standards:

- **[x402](https://docs.apify.com/platform/integrations/x402)** — an open, HTTP-native payment protocol. Agents pay per run in USDC on the Base network directly through the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp) — no account, no API key.
- **[Skyfire](https://docs.apify.com/platform/integrations/skyfire)** — agent-to-service payments for fully autonomous AI-agent workflows.

Building an AI agent, MCP tool, or autonomous data pipeline? This scraper is ready to plug in and pay as it goes.

### More scrapers from scrapesage

Build a complete **social, content & sentiment-data stack**:

- **[YouTube Scraper](https://apify.com/scrapesage/youtube-scraper)** — videos, channels, stats and comments.
- **[Threads Scraper](https://apify.com/scrapesage/threads-scraper)** — posts and profiles from Meta's Threads.
- **[Bluesky Scraper](https://apify.com/scrapesage/bluesky-scraper)** — posts and profiles from Bluesky.
- **[Telegram Scraper](https://apify.com/scrapesage/telegram-scraper)** — public channel messages and members.
- **[Twitch Scraper](https://apify.com/scrapesage/twitch-scraper)** — streams, channels and clips.
- **[Substack Scraper](https://apify.com/scrapesage/substack-scraper)** — newsletters, posts and authors.
- **[Google News Scraper](https://apify.com/scrapesage/google-news-scraper)** — news articles by topic and query.
- **[Website Contact Scraper](https://apify.com/scrapesage/website-contact-scraper)** — emails, phones and socials from any site.

### Tips

- **Use Residential proxy.** Reddit blocks datacenter IPs — the default Residential setting is what keeps this actor reliable.
- **Fresh-only feeds.** Combine `monitorMode` + a [Schedule](https://docs.apify.com/platform/schedules) + `onlyPostsNewerThan` to capture only new posts/comments each run, without re-paying for old data.
- **Comments cost extra requests.** Leave `includeComments` off for a fast posts-only pass; turn it on (with a sensible `maxCommentsPerPost`) when you need the discussion.
- **No junk by default.** `[deleted]`/`[removed]`/empty comments are skipped (and not billed), so `maxCommentsPerPost` fills up with real content. Flip `includeDeletedComments` on only if you need the thread's deleted placeholders for structure/analysis.
- **Cover a topic fully.** Add several `subreddits` and `searches` in one run — the global `maxItems` cap spreads across them.

### FAQ

**Do I need a Reddit account or API key?** No. This actor reads publicly available pages — no login, no app registration, no API key.

**Why residential proxy?** Reddit blocks datacenter IPs and its public `.json` API. The actor reads the rendered public site over residential IPs, which is the reliable path; it rotates IPs automatically on any block.

**Can I get full comment threads?** Yes. Use a post URL (or `includeComments` on a subreddit/search) with `maxCommentsPerPost`, and turn on `expandMoreComments` to follow "load more comments" for deep threads. Each comment includes its `depth` and `parentFullId` so you can rebuild the tree.

**How do I only get new posts over time?** Turn on `monitorMode` and run on a [Schedule](https://docs.apify.com/platform/schedules) — each run returns only records not seen before.

**Can I export to Google Sheets, CSV, or Excel?** Yes — one click in the dataset view, or automatically on every run via the [Google Drive integration](https://docs.apify.com/platform/integrations/drive).

**A field is `null` — why?** Some values genuinely aren't published on a given page (e.g. a hidden comment score, or a community's subscriber count, which Reddit renders only client-side). Fields are `null` when the data isn't in the page, not because the scraper skipped them.

**Is scraping Reddit legal?** This actor collects publicly available data only. You are responsible for using the data in compliance with applicable laws (GDPR/CCPA for personal data) and Reddit's terms.

### Data & lawful use

This Actor reads only what Reddit publishes to logged-out visitors: it does not log in, use cookies or session tokens, create accounts, or reach anything behind a sign-in. Names, handles, bios and engagement figures are public, but they relate to identifiable people, so treat the output as personal data. If you are in the EU or UK you are the data controller for what you do with it: have a lawful basis (usually legitimate interest for research, marketing analytics or B2B prospecting), honour access and deletion requests, and do not use the output for spam or unsolicited messaging.

Under [Apify's Standard Actor Contract](https://docs.apify.com/legal/standard-actor-contract), which governs your use of this Actor, you are the controller of any personal data in your input and output and scrapesage acts only as your processor: that data is processed solely to run your job, written only to your own Apify storage, never used for any other purpose and never shared onward. If you need help with a data-subject request that involves this Actor's output, open an issue on the Issues tab.

### Disclaimer

**This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by Reddit, Inc. or any of its subsidiaries. All trademarks mentioned are the property of their respective owners.**

"Reddit" and any related marks are the property of their respective owners and are used here only in a descriptive, nominative sense - to identify the publicly accessible website from which this Actor collects data. This Actor is not an official Reddit product, is not authorised or certified by Reddit, Inc., and does not distribute Reddit software. It collects only publicly available information; you are responsible for ensuring your use of that data complies with applicable laws, regulations and the terms of the source website.

### Need help?

Open an issue on the actor's **Issues** tab, or visit the [Apify help center](https://help.apify.com/). Feature requests are welcome — this actor is actively maintained.

# Actor input Schema

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

Paste any Reddit URLs — subreddit (https://www.reddit.com/r/RealEstate/), a specific post/comments page, a user profile (/user/spez/), a search results page, or a /subreddits/search page. Each URL is auto-detected and routed. One per row.

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

Subreddit names to scrape posts from — e.g. "RealEstate", "r/AskReddit". Uses the Sort + Time settings below. One per row.

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

Keyword queries to search Reddit. Returns posts (default) or communities depending on "Search returns" below. One query per row — e.g. "best CRM", "moving to Austin".

## `usernames` (type: `array`):

Reddit usernames to scrape — e.g. "spez", "u/someuser". Returns the user's profile (karma, cake day) plus their recent posts and comments. One per row.

## `searchScope` (type: `string`):

What the "Search keywords" queries should return: posts, or communities (subreddits).

## `searchInSubreddit` (type: `string`):

Optional. Limit "Search keywords" to a single subreddit (e.g. "RealEstate"). Leave empty to search all of Reddit.

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

Order of results. Subreddits: hot/new/top/rising/controversial. Search: relevance/new/top/comments (hot/rising fall back to relevance).

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

Time window when sorting by Top or Controversial.

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

Cap on total records (posts + comments + communities + users) across the whole run. Listings paginate automatically until this cap is reached.

## `maxItemsPerSource` (type: `integer`):

Optional per-source cap (per subreddit / search / user). 0 = no per-source limit (only the global Max items applies).

## `includeComments` (type: `boolean`):

For every post scraped from a subreddit/search/user, also open it and output its comment thread (type `comment`). Adds one request per post. A post/comments URL in Start URLs always returns its comments regardless of this toggle.

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

How many comments to output per post (top of the thread first). Set 0 to skip comments entirely on post URLs.

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

How to order comments within a thread.

## `expandMoreComments` (type: `boolean`):

Follow the "load more comments" links to pull deeper/collapsed replies (more requests, slower). Off = only the comments rendered on the main thread page.

## `includeDeletedComments` (type: `boolean`):

Off (default, recommended): skip comments whose content was deleted by the user or removed by a moderator — i.e. body "\[deleted]", "\[removed]" or empty. These have no usable text and you are never charged for them, so your comment count is filled only with real content. On: include them as `comment` records carrying an `isDeleted` flag.

## `onlyPostsNewerThan` (type: `string`):

Keep only posts/comments newer than this. Accepts an ISO date (2026-06-01) or a relative window like "7 days", "24 hours", "3 months". Great with monitoring mode for fresh-only pulls.

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

Include NSFW (over-18) posts. Turn off to exclude them.

## `skipAds` (type: `boolean`):

Skip promoted/advertised posts so you only get organic content.

## `includeUserProfile` (type: `boolean`):

For username sources, output a `user` record with post/comment karma and cake day in addition to their content.

## `includeUserContent` (type: `boolean`):

For username sources, output the user's recent posts and comments. Turn off to get only the profile record.

## `userSection` (type: `string`):

Which part of a user's history to scrape.

## `deduplicate` (type: `boolean`):

Skip a record already emitted in this run (by id) — useful when sources overlap.

## `monitorMode` (type: `boolean`):

Remember ids already returned and emit ONLY records not seen in previous runs. Pairs with Apify Schedules to track new posts/comments over time without re-paying for old data.

## `monitorStoreName` (type: `string`):

Named key-value store that holds the 'already seen' ids for monitoring mode. Use a different name per tracked job to keep their histories separate. Lowercase letters, digits and hyphens only.

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

Maximum parallel requests when fetching comment threads. Lower it if you see transient blocks; raise it for speed.

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

Proxy settings. Reddit blocks datacenter IPs, so this actor defaults to Apify Residential proxy (blocked requests retry automatically on a fresh IP). Residential is strongly recommended.

## `urlsFromFile` (type: `string`):

Paste a list of URLs (one per line), OR one link to a .txt/.csv file, Google Sheet or Google Drive file containing them. Lets you import many Start URLs at once instead of typing each. Google Sheet/Drive share links are handled automatically.

## Actor input object example

```json
{
  "startUrls": [],
  "subreddits": [
    "RealEstate"
  ],
  "searches": [],
  "usernames": [],
  "searchScope": "posts",
  "sort": "hot",
  "time": "all",
  "maxItems": 50,
  "maxItemsPerSource": 0,
  "includeComments": false,
  "maxCommentsPerPost": 50,
  "commentSort": "confidence",
  "expandMoreComments": false,
  "includeDeletedComments": false,
  "includeNSFW": true,
  "skipAds": true,
  "includeUserProfile": true,
  "includeUserContent": true,
  "userSection": "overview",
  "deduplicate": true,
  "monitorMode": false,
  "monitorStoreName": "reddit-scraper-monitor",
  "maxConcurrency": 4,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

All scraped records in the default dataset — posts, comments, communities and user profiles with their full field set.

# 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": [],
    "subreddits": [
        "RealEstate"
    ],
    "searches": [],
    "usernames": [],
    "urlsFromFile": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapesage/reddit-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": [],
    "subreddits": ["RealEstate"],
    "searches": [],
    "usernames": [],
    "urlsFromFile": "",
}

# Run the Actor and wait for it to finish
run = client.actor("scrapesage/reddit-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": [],
  "subreddits": [
    "RealEstate"
  ],
  "searches": [],
  "usernames": [],
  "urlsFromFile": ""
}' |
apify call scrapesage/reddit-scraper --silent --output-dataset

```

## MCP server setup

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