# Reddit Subreddit Posts Scraper (`thescrappa/reddit-subreddit-posts-scraper`) Actor

Scrape the hot, new, top, rising or controversial posts of any subreddit with title, text, author, score, upvote ratio, comments, flair, date and media links. Paste subreddit names or links, run many at once and add the subreddit description and creation date.

- **URL**: https://apify.com/thescrappa/reddit-subreddit-posts-scraper.md
- **Developed by:** [Scrappa](https://apify.com/thescrappa) (community)
- **Categories:** Social media, Marketing
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.30 / 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?

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 Subreddit Posts Scraper

Export the posts of any subreddit as one clean row per post: title, full text, author, score, upvote ratio, number of comments, flair, publish date, and links to images, galleries and videos. Choose hot, new, top, rising or controversial posts, pick a time window such as the past week for top posts, and paste up to 100 subreddit names or links per run. Turn on subreddit details to add the description, creation date and icon of each subreddit to its posts.

### What data can you extract?

| Field | Type | Description |
| --- | --- | --- |
| `id` | String | Reddit ID of the post, such as 1xfzdia. |
| `fullname` | String | Reddit full name of the post with its t3\_ prefix, such as t3_1xfzdia. |
| `title` | String | Title of the post. |
| `text` | String or null | Body text of a text post in Markdown. Null for link, image and video posts without text. |
| `author` | String | Reddit username of the poster, without u/. Shows \[deleted] when the account was deleted. |
| `subreddit` | String | Name of the subreddit, without r/. Posts on a profile show u\_ and the username. |
| `subreddit_id` | String | Reddit full name of the subreddit, such as t5_318ly. |
| `subreddit_subscribers` | Integer | Number of members of the subreddit when the post was read. 0 for posts on a user profile. |
| `post_type` | String | Kind of post: text, link, image, gallery, video or crosspost. |
| `url` | String | Link target of the post: the external page, image or video. For text posts it is the post itself. |
| `permalink` | String | Link to the post and its comments on reddit.com. |
| `domain` | String | Domain of the link target, such as youtu.be, i.redd.it or self.webscraping for text posts. |
| `score` | Integer | Upvotes minus downvotes as shown by Reddit. Reddit fuzzes this number a little. |
| `upvote_ratio` | Number | Share of upvotes among all votes, from 0 to 1, such as 0.98. |
| `num_comments` | Integer | Number of comments on the post. |
| `num_crossposts` | Integer | Number of times the post was shared to other subreddits. |
| `flair` | String or null | Text of the post flair, such as Discussion. Null when the post has no flair. |
| `created_at` | String | ISO 8601 date and time in UTC when the post was published. |
| `edited_at` | String or null | ISO 8601 date and time in UTC of the last edit. Null when the post was never edited. |
| `over_18` | Boolean | True when the post is marked as adult content (NSFW). |
| `spoiler` | Boolean | True when the post is marked as a spoiler. |
| `stickied` | Boolean | True when moderators pinned the post to the top of the subreddit. |
| `locked` | Boolean | True when the post is locked and takes no new comments. |
| `archived` | Boolean | True when the post is archived and takes no new votes or comments. |
| `is_original_content` | Boolean | True when the poster marked the post as original content (OC). |
| `distinguished` | String or null | moderator or admin when the poster spoke in that role. Null for normal posts. |
| `removed_by_category` | String or null | Why Reddit hid the post, such as moderator or deleted. Null for visible posts. |
| `thumbnail_url` | String or null | Link to the small preview image. Null for posts without a preview. |
| `preview_url` | String or null | Link to the full-size preview image. Null for posts without a preview. |
| `gallery` | Array\<Object> or null | Images of a gallery post, each with id, url, width, height, mime_type, caption and link. Null for other posts. |
| `video` | Object or null | Reddit-hosted video with url (MP4), hls_url, dash_url, width, height, duration_seconds, has_audio and is_gif. Null for other posts. |
| `crosspost_parent` | Object or null | The original post when this post is a crosspost, with its own id, title, subreddit, author, score and links. Null otherwise. |
| `subreddit_title` | String or null | Display title of the subreddit. Only with includeSubredditInfo, otherwise not included. |
| `subreddit_description` | String or null | Short public description of the subreddit. Only with includeSubredditInfo, otherwise not included. |
| `subreddit_created_at` | String or null | ISO 8601 date and time in UTC when the subreddit was created. Only with includeSubredditInfo, otherwise not included. |
| `subreddit_type` | String or null | Access type of the subreddit, such as public or restricted. Only with includeSubredditInfo, otherwise not included. |
| `subreddit_language` | String or null | Main language code of the subreddit, such as en. Only with includeSubredditInfo, otherwise not included. |
| `subreddit_icon_url` | String or null | Link to the subreddit icon. Only with includeSubredditInfo, otherwise not included. |
| `input_subreddit` | String | The subreddit name or link from your input. |
| `scraped_at` | String | UTC date and time when this record was collected. |

### Use cases

- Marketers can see which posts get the most upvotes in their niche each week and what makes them work.
- Community managers can export the new posts of their own subreddit for reports and moderation.
- Researchers can collect the top posts of many subreddits over a month or a year for topic analysis.
- Product teams can follow subreddits about their market and spot requests and complaints early.
- Content creators can find popular questions to answer in articles and videos.

### How to use

1. Add one entry per subreddit to `subreddits`, such as `webscraping`, `r/webscraping` or `https://www.reddit.com/r/webscraping/`.
2. Optional: set `sort` to `top` and `time` to `week` for the best posts of the week, or `sort` to `new` for the latest posts.
3. Optional: turn on `includeSubredditInfo` to add the subreddit description and creation date to each post.
4. Set `maxResults` to the number of posts you want for each subreddit and start the run.

```json
{
  "subreddits": [
    {
      "subreddit": "webscraping"
    }
  ],
  "sort": "top",
  "time": "week",
  "includeSubredditInfo": true,
  "maxResults": 20
}
```

### Input

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `subreddits` | Array\<object> | Yes | Subreddits to scrape, one per entry. Paste the name, r/name or the reddit.com link. Each entry can set its own sort and time window. |
| `subreddits[].subreddit` | string | Yes per entry | Subreddit name such as webscraping, r/webscraping, or a link such as https://www.reddit.com/r/webscraping/. |
| `subreddits[].sort` | string | No | Which posts to read. Leave empty for the hot posts. |
| `subreddits[].time` | string | No | Time window for top and controversial posts, such as week. Reddit uses it only with those two sort orders, so it is ignored for the others. Leave empty for the Reddit default (past 24 hours). |
| `sort` | string | No | Which posts to read. Leave empty for the hot posts. |
| `time` | string | No | Time window for top and controversial posts, such as week. Reddit uses it only with those two sort orders, so it is ignored for the others. Leave empty for the Reddit default (past 24 hours). |
| `includeSubredditInfo` | boolean | No | Adds the subreddit title, description, creation date, type, language and icon to every post. Costs one extra request per subreddit, not extra results. |
| `maxResults` | integer | No | Maximum posts to save for each subreddit. Reddit returns up to 100 posts per page and about 1,000 per list. |
| `maxPages` | integer | No | Maximum pages to request for each batch entry. |

### Output example

```json
{
  "id": "1xq7k2d",
  "fullname": "t3_1xq7k2d",
  "title": "How I keep a price tracker running on 40 shops without getting blocked",
  "text": "I run a small price tracker for camping gear. It checks about 40 shops twice a day. Three things made it stable: slow request rates per domain, caching pages that rarely change, and alerts when the number of parsed items drops. Happy to share the parser layout if anyone is interested.",
  "author": "trailhead_dev",
  "subreddit": "webscraping",
  "subreddit_id": "t5_318ly",
  "subreddit_subscribers": 105104,
  "post_type": "text",
  "url": "https://www.reddit.com/r/webscraping/comments/1xq7k2d/how_i_keep_a_price_tracker_running_on_40/",
  "permalink": "https://www.reddit.com/r/webscraping/comments/1xq7k2d/how_i_keep_a_price_tracker_running_on_40/",
  "domain": "self.webscraping",
  "score": 214,
  "upvote_ratio": 0.97,
  "num_comments": 38,
  "num_crossposts": 1,
  "flair": "Getting started 🌱",
  "created_at": "2026-10-24T09:12:40+00:00",
  "edited_at": null,
  "over_18": false,
  "spoiler": false,
  "stickied": false,
  "locked": false,
  "archived": false,
  "is_original_content": false,
  "distinguished": null,
  "removed_by_category": null,
  "thumbnail_url": null,
  "preview_url": null,
  "gallery": null,
  "video": null,
  "crosspost_parent": null,
  "subreddit_title": "webscraping",
  "subreddit_description": "A community for questions, tools and news about web scraping.",
  "subreddit_created_at": "2014-04-06T10:50:02+00:00",
  "subreddit_type": "public",
  "subreddit_language": "en",
  "subreddit_icon_url": "https://styles.redditmedia.com/t5_318ly/styles/communityIcon_example.png",
  "input_subreddit": "webscraping",
  "scraped_at": "2026-10-01T12:00:00Z"
}
```

### Pricing

$0.375 per 1,000 results on the Apify Free plan, $0.34 on Bronze, $0.31 on Silver and $0.30 on Gold and higher plans. Apify saves one dataset item per result and applies the Actor’s per-result price to saved items.

Pagination follows the source response. Set **maxPages** per batch entry and **maxResults** for each entry.

### FAQ

#### Is scraping this information legal?

Rules depend on the source, location, data type, and intended use. Check applicable laws and source terms, and make sure your workflow follows privacy and data protection requirements.

#### What limits apply?

Submit up to 100 batch entries per run. Use **maxResults** to cap saved items for each entry and **maxPages** to limit pages for each entry. Results also depend on source availability and your Scrappa API plan.

#### Can I start runs through the Apify API?

Yes. Send a POST request to `https://api.apify.com/v2/acts/thescrappa~reddit-subreddit-posts-scraper/runs` with your Actor input, or use an Apify client library. Read the output from the run dataset.

#### Can I connect the results to other tools?

Yes. Apify integrations and APIs can pass dataset results to Make, Zapier, n8n, Google Sheets, and other data workflows.

#### What happens when one input fails?

The Actor logs a short source error and continues with the remaining entries. Transient rate limits and gateway errors are retried; if every entry fails, the run reports an error.

#### Does it also scrape the comments of each post?

No. This Actor saves the posts only, with their comment count. To get the comments a person wrote, use the Reddit User Posts and Comments Scraper.

#### Why does the time window not change my hot or new posts?

Reddit uses the time window only for top and controversial posts. With other sort orders the Actor leaves it out, so the run does not fail.

#### What happens with a subreddit that does not exist or is private?

The run log names its entry number as not found and the status message lists it. The other subreddits are still saved.

### Related Scrappa Actors

- [Reddit Search Scraper](https://apify.com/thescrappa/reddit-search-scraper)
- [Reddit User Posts and Comments Scraper](https://apify.com/thescrappa/reddit-user-scraper)
- [Threads Search Scraper](https://apify.com/thescrappa/threads-search-scraper)
- [Google Search Scraper](https://apify.com/thescrappa/google-search)
- [Pinterest Search Scraper](https://apify.com/thescrappa/pinterest-search-scraper)

# Actor input Schema

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

Subreddits to scrape, one per entry. Paste the name, r/name or the reddit.com link. Each entry can set its own sort and time window.

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

Which posts to read. Leave empty for the hot posts.

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

Time window for top and controversial posts, such as week. Reddit uses it only with those two sort orders, so it is ignored for the others. Leave empty for the Reddit default (past 24 hours).

## `includeSubredditInfo` (type: `boolean`):

Adds the subreddit title, description, creation date, type, language and icon to every post. Costs one extra request per subreddit, not extra results.

## `maxResults` (type: `integer`):

Maximum posts to save for each subreddit. Reddit returns up to 100 posts per page and about 1,000 per list.

## `maxPages` (type: `integer`):

Maximum pages to request for each batch entry.

## Actor input object example

```json
{
  "subreddits": [
    {
      "subreddit": "webscraping"
    }
  ],
  "sort": "top",
  "time": "week",
  "includeSubredditInfo": true,
  "maxResults": 20,
  "maxPages": 10
}
```

# Actor output Schema

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

All results from this run in the default dataset.

# 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": [
        {
            "subreddit": "webscraping"
        }
    ],
    "sort": "top",
    "time": "week",
    "includeSubredditInfo": true,
    "maxResults": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("thescrappa/reddit-subreddit-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": [{ "subreddit": "webscraping" }],
    "sort": "top",
    "time": "week",
    "includeSubredditInfo": True,
    "maxResults": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("thescrappa/reddit-subreddit-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": [
    {
      "subreddit": "webscraping"
    }
  ],
  "sort": "top",
  "time": "week",
  "includeSubredditInfo": true,
  "maxResults": 20
}' |
apify call thescrappa/reddit-subreddit-posts-scraper --silent --output-dataset

```

## MCP server setup

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