# Reddit Posts Scraper ($0.99/1k posts) (`digispruce/reddit-posts-scraper`) Actor

Scrape Reddit posts from any subreddit or keyword search: title, body, score, upvote ratio, flair, media, author, and community — as structured JSON. No login or Reddit API key needed.

- **URL**: https://apify.com/digispruce/reddit-posts-scraper.md
- **Developed by:** [Akram](https://apify.com/digispruce) (community)
- **Categories:** Lead generation, Social media
- **Stats:** 1 total users, 1 monthly users, 60.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 1,000 post saveds

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/platform/actors/running/actors-in-store#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 Posts Scraper extracts **posts from any subreddit and from Reddit keyword search** — title, body text, score, upvote ratio, comment count, flair, media, author, and community — and hands them back as structured JSON, CSV, or Excel. Paste a subreddit name, a keyword, or a reddit.com URL you copied from your browser, hit start, and the data lands in a dataset you can download or pull through the API.

No Reddit account, no Reddit API key, no OAuth app registration. You are charged **$0.99 per 1,000 posts**, and only for posts that actually reach your dataset.

### What data can you extract from Reddit?

One row per post, 15 fields:

| Field | Example | Notes |
| --- | --- | --- |
| `id` | `1abc234` | Reddit's post id |
| `title` | `What's your favourite async library?` | |
| `postText` | `I've been using asyncio for…` | Empty on link and media posts |
| `postUrl` | `https://www.reddit.com/r/python/comments/…` | Full permalink |
| `communityName` | `r/python` | |
| `authorName` | `some_user` | `[deleted]` when the account is gone |
| `score` | `1423` | Upvotes minus downvotes |
| `upVoteRatio` | `0.97` | 0–1 |
| `commentsCount` | `212` | |
| `flair` | `Discussion` | `null` when unflaired |
| `isNSFW` | `false` | |
| `mediaAssets` | `[{"type": "image", "url": "https://i.redd.it/…"}]` | Galleries, videos, images, GIFs; `[]` for text posts |
| `externalUrl` | `https://example.com/article` | `null` for text and Reddit-hosted media |
| `createdAt` | `2026-02-14T09:31:07+00:00` | ISO 8601, UTC |
| `scrapedAt` | `2026-02-18T11:02:44+00:00` | ISO 8601, UTC |

### Features

- **Subreddit listings** in the same order reddit.com shows them: Hot, New, Top, Rising.
- **Keyword search** across all of Reddit, or confined to the communities you choose, sorted by relevance, hot, top, new, or comment count.
- **Pasted URLs** — copy a subreddit or search URL out of your browser and it is scraped exactly as it appears, sort included. A link to a single post is not a source: this Actor scrapes a subreddit's posts, not one post's comments.
- **Date windows** — keep only posts created inside a window; on a newest-first run the scraper stops paging as soon as it walks past your start date, so you don't pay for posts you filter out.
- **NSFW filter**, off by default.
- **Deduplication across sources** — scrape three subreddits and two keywords in one run and each post is saved once, even when it matches several of them.
- **Mixed runs** — subreddits, searches, and pasted URLs all in a single run, each with its own budget.
- **Platform extras** — schedule runs, get results via API, export to CSV/JSON/Excel, or wire the output into Make, Zapier, n8n, Google Sheets, Slack, and the rest of Apify's integrations.

### How to scrape Reddit posts

1. Click **Try for free** and sign in to your Apify account.
2. Type one or more **subreddits** — names, not links: `python`, `r/python`, or `python+django` for several at once. Or leave that empty and fill in **search terms** instead.
3. Pick a **sort**: Hot, New, Rising, or one of the Top options, which carry their own time window — *Top — past week*, *Top — past year*, and so on.
4. Set **Max posts per subreddit** (and **Max posts per search term**). This is your cost ceiling: 100 posts from each of 5 subreddits is at most 500 posts, or $0.5
5. Optionally narrow with **Posted after** / **Posted before** and the **NSFW** toggle. Both dates are included in full, so picking the same day in both boxes scrapes that day.
6. Click **Start** and watch the log. Results appear in the **Storage** tab and can be downloaded as JSON, CSV, or Excel.

#### Input example

```json
{
  "subreddits": ["python", "learnpython"],
  "sort": "top_week",
  "maxPostsPerSubreddit": 100,
  "searchTerms": ["fastapi", "async database"],
  "searchWithinSubreddits": ["python"],
  "searchSort": "new",
  "maxPostsPerSearchTerm": 50,
  "postedAfter": "2026-01-01",
  "includeNSFW": false
}
```

That run scrapes two subreddit listings and two searches confined to r/python, keeps only posts from 2026 onward, and stops at 100 posts per subreddit and 50 per search term.

#### Output example

```json
{
  "id": "1abc234",
  "title": "What's your favourite async library in 2026?",
  "postText": "I've been using asyncio directly for years, but…",
  "postUrl": "https://www.reddit.com/r/python/comments/1abc234/whats_your_favourite_async_library_in_2026/",
  "communityName": "r/python",
  "authorName": "some_user",
  "score": 1423,
  "upVoteRatio": 0.97,
  "commentsCount": 212,
  "flair": "Discussion",
  "isNSFW": false,
  "mediaAssets": [],
  "externalUrl": null,
  "createdAt": "2026-02-14T09:31:07+00:00",
  "scrapedAt": "2026-02-18T11:02:44+00:00"
}
```

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

**$0.99 per 1,000 posts** — $0.00099 per post — charged per post saved to your dataset. Plus a small platform fee when a run starts; see the **Pricing** tab for the exact current numbers.

| You want      | You pay |
| ---           | ---     |
| 100 posts     | $0.099  |
| 1,000 posts   | $0.99   |
| 10,000 posts  | $9.90   |
| 100,000 posts | $99.00  |

Two things keep the bill honest:

- **Filtered posts are free.** NSFW posts you excluded and posts outside your date window are never saved and never charged.
- **Duplicates are free.** A post matching both a subreddit listing and a keyword search in the same run is saved and charged once.

Apify's free plan comes with monthly usage credit, so you can try a few thousand posts before paying anything. To cap a run hard, set a maximum charge on it in the Console — the scraper stops the moment the limit is reached, mid-run, rather than overshooting it.

#### How does this compare to other Reddit scrapers?

|                               | This scraper     | Typical alternatives                         |
| ---                           | ---              | ---                                          |
| Price per 1,000 posts         | $0.99            | $1.5–$5                                      |
| Subreddits and keyword search | Both, in one run | Usually one or the other, as separate actors |
| Charged for                   | Posts saved      | Posts returned, or compute time              |
| Duplicates across sources     | Removed run-wide | Often billed twice                           |
| Reddit API key required       | No               | Sometimes                                    |

### Limits and troubleshooting

#### Why can't I get more than about 1,000 posts from a subreddit?

That is Reddit's limit, not the scraper's: a listing stops offering the "next page" cursor at roughly 1,000 posts, and often earlier, because removed and hidden posts count against the limit without being returned. When a run hits it you'll see `Listing exhausted at N posts, no further pages offered.` in the log — the run keeps going with your other sources.

To pull more than 1,000 posts from one community, use several sources instead of one big one:

- Scrape the same subreddit under different sorts (New, Top, Hot, Rising) — the windows overlap, and duplicates are removed and only charged once.
- Scrape Top with several time windows: past week, month, year, all time.
- Add keyword searches confined to that subreddit; each term is its own 1,000-post budget.
- Use **Posted after** / **Posted before** to sweep the archive in date slices. Both ends of a slice are included, so start the next one on the following day: 1–15 January, then 16–31 January.

#### Which sorts accept a time window?

Reddit applies a time window to the **Top** sort only, matching reddit.com, so the listing **sort** carries its window with it: pick *Top — past week* and you get exactly that. Hot, New, and Rising always span all time — there is no window to set on them and no way to ask for one Reddit would ignore. The **search time window** is its own field, because search does honour it on every search sort.

#### The run finished with fewer posts than I asked for

Either the source ran out (a small subreddit, a rare keyword), or your filters removed posts, or Reddit's ~1,000-post cap was reached, or a few posts came back in a shape the scraper could not read and were skipped — the summary counts those separately and each one is named in the log. The log tells you which: each page logs the source it came from and the posts saved so far, and the run ends on a summary line of how many posts were requested, found, and saved overall.

### FAQ

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

No. The scraper reads Reddit's public data the same way a logged-out visitor does. There is nothing to register, and no credentials to hand over.

#### Can I scrape comments too?

Not yet — this scraper covers posts. Comment scraping is next on the roadmap; if you need it, open an issue and say so, it moves things up the list.

#### Can I run this on a schedule?

Yes. Schedule the actor in Apify Console (hourly, daily, weekly) and each run appends to a dataset you can poll from the API, push into Google Sheets or Slack, or diff to spot new posts on a keyword. Monitoring a brand or a keyword across communities is exactly what the search input is for.

#### Can I call it from my own code?

Yes — start runs and read results through the [Apify API](https://docs.apify.com/api/v2), the [Python client](https://docs.apify.com/api/client/python/), or the [JavaScript client](https://docs.apify.com/api/client/js/). The dataset is available as JSON, CSV, Excel, or XML.

#### What can I use Reddit post data for?

Market and product research, brand and competitor monitoring, lead generation from communities where your buyers ask questions, trend detection through Rising and New feeds, sentiment analysis, academic research, content ideas, and training or evaluation datasets for AI.

### Support

Found a bug, or need a field the scraper doesn't return yet? Open an issue on the actor's **Issues** tab — issues are read and answered. Feature requests are welcome, and custom variants of this scraper can be built on request.

# Actor input Schema

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

Subreddit names to scrape, with or without the r/ prefix — e.g. "python" or "r/python". Names only: to scrape a reddit.com URL you copied from your browser, paste it into Start URLs instead. Join several with a plus — "python+django" — to page them as one listing. Each subreddit is scraped as its own source, up to Max posts per subreddit.

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

Reddit URLs pasted straight from your browser — a subreddit listing such as "https://www.reddit.com/r/python/new/", or a search such as "https://www.reddit.com/r/python/search/?q=asyncio\&restrict\_sr=1". The sort in the URL is the one used, so each URL is scraped as its own source; a subreddit URL without a sort is read as Hot, matching reddit.com. Subreddit URLs take Max posts per subreddit, search URLs take Max posts per search term. A link to a single post is not a source: this Actor scrapes a subreddit's posts, not one post's comments.

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

Order posts are returned in within each subreddit — the reddit.com tabs. Top carries its own time window, exactly as reddit.com does; the other tabs always span all time.

## `maxPostsPerSubreddit` (type: `integer`):

How many posts to scrape from each subreddit. You are charged per post saved, so this is also the cost ceiling for one subreddit. Reddit stops paging a listing at roughly 1,000 posts, often fewer — removed posts count against that limit without being returned — so a higher value simply returns everything available.

## `searchTerms` (type: `array`):

Keywords or phrases to search Reddit for, e.g. "machine learning". Each term is scraped as its own source, up to Max posts per search term.

## `searchWithinSubreddits` (type: `array`):

Confine the search terms to these communities, with or without the r/ prefix — e.g. "python" or "r/python". Names only, not reddit.com URLs. Leave empty to search all of Reddit. Each subreddit and term combination is scraped as its own source.

## `searchSort` (type: `string`):

Order search results are returned in. Applies to the search terms only, not to the subreddit listings above.

## `searchTime` (type: `string`):

Only return search results posted within this window. Works with every search sort.

## `maxPostsPerSearchTerm` (type: `integer`):

How many posts to scrape for each search term, and the cost ceiling for it. When the search is confined to subreddits, this applies to each subreddit and term combination. Reddit stops paging results at roughly 1,000 posts, often fewer, so a higher value simply returns everything available.

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

Keep posts marked NSFW (over 18). Off by default, so they are skipped.

## `postedAfter` (type: `string`):

Only keep posts from this date onwards. The day you pick is included, counted from 00:00 UTC. A timestamp such as "2026-01-31T12:00:00Z" cuts at that exact moment instead; times without a zone are read as UTC.

## `postedBefore` (type: `string`):

Only keep posts up to this date. The day you pick is included in full, so picking the same day here and above scrapes that one day. A timestamp such as "2026-02-28T12:00:00Z" cuts at that exact moment instead; times without a zone are read as UTC.

## Actor input object example

```json
{
  "subreddits": [
    "python"
  ],
  "sort": "new",
  "maxPostsPerSubreddit": 10,
  "searchSort": "relevance",
  "searchTime": "all",
  "maxPostsPerSearchTerm": 10,
  "includeNSFW": false
}
```

# Actor output Schema

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

One item per Reddit post: id, title, postText, postUrl, communityName, authorName, score, upVoteRatio, commentsCount, flair, isNSFW, mediaAssets, externalUrl, createdAt, scrapedAt.

# 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 = {
    "subreddits": [
        "python"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("digispruce/reddit-posts-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 = { "subreddits": ["python"] }

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

```

## MCP server setup

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