# Reddit Scraper: Posts, Comments, Search & Users, No API Key (`scrapers_lat/reddit-scraper`) Actor

Scrape Reddit posts, comments, users and search results from any subreddit, search query or URL. No API key, no login. Get titles, bodies, authors, links, media, timestamps and threaded comments, plus optional AI sentiment and summaries. HTTP-only. Export JSON, CSV or Excel.

- **URL**: https://apify.com/scrapers\_lat/reddit-scraper.md
- **Developed by:** [Scrapers Lat](https://apify.com/scrapers_lat) (community)
- **Categories:** Social media, Automation, Developer tools
- **Stats:** 9 total users, 4 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $2.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.
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?

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](https://scrapers.lat/banners/reddit-scraper.png)](https://console.apify.com/actors/LmN5LQCvRMWnyWaIc/input)

## Reddit Scraper - Posts, Comments, Search, Users & AI (No API Key)

Scrape Reddit without an API key, without a Reddit login, and without writing code. This Reddit scraper pulls **posts, comments, users and search results** from any subreddit, search query, post URL or user URL, and exports them to JSON, CSV or Excel. It also computes optional **AI sentiment and AI summaries** in the same run. It is HTTP-only, so runs are fast and never add a headless-browser compute charge to your account.

Here is one real `post` record from a live run on `r/technology`:

```json
{
  "recordType": "post",
  "id": "1w6ihie",
  "subreddit": "technology",
  "subredditPrefixed": "r/technology",
  "title": "Denver Resident Shows Data Center Watering Their Lawn While Residents Face Water Restrictions For a Year",
  "author": "efap1701",
  "postType": "link",
  "url": "https://www.gadgetreview.com/denver-resident-shows-data-center-watering-their-lawn...",
  "permalink": "https://www.reddit.com/r/technology/comments/1w6ihie/denver_resident_shows_data_center_watering_their/",
  "domain": "gadgetreview.com",
  "isSelf": false,
  "thumbnail": "https://external-preview.redd.it/9AnRmj8YncPMFBw7WLZLPB01Bbct0qZoDpBRFsn2ofM.jpeg",
  "mediaUrls": ["https://external-preview.redd.it/9AnRmj8YncPMFBw7WLZLPB01Bbct0qZoDpBRFsn2ofM.jpeg"],
  "createdAt": "2026-09-03T20:04:51+00:00",
  "aiSentiment": "negative",
  "aiSentimentScore": -0.7,
  "aiSummary": "A Denver resident shared a video of a data center watering its lawn while local residents face water restrictions.",
  "source": "rss"
}
```

**📥 [Input](https://apify.com/scrapers_lat/reddit-scraper/input-schema) · 📤 [Output](https://apify.com/scrapers_lat/reddit-scraper/output-schema) · 💰 [Pricing](https://apify.com/scrapers_lat/reddit-scraper/pricing) · ▶️ [Examples](https://apify.com/scrapers_lat/reddit-scraper/examples)**

![Apify](https://img.shields.io/badge/Platform-Apify-1CE1CE?logo=apify\&logoColor=white)
![Coverage](https://img.shields.io/badge/Coverage-Reddit-blue)
![Output](https://img.shields.io/badge/Output-JSON%20%7C%20CSV%20%7C%20Excel-orange)
![Billing](https://img.shields.io/badge/Billing-Pay%20per%20result-brightgreen)

### Table of contents

- [What it does](#what-it-does)
- [How we compare](#how-we-compare)
- [Use cases](#use-cases)
- [Quickstart](#quickstart)
- [Input reference](#input-reference)
- [Output reference](#output-reference)
- [Example output record](#example-output-record)
- [Run via API and CLI](#run-via-api-and-cli)
- [Fetch results](#fetch-results)
- [Billing and limits](#billing-and-limits)
- [FAQ and troubleshooting](#faq-and-troubleshooting)

### What it does

This is a Reddit scraper and Reddit data extractor with the broadest set of inputs on the market: it reads posts and comments from any **subreddit feed**, from a **Reddit search** (across all of Reddit or one subreddit), from **direct post URLs**, and from **user profile URLs** (including a user's recent posts and comments). It writes one normalized record per post to the run's dataset, and, when Include Comments is on, one record per comment in the thread. Timestamps are normalized to ISO 8601 and missing source values are returned as `null`, so every record has the same predictable shape.

Record types written to the dataset: `post` records, `comment` records, and `user` records. Use the `recordType` field to tell them apart. Every record also carries a `source` field (`html` or `rss`) that tells you which Reddit surface it came from.

Optional paid add-ons enrich each post in place, in the same run, with no second tool or NLP pipeline: `analyzeSentiment` adds an AI sentiment label, score and rationale; `summarizePost` adds a one-line AI summary; `scrapeUserProfiles` attaches the author's karma and cake day when Reddit's public profile page is reachable.

**A note on live engagement metrics (honest by design).** Reddit has tightened anonymous access to its public pages. This scraper always returns each item's core content - title, author, subreddit, self-text and comment bodies, permalink, outbound link, media URLs, post type and created/updated timestamps. Numeric live-engagement fields (`score`, `upvoteRatio`, `numComments`, `totalAwards`) and content flags (`isNsfw`, `isPinned`, `isLocked`, and so on) are captured when Reddit serves its full public listing and are returned as `null` when Reddit restricts anonymous access. We do not fabricate values; a `null` means "not available for this item right now," never a wrong number.

### How we compare

Reddit scrapers on Apify differ in how they access Reddit, how many inputs they accept, and what they return. Here is an honest comparison.

| | scrapers\_lat/reddit-scraper (this actor) | trudax/reddit-scraper-lite | trudax/reddit-scraper | bovi/reddit-scraper |
|---|---|---|---|---|
| Posts + comment threads | Yes | Yes | Yes | Yes |
| Subreddit feed + search + post URLs + user URLs | Yes (all four) | Yes | Yes | Partial |
| User's recent posts and comments | Yes | Yes | Yes | Partial |
| AI sentiment + AI summary in the same run | Yes (add-on) | No | No | No |
| Author profile enrichment | Yes (add-on, when reachable) | No | No | Separate user records |
| Live vote score / award counts | Best-effort (when Reddit permits) | Yes (browser) | Yes (browser) | Partial |
| Engine | HTTP-only (fast, no browser charge) | Headless browser | Headless browser | HTTP |
| Export JSON / CSV / Excel | Yes | Yes | Yes | Yes |
| Adoption | Growing | Largest (about 39k users) | About 14k users | Smaller |

Where competitors win, honestly: the browser-based `trudax` actors render each page in a real browser, so they can read live vote scores and award counts more consistently, and `reddit-scraper-lite` has by far the largest user base. Choose this actor when you want the widest input coverage (subreddits, search, post URLs and user URLs in one run), AI sentiment or summaries computed in the same pass, clean normalized JSON/CSV/Excel, and an HTTP-only engine that never adds a browser-tier compute charge.

### Use cases

- **Market and sentiment research.** Pull posts and comments for a product, ticker or topic across subreddits, then turn on `analyzeSentiment` to score how the community feels without a separate NLP step.
- **Brand and reputation monitoring.** Track mentions of your brand or competitors with search mode and use `createdAfter` for daily monitoring.
- **Trend and topic discovery.** Read `hot`, `new`, `top`, `rising` and `controversial` feeds with a time window to surface what is breaking out in a niche.
- **Lead generation and audience research.** Capture the authors behind posts and, with `scrapeUserProfiles`, their karma and account age when reachable.
- **Content sourcing and curation.** Collect posts and their media URLs for newsletters, dashboards or content pipelines.
- **AI training and RAG datasets.** Export clean JSON, CSV or Excel of posts and threaded comments to build datasets for models and retrieval systems.

### Quickstart

Open the actor, paste this into the input, and press Run. It returns the 10 hottest posts in r/technology plus their comments.

```json
{
  "maxPosts": 10,
  "includeComments": true,
  "mode": "subreddit",
  "subreddits": ["technology"],
  "sort": "hot",
  "time": "day",
  "commentsLimit": 10,
  "commentSort": "top"
}
```

Set `includeComments` to `false` to collect posts only. Switch `mode` to `search` and set `searchQuery` to query across Reddit instead of reading a subreddit feed. Or paste post and user links into `startUrls`.

### Input reference

Every field is optional. With an empty input the actor reads the default subreddit feed.

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `maxPosts` | integer | no | `10` | Maximum number of posts (and user/community records) to collect across all sources. |
| `includeComments` | boolean | no | `true` | When enabled, also fetch each post's comments and emit one record per comment. |
| `mode` | enum | no | `subreddit` | Where to read posts from: `subreddit` (a community feed) or `search` (a query across Reddit). |
| `subreddits` | string\[] | no | `["technology"]` | Subreddit names to scrape when `mode` is `subreddit`. Enter names without the `r/` prefix. |
| `startUrls` | string\[] | no | (empty) | Direct Reddit URLs to scrape: post links (`.../comments/...`), subreddit links, user profiles (`reddit.com/user/name`) or search links. Works alongside or instead of the mode inputs. |
| `searchQuery` | string | no | (empty) | Search terms to query when `mode` is `search`, for example `artificial intelligence`. |
| `searchSubreddit` | string | no | (empty) | When `mode` is `search`, restrict the search to this single subreddit (name without `r/`). Empty searches all of Reddit. |
| `sort` | enum | no | `hot` | Sort order. Subreddit mode: `hot`, `new`, `top`, `rising`, `controversial`. Search mode: `relevance`, `new`, `top`, `comments`. |
| `time` | enum | no | `day` | Time window for `top` sort and search: `hour`, `day`, `week`, `month`, `year`, `all`. Ignored for hot, new and rising. |
| `commentsLimit` | integer | no | `50` | Maximum comments to collect per post when Include Comments is enabled. |
| `commentSort` | enum | no | `top` | How comments are ordered on each post: `best`, `top`, `new`, `controversial`, `old`, `qa`. |
| `maxCommentDepth` | integer | no | (all) | Only keep comments up to this reply nesting depth (`0` = top-level only). Empty keeps all depths. Applies when reply depth is available. |
| `minScore` | integer | no | (none) | Skip posts whose net vote score is below this number, when score is available. Empty keeps every post. |
| `postType` | enum | no | `any` | Keep only one kind of post: `text` (self posts), `link` (external links) or `media` (image, gallery or video). `any` keeps all. |
| `excludeNsfw` | boolean | no | `false` | When enabled, posts flagged NSFW (over 18) are skipped, when the flag is available. |
| `createdAfter` | string | no | (none) | Keep only posts created on or after this date, for example `2026-01-01` or a full ISO timestamp. |
| `createdBefore` | string | no | (none) | Keep only posts created on or before this date. |
| `scrapeUserProfiles` | boolean | no | `false` | Paid add-on (paid Apify plans only). Add each post author's karma, cake day and verified/gold flags when the public profile is reachable. Charged only when a profile is genuinely fetched. |
| `analyzeSentiment` | boolean | no | `false` | Paid add-on. Add an AI sentiment label (positive / neutral / negative), score and rationale per post. Charged only on usable AI output. |
| `summarizePost` | boolean | no | `false` | Paid add-on. Add a one to two sentence AI summary per post. Charged only on usable AI output. |

### Output reference

One dataset item per post, comment or user. Use `recordType` to distinguish them. Types: `string`, `integer`, `number`, `boolean`, `string[]`, or `null` when the source value is absent. Fields marked "when available" are populated from Reddit's full public listing and are `null` when Reddit restricts anonymous access.

| Field | Type | Description |
|---|---|---|
| `recordType` | string | `post`, `comment` or `user`. |
| `id` | string | Reddit thing id of the post or comment. |
| `name` | string | Username (user records). |
| `title` | string | Post title (post records). |
| `selftext` | string | Body text of a self (text) post, or `null`. |
| `body` | string | Comment text (comment records), or `null`. |
| `bodyHtml` | string | Comment body as HTML (comment records), or `null`. |
| `subreddit` | string | Subreddit name without prefix. |
| `subredditPrefixed` | string | Subreddit name with `r/` prefix. |
| `subredditId` | string | Reddit subreddit id (`t5_...`), when available. |
| `subredditType` | string | Subreddit type, for example `public`, when available. |
| `author` | string | Username of the post or comment author. |
| `authorId` | string | Reddit author id (`t2_...`), when available. |
| `authorFlairText` | string | Author flair text, when available. |
| `postType` | string | `text`, `link`, `image`, `video` or `gallery` (post records). |
| `url` | string | Outbound or content URL of the post. |
| `permalink` | string | Full reddit.com permalink of the post or comment. |
| `domain` | string | Domain of the linked content (`self.<sub>` for text posts). |
| `score` | integer | Net vote score, when available. |
| `upvoteRatio` | number | Fraction of votes that are upvotes, when available. |
| `numComments` | integer | Comment count on the post, when available. |
| `numCrossposts` | integer | Number of crossposts, when available. |
| `totalAwards` | integer | Total awards received, when available. |
| `rank` | integer | Position of the post within the collected feed, when available. |
| `linkFlairText` | string | Link flair text, when available. |
| `isSelf` | boolean | `true` for text (self) posts. |
| `isGallery` / `isVideo` | boolean | Media type flags, when available. |
| `isNsfw` / `over18` | boolean | NSFW flag, when available. |
| `isSpoiler` / `isPinned` / `isLocked` / `isArchived` / `isEdited` | boolean | Content flags, when available. |
| `editedAt` | string | ISO 8601 edit timestamp, when available. |
| `distinguished` | string | Distinguished marker (`moderator`, `admin`), when available. |
| `isOriginalContent` | boolean | `true` when marked OC, when available. |
| `thumbnail` | string | Thumbnail image URL, or `null`. |
| `mediaUrl` | string | Primary media URL, or `null`. |
| `mediaUrls` | string\[] | All media URLs on the post. |
| `postId` | string | Parent post id (comment records). |
| `postTitle` | string | Parent post title (comment records). |
| `parentId` | string | Reddit id of the parent thing (comment records), when available. |
| `depth` | integer | Reply nesting depth (comment records; `0` = top-level), when available. |
| `isSubmitter` | boolean | `true` when the comment author is the post's OP, when available. |
| `createdAt` | string | ISO 8601 creation timestamp. |
| `updatedAt` | string | ISO 8601 last-updated timestamp. |
| `observedAt` | string | ISO 8601 timestamp of when the record was collected. |
| `source` | string | Which Reddit surface the record came from: `html` or `rss`. |
| `authorKarma` / `authorPostKarma` / `authorCommentKarma` | integer | Author karma, with the `scrapeUserProfiles` add-on when reachable. |
| `authorCakeDay` | string | Author account creation date, with the `scrapeUserProfiles` add-on when reachable. |
| `aiSentiment` | string | `positive`, `neutral` or `negative`. With the `analyzeSentiment` add-on. |
| `aiSentimentScore` | number | Sentiment score from -1 to 1, with the `analyzeSentiment` add-on. |
| `aiSentimentRationale` | string | One-line explanation of the sentiment, with the `analyzeSentiment` add-on. |
| `aiSummary` | string | One to two sentence AI summary of the post, with the `summarizePost` add-on. |
| `error` | string | `null` on success. On a failed source, a single item with a populated `error` field is written instead. |

### Example output record

Real `comment` record from a live run (input `{"subreddits": ["technology"], "includeComments": true}`):

```json
{
  "recordType": "comment",
  "id": "p7h6vg6",
  "body": "It looks like Meta is fighting several battles at once and losing but people do not seem to be angry or upset enough to actually stop using Meta...",
  "author": "-AMARYANA-",
  "postId": "1w5k5h4",
  "postTitle": "Hi Reddit, I'm Katie Paul, a Reuters journalist...",
  "subreddit": "technology",
  "permalink": "https://www.reddit.com/r/technology/comments/1w5k5h4/hi_reddit_im_katie_paul_a_reuters_journalist/p7h6vg6/",
  "createdAt": "2026-09-03T14:31:07+00:00",
  "source": "rss",
  "error": null
}
```

### Run via API and CLI

Start a run and read the dataset. Replace `<TOKEN>` with your Apify API token.

Run synchronously and get dataset items in one call:

```bash
curl -X POST "https://api.apify.com/v2/acts/scrapers_lat~reddit-scraper/run-sync-get-dataset-items?token=%3CTOKEN%3E" \
  -H "Content-Type: application/json" \
  -d '{"mode":"subreddit","subreddits":["technology"],"sort":"hot","maxPosts":25,"includeComments":false}'
```

Start a run asynchronously:

```bash
curl -X POST "https://api.apify.com/v2/acts/scrapers_lat~reddit-scraper/runs?token=%3CTOKEN%3E" \
  -H "Content-Type: application/json" \
  -d '{"mode":"search","searchQuery":"artificial intelligence","sort":"top","time":"week","maxPosts":100,"analyzeSentiment":true}'
```

Apify CLI:

```bash
apify call scrapers_lat/reddit-scraper \
  --input '{"subreddits":["worldnews"],"sort":"top","time":"day","includeComments":true,"commentsLimit":20}'
```

### Fetch results

Every run writes to a dataset. Fetch items as JSON, CSV, or Excel by changing `format`:

```bash
## JSON
curl "https://api.apify.com/v2/datasets/%3CDATASET_ID%3E/items?token=%3CTOKEN%3E&clean=true&format=json"

## CSV
curl "https://api.apify.com/v2/datasets/%3CDATASET_ID%3E/items?token=%3CTOKEN%3E&clean=true&format=csv"

## Paginate large datasets
curl "https://api.apify.com/v2/datasets/%3CDATASET_ID%3E/items?token=%3CTOKEN%3E&offset=1000&limit=1000"
```

`<DATASET_ID>` is returned as `defaultDatasetId` in the run object. `clean=true` drops empty and internal fields.

### Billing and limits

- **Pay per result.** Post and user records are charged as the `result` event; comment records are charged as the `details` event. See the [pricing tab](https://apify.com/scrapers_lat/reddit-scraper/pricing) for current per-record prices.
- **Optional add-on events.** `scrapeUserProfiles` charges a `user_profile` event only when an author profile is genuinely fetched; `analyzeSentiment` and `summarizePost` charge `ai_sentiment` and `ai_summary` events only when the model returns usable output. All three are off by default.
- **No charge on failure.** If a source errors, the actor writes a single item with a populated `error` field and does not charge for it. Empty runs cost nothing. An add-on that returns nothing is never charged.
- **Spend cap respected.** Set `maxTotalChargeUsd` on the run; once reached, the actor stops emitting and charging further billable records.
- **Free Apify plans** are capped at 10 posts per run, and the paid add-ons are disabled for free accounts.
- **Comments are optional.** Set `includeComments` to `false` to collect and pay for posts only.

### FAQ and troubleshooting

**Do I need a Reddit API key or a Reddit login?**
No. This actor needs neither. Paste a subreddit, search term or URL and run it.

**Why are `score`, `numComments` or `totalAwards` sometimes `null`?**
Reddit has tightened anonymous access to its public pages. When Reddit serves only its lighter public feed for an item, the live vote score, comment count and award counts are not exposed, so we return `null` rather than guess. The item's core content - title, author, body, links, media and timestamps - is always returned. Turning on `analyzeSentiment` gives you a content-based signal that does not depend on vote counts.

**A run returned 0 records. Why?**
The subreddit is empty or private, the search matched nothing, or your filters excluded everything. Loosen the filters or confirm the subreddit name. Zero-result runs are not charged.

**How do I collect posts without comments?**
Set `includeComments` to `false`. Only `post` records are written and only the `result` event is charged.

**What is the difference between subreddit mode and search mode?**
Subreddit mode reads a community feed (`r/<name>`). Search mode queries across Reddit (or a single subreddit via `searchSubreddit`).

**Can I scrape a specific post or a user by URL?**
Yes. Put post links, subreddit links or user profile links in `startUrls`. Post links return the post plus its comments; user links return a `user` record plus that user's recent posts and comments. For deep user-history scraping, see the dedicated [Reddit User Scraper](https://apify.com/scrapers_lat/reddit-user-scraper).

**How do I get sentiment or summaries?**
Turn on `analyzeSentiment` and `summarizePost` (paid Apify plans). Each post then carries `aiSentiment`, `aiSentimentScore`, `aiSentimentRationale` and `aiSummary`, computed in the same run.

**Is it fast? Does it use a browser?**
It is HTTP-only, so it does not launch a headless browser and does not add a browser-tier compute charge. It routes through rotating residential IPs and retries when Reddit rate-limits a request.

**Is this an official Reddit tool?**
No. This actor is independent and has no affiliation with Reddit. It reads only data that is publicly available on Reddit. Use it in accordance with Reddit's terms.

### Related scrapers

- [Reddit Search Scraper](https://apify.com/scrapers_lat/reddit-search-scraper): Reddit search results across all of Reddit or one subreddit.
- [Reddit Trending Scraper](https://apify.com/scrapers_lat/reddit-trending-scraper): trending and popular posts across Reddit.
- [Reddit User Scraper](https://apify.com/scrapers_lat/reddit-user-scraper): a user's posts, comments and profile.
- [Hacker News Scraper](https://apify.com/scrapers_lat/hacker-news-scraper): Hacker News stories, comments and points.
- [Google News Scraper](https://apify.com/scrapers_lat/google-news-scraper): news articles by keyword and topic.

### More scrapers at scrapers.lat

Built and maintained by [scrapers.lat](https://scrapers.lat), where we publish scrapers for US and Latin American public platforms: company registries, government data, finance, e-commerce and more. Browse the catalog or request a custom scraper at [scrapers.lat](https://scrapers.lat).

***

> Independent tool, not affiliated with Reddit. Accesses only publicly available Reddit data. Use in accordance with Reddit's terms.

# Actor input Schema

## `maxPosts` (type: `integer`):

Maximum number of posts to collect across all sources. Optional.

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

When enabled, the scraper also fetches the comments of each collected post and emits one record per comment.

## `mode` (type: `string`):

Choose whether to read posts from subreddits or from a search query.

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

Subreddit names to scrape when mode is 'subreddit'. Enter names without the r/ prefix, for example: technology, worldnews.

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

Optional. Paste direct Reddit URLs to scrape: post links (…/comments/…), subreddit links (reddit.com/r/name), user profiles (reddit.com/user/name) or search links. Works alongside or instead of the mode inputs.

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

Search terms to query when mode is 'search'. For example: artificial intelligence.

## `searchSubreddit` (type: `string`):

Optional. When mode is 'search', restrict the search to this single subreddit (name without r/). Leave empty to search all of Reddit.

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

Sort order. For subreddit mode: hot, new, top, rising, controversial. For search mode: relevance, new, top, comments.

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

Time window for the 'top' sort (and search). Ignored for hot, new and rising.

## `commentsLimit` (type: `integer`):

Maximum number of comments to collect per post when Include Comments is enabled.

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

How comments are ordered on each post. Best surfaces the highest-confidence replies; Top orders by score.

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

Optional. Only keep comments up to this reply nesting depth (0 = top-level comments only). Leave empty for all depths.

## `minScore` (type: `integer`):

Optional. Skip posts whose net vote score is below this number. Leave empty to keep every post.

## `postType` (type: `string`):

Optional. Keep only a specific kind of post: text (self posts), link (external links) or media (image, gallery or video). Any keeps all types.

## `excludeNsfw` (type: `boolean`):

Optional. When enabled, posts flagged NSFW (over 18) are skipped.

## `createdAfter` (type: `string`):

Optional. Keep only posts created on or after this date. Accepts a date such as 2026-01-01 or a full ISO timestamp.

## `createdBefore` (type: `string`):

Optional. Keep only posts created on or before this date. Accepts a date such as 2026-06-30 or a full ISO timestamp.

## `scrapeUserProfiles` (type: `boolean`):

Optional paid add-on. Fetch each post author's public profile and add karma (total, post, comment), cake day and verified/gold flags to the post record. Paid Apify plans only; charged only when a profile is genuinely fetched.

## `analyzeSentiment` (type: `boolean`):

Optional paid add-on. Classify each post's sentiment (positive / neutral / negative) with a score and rationale. Ideal for brand and market-research monitoring. Charged only on usable AI output.

## `summarizePost` (type: `boolean`):

Optional paid add-on. Add a 1-2 sentence plain-English summary of each post. Charged only on usable AI output.

## Actor input object example

```json
{
  "maxPosts": 10,
  "includeComments": true,
  "mode": "subreddit",
  "subreddits": [
    "technology"
  ],
  "sort": "hot",
  "time": "day",
  "commentsLimit": 50,
  "commentSort": "top",
  "postType": "any",
  "excludeNsfw": false,
  "scrapeUserProfiles": false,
  "analyzeSentiment": false,
  "summarizePost": false
}
```

# Actor output Schema

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

No description

# 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 = {
    "maxPosts": 10,
    "subreddits": [
        "technology"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapers_lat/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 = {
    "maxPosts": 10,
    "subreddits": ["technology"],
}

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

```

## MCP server setup

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