# Reddit Subreddit Scraper – Export Posts from Any Subreddit (`endspec/reddit-instant-subreddit-scraper`) Actor

Scrape the newest, hot, top or rising posts from any public subreddit. Export post title, body text, author, score, comment count, timestamp, permalink and URL to JSON, CSV or Excel. No login, no Reddit API key. Pay only per post returned.

- **URL**: https://apify.com/endspec/reddit-instant-subreddit-scraper.md
- **Developed by:** [EndSpec](https://apify.com/endspec) (community)
- **Categories:** Social media, News, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.70 / 1,000 post returneds

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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use 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 Subreddit Scraper – Export Posts from Any Subreddit

**Scrape posts from any public subreddit on [Reddit](https://www.reddit.com) — sorted by new, hot, top or rising — and export them to JSON, CSV or Excel. No login, no Reddit API key.**

---

**Simple Input-Output Example**

Input (`subreddit` is required):
```json
{
  "subreddit": "technology",
  "sortType": "new",
  "limit": 25
}
````

Output (one dataset row per post):

```json
{
  "id": "1kx9r2h",
  "title": "EU regulators open formal probe into cloud storage pricing",
  "text": "Filed this morning. The complaint focuses on egress fees and how they lock in customers...",
  "author": "netpolicywatch",
  "subreddit": "technology",
  "score": 3184,
  "num_comments": 412,
  "created_utc": 1752710400,
  "url": "https://example-news-site.com/eu-cloud-probe",
  "permalink": "https://reddit.com/r/technology/comments/1kx9r2h/eu_regulators_open_formal_probe/",
  "_query": "{\"subreddit\":\"technology\",\"sortType\":\"new\"}"
}
```

**Important Notes:**

- Results are returned **instantly** — no Reddit account, login or official API key needed
- Pay **per post returned** — **$0.0020 / post**; failed and empty runs cost you **nothing**
- Sort by **new**, **hot**, **top** or **rising**
- **One subreddit per run**, up to **100 posts** — this Actor returns **posts, not comments**
- All data comes from **public subreddits** only
- Searching Reddit by **keyword** instead of browsing one subreddit? Use [Reddit Keyword Search Scraper](https://apify.com/endspec/reddit-instant-search-scraper)
- Contact: contact@endspec.net

***

### Full Actor Documentation

#### Reddit Subreddit Scraper

**Pull the post feed of any public subreddit in seconds.** Give the Actor a subreddit name and a sort order, and get back structured posts — title, body text, author, score, comment count, timestamp, permalink and link URL — ready to export or pipe into your own tools.

***

#### Overview

The Reddit Subreddit Scraper is an Apify Actor that extracts the post feed of a single public subreddit from [Reddit](https://www.reddit.com). It answers one question well: *what is being posted in r/\<subreddit> right now (or what is on top there)?*

Point it at `r/technology`, `r/gaming`, `r/personalfinance` or any other public community, choose whether you want the **newest**, **hot**, **top** or **rising** posts, and the Actor writes each post as a row in an Apify dataset that you can download as JSON, CSV, Excel, HTML or XML — or read straight from the Apify API.

**What this Actor does not do**, so you can decide quickly:

- It does **not** search Reddit by keyword — for that, use the [Reddit Keyword Search Scraper](https://apify.com/endspec/reddit-instant-search-scraper), a separate Actor that queries across all of Reddit (optionally narrowed to one subreddit) with time filters.
- It does **not** return **comments** — only the posts themselves, including each post's comment *count*.
- It does **not** access private, banned, or quarantined subreddits, or anything behind a login.
- It does **not** crawl multiple subreddits in one run, and it does **not** paginate through a subreddit's whole history — see [Cost, Performance and Limits](#cost-performance-and-limits).

##### What You Can Do

- **Browse Any Public Subreddit**: Fetch the post feed of any public community by name — no `r/` prefix, no account, no Reddit API credentials
- **Choose Your Sort Order**: Get the feed as **new** (chronological), **hot** (currently active), **top** (highest scoring) or **rising** (gaining traction fast)
- **Get Full Post Text**: Self-posts come back with their body text, not just the headline
- **Read Engagement Signals**: Every post carries its score (net upvotes) and comment count at the moment of scraping
- **Follow Links Out**: Link posts include the external `url` they point to, alongside the Reddit `permalink`
- **Monitor a Community on a Schedule**: Run on an Apify Schedule with `sortType: "new"` and deduplicate on post `id` to build a rolling feed archive
- **Export Anywhere**: Download as JSON, CSV, Excel, HTML or XML, or pull the dataset via the Apify API into your database, spreadsheet or BI tool

##### Data Availability

**All data returned by this Actor is publicly available information.** It reads only posts that Reddit displays publicly in a subreddit's feed — the same content any logged-out visitor can see. It does not access private or restricted communities, deleted content, direct messages, or anything requiring authentication. This Actor simply makes public subreddit content easier to collect programmatically and in a structured shape.

***

#### Actor Input Parameters

The Actor accepts the following input parameters:

**subreddit**
• Type: string
• Required: **Yes**
• Default: none (the input form prefills `technology`)
• Description: The subreddit name **without** the `r/` prefix
e.g., `technology`, `askreddit`, `personalfinance`

**sortType**
• Type: string (select)
• Required: Optional
• Default: `new`
• Allowed values: `new`, `hot`, `top`, `rising`
• Description: The order posts are returned in
e.g., `top`

**limit**
• Type: integer
• Required: Optional
• Default: `25`
• Range: `1`–`100`
• Description: Maximum number of posts to return. The Actor returns **up to** this many posts; it may return fewer
e.g., `50`

**Important Notes:**

- **`subreddit` is required** — a run with no subreddit cannot return posts.
- **Do not include the `r/` prefix** — pass `technology`, not `r/technology`. The `r/` form is not a valid subreddit name and will not resolve.
- **The subreddit must be public** — private, banned, quarantined and non-existent subreddits all return an error row rather than posts, and are not charged.
- **`limit` is a cap, not a target.** The Actor fetches a single feed page and returns at most `limit` posts from it. Asking for `100` does **not** guarantee 100 posts — you may get fewer even from a very large subreddit. There is no pagination or backfill through a subreddit's history.
- **`top` has no time window.** This Actor does not expose a time filter, so `top` returns the feed's top posts as Reddit ranks them by default. If you need "top of the past week", use the [Reddit Keyword Search Scraper](https://apify.com/endspec/reddit-instant-search-scraper), which has a `timeFilter` parameter.
- **One subreddit per run.** To cover several communities, start one run per subreddit.
- **No Reddit API key is needed** — and there is no field to put one in. Authentication is handled entirely by the Actor.

***

#### Input Examples

##### Example 1: Newest Posts from a Subreddit (Most Common)

```json
{
  "subreddit": "technology",
  "sortType": "new",
  "limit": 25
}
```

**When to use:** Day-to-day monitoring. `new` gives you the feed in chronological order, which is what you want when you re-run on a schedule and only care about what appeared since last time.

##### Example 2: Minimal Input — Defaults Applied

```json
{
  "subreddit": "askreddit"
}
```

**Result:** `sortType` defaults to `new` and `limit` defaults to `25`. This is the smallest valid input.

##### Example 3: Top Posts for Research

```json
{
  "subreddit": "personalfinance",
  "sortType": "top",
  "limit": 100
}
```

**When to use:** One-off research where you want the highest-scoring, most-discussed threads rather than the latest ones. Remember `limit: 100` is a ceiling — see Important Notes.

##### Example 4: `r/` Prefix Included (Will Return an Error Row)

```json
{
  "subreddit": "r/technology",
  "sortType": "hot"
}
```

**Result:** No posts. `r/technology` is not a subreddit name — the name is `technology`. The run finishes successfully but the dataset contains a single error row, and **you are not charged**. This is the single most common input mistake.

***

#### Output Structure

The Actor writes results to the Apify dataset, **one row per post**. Export the dataset as **JSON, CSV, Excel, HTML or XML**, or pull it via the Apify API.

There are exactly two row shapes: a **post row** and an **error row**.

##### Post Row Format

```json
{
  "id": "string",
  "title": "string",
  "text": "string",
  "author": "string",
  "subreddit": "string",
  "score": 0,
  "num_comments": 0,
  "created_utc": 0,
  "url": "string",
  "permalink": "string",
  "_query": "string"
}
```

**Field Descriptions:**

**id**
• Type: string
• Description: Reddit's post ID, unique per post. Use this as your deduplication key across scheduled runs

**title**
• Type: string
• Description: The post's title as displayed on Reddit

**text**
• Type: string
• Description: The post's self-text body. **Empty for link posts and image posts**, which have no body — only self-posts carry text here

**author**
• Type: string
• Description: The posting account's username, without the `u/` prefix. May read `[deleted]` for removed accounts, as Reddit itself reports it

**subreddit**
• Type: string
• Description: The subreddit the post belongs to, as reported by Reddit. Normally matches your `subreddit` input

**score**
• Type: number
• Description: The post's net score (upvotes minus downvotes) at the moment of scraping. Reddit fuzzes vote counts, so treat this as an indicator, not an exact ledger

**num\_comments**
• Type: number
• Description: Number of comments on the post at the moment of scraping. The Actor returns this count only — it does not return the comments themselves

**created\_utc**
• Type: number
• Description: Post creation time as a Unix epoch timestamp in seconds. **Present only when Reddit supplies it** — the field is omitted from the row when unavailable

**url**
• Type: string
• Description: The URL the post points to. For link posts this is the external destination; for self-posts it is typically the Reddit thread itself. **Omitted from the row when unavailable**

**permalink**
• Type: string
• Description: Full, clickable `https://reddit.com/...` link to the post's thread. **Omitted from the row when unavailable**

**\_query**
• Type: string
• Description: A JSON string echoing back the query this Actor ran on your behalf — your `subreddit` and the effective `sortType`. Useful for tracing which run produced which rows when you merge datasets. Note that it does **not** include `limit`, which is applied after fetching

##### Error Row Format

When a run cannot return posts, the dataset contains a **single error row** instead:

```json
{
  "status": "error",
  "_query": "string",
  "error": "string"
}
```

**status**
• Type: string
• Description: Always the literal `"error"`. **This field appears on error rows only** — successful post rows do not carry a `status` field, so testing for `status === "error"` is the reliable check

**\_query**
• Type: string
• Description: The same echo of your query as on post rows

**error**
• Type: string
• Description: A plain-language explanation of what happened. Always one of the fixed messages listed under [Output Examples](#output-examples) below — see Example 3, 4 and 5

**No posts, no charge.** Error rows are never billed. See [Cost, Performance and Limits](#cost-performance-and-limits).

***

#### Output Examples

##### Example 1: Link Post with Full Engagement Data

```json
{
  "id": "1kx9r2h",
  "title": "EU regulators open formal probe into cloud storage pricing",
  "text": "",
  "author": "netpolicywatch",
  "subreddit": "technology",
  "score": 3184,
  "num_comments": 412,
  "created_utc": 1752710400,
  "url": "https://example-news-site.com/eu-cloud-probe",
  "permalink": "https://reddit.com/r/technology/comments/1kx9r2h/eu_regulators_open_formal_probe/",
  "_query": "{\"subreddit\":\"technology\",\"sortType\":\"new\"}"
}
```

Note the empty `text`: this is a link post, so the body is empty and `url` carries the external destination.

##### Example 2: Self-Post with Body Text

```json
{
  "id": "1kxa8f3",
  "title": "I paid off $42k of debt in 19 months — here is the exact spreadsheet",
  "text": "Long-time lurker. In Nov 2024 I had $42,180 across three cards at 22-27% APR. I stopped the avalanche/snowball argument and just did the math...",
  "author": "quietsaver_88",
  "subreddit": "personalfinance",
  "score": 8921,
  "num_comments": 1044,
  "created_utc": 1752624000,
  "url": "https://www.reddit.com/r/personalfinance/comments/1kxa8f3/i_paid_off_42k_of_debt_in_19_months/",
  "permalink": "https://reddit.com/r/personalfinance/comments/1kxa8f3/i_paid_off_42k_of_debt_in_19_months/",
  "_query": "{\"subreddit\":\"personalfinance\",\"sortType\":\"top\"}"
}
```

Here `text` carries the post body, and `url` points back at the Reddit thread because there is no external link.

##### Example 3: No Posts Returned (Empty Result)

If the subreddit does not exist, is not public, or the feed comes back with nothing, the run **still finishes successfully** but the dataset holds one error row:

```json
{
  "status": "error",
  "_query": "{\"subreddit\":\"r/technology\",\"sortType\":\"hot\"}",
  "error": "No results were found for this input. You were not charged."
}
```

**There is no "successful run with zero rows" for this Actor** — an empty feed is reported as the error row above. You are not charged for it.

##### Example 4: Data Service Temporarily Unavailable

```json
{
  "status": "error",
  "_query": "{\"subreddit\":\"technology\",\"sortType\":\"new\"}",
  "error": "The data service is temporarily unavailable — please retry shortly. You were not charged."
}
```

The Actor already retries several times internally before emitting this. Seeing it means every attempt failed — retry the run in a few minutes.

##### Example 5: Service Busy (Rate Limited)

```json
{
  "status": "error",
  "_query": "{\"subreddit\":\"askreddit\",\"sortType\":\"hot\"}",
  "error": "The service is busy right now — please retry in a moment. You were not charged."
}
```

Emitted when the Actor is being rate limited. Wait a moment and re-run; if you are firing many runs in parallel, stagger them.

##### The Complete List of Error Messages

The `error` field is always **exactly one** of these four strings — nothing else is ever emitted:

| `error` value | What it means |
|---|---|
| `No results were found for this input. You were not charged.` | The feed came back empty — usually a misspelled, private, banned or non-existent subreddit, or an `r/` prefix left in the name |
| `The data service is temporarily unavailable — please retry shortly. You were not charged.` | Every retry attempt failed to return a usable feed. Transient; retry shortly |
| `The service is busy right now — please retry in a moment. You were not charged.` | Rate limited. Wait and retry |
| `The request could not be completed right now. Please retry shortly. You were not charged.` | A fallback for any other unexpected condition |

You can match on these strings safely, but checking for the presence of `status === "error"` is more robust.

***

#### Use Cases

##### For Community and Brand Managers

**Community Monitoring:** Watch the subreddits where your product, industry or competitors get discussed. Running with `sortType: "new"` on a schedule gives you a rolling feed of everything posted, so nothing gets missed between check-ins.

**Example Workflow:**

1. List the subreddits relevant to your product (e.g. `technology`, plus your niche communities)
2. Create one Apify Schedule per subreddit, running the Actor hourly with `sortType: "new"` and `limit: 25`
3. Deduplicate incoming rows on `id` against what you already stored
4. Alert your team on new rows whose `title` or `text` matches your brand keywords
5. Use `permalink` to jump straight into the thread and respond

##### For Product and UX Researchers

**Voice-of-Customer Mining:** Subreddits are where users complain in their own words. Pull the `top` feed of a community to find the pain points that resonated the most, and read `text` for the full account rather than a headline.

**Example Workflow:**

1. Run with `sortType: "top"` and `limit: 100` on the subreddit your users live in
2. Export the dataset to CSV and sort by `score` and `num_comments`
3. Read the `text` of the highest-engagement threads for recurring complaints
4. Cluster them into themes and size each theme by total score
5. Re-run monthly to see which themes are growing

##### For Content and Marketing Teams

**Content Ideation:** `hot` and `rising` show you what a community is engaging with *right now*. `rising` in particular surfaces posts gaining traction before they peak — useful for topic selection while the interest curve is still going up.

**Example Workflow:**

1. Run with `sortType: "rising"` on 3–5 subreddits in your topic area
2. Review titles with a high `score` relative to how recent `created_utc` is
3. Turn recurring questions into blog posts, videos or docs
4. Track whether the same themes keep rising week over week

##### For Analysts, Researchers and Data Teams

**Dataset Building:** Structured post feeds with score and comment counts make a clean base for trend, sentiment or topic-modelling work — no HTML parsing, no Reddit API quota to manage.

**Example Workflow:**

1. Schedule regular `new` runs across your target subreddits
2. Pull each dataset via the Apify API into your warehouse, keyed on `id`
3. Use `created_utc` to bucket posts into time series
4. Run sentiment or topic models over `title` + `text`
5. Correlate `score` and `num_comments` against your own events

##### For Developers

**Integration:** Wrap the Actor behind your own service to give an app, bot or internal dashboard a subreddit feed, without registering a Reddit app or handling OAuth token refresh.

**Example Workflow:**

1. Call the Actor via the Apify API with the subreddit as a parameter
2. Check each row: if `status === "error"`, surface a retry rather than an empty state
3. Map post rows onto your own model, tolerating absent `created_utc`, `url` and `permalink`
4. Cache on `id` and refresh on an interval that suits the community's pace

***

#### Best Practices

##### Choosing Your Input

- **Drop the `r/`** — `subreddit` takes the bare name. `r/technology` will not resolve; `technology` will
- **Subreddit names are what Reddit uses in the URL** — if the community lives at `reddit.com/r/personalfinance`, the value is `personalfinance`
- **Pick the sort order that matches the job** — `new` for monitoring, `top` for research, `hot` for current activity, `rising` for early trend detection
- **Start with a small `limit`** — run with `limit: 5` first to confirm the subreddit resolves and the shape is what you expect, then scale up

##### Handling Results

- **Test `status`, not row count** — a run that returns nothing gives you one row with `status: "error"`, not zero rows. Branch on `status === "error"` before you touch the data
- **Deduplicate on `id`** — scheduled `new` runs overlap by design; `id` is stable and unique
- **Expect empty `text`** — link and image posts have no body. This is normal, not a failure
- **Expect missing fields** — `created_utc`, `url` and `permalink` are omitted entirely from a row when unavailable. Code defensively rather than assuming they exist
- **Treat `score` and `num_comments` as snapshots** — they are true for the moment of scraping and will drift as the thread ages. Re-scrape if you need current values

##### Scaling and Scheduling

- **One subreddit per run** — for several communities, start several runs; they are independent and can run in parallel
- **Stagger parallel runs** — firing many at once can trip the rate-limit path and cost you a wasted round trip (though never a charge)
- **Match the schedule to the community** — a fast-moving subreddit may warrant hourly `new` runs; a quiet one is fine daily
- **Retry the transient errors** — the "temporarily unavailable" and "busy" messages both mean *try again*, and neither costs you anything

***

#### Cost, Performance and Limits

##### Billing

This Actor uses **pay per result**. You are charged **$0.0020 per post returned** — one charge per post row written to the dataset, under the `post-returned` event.

- **Empty runs cost nothing.** If no posts come back, the Actor emits an error row and charges nothing
- **Failed runs cost nothing.** Rate limits, unavailable-service errors and unresolvable subreddits are never billed
- **You pay only for posts you actually receive.** A run with `limit: 100` that returns 43 posts bills 43 posts
- No monthly subscription, no minimums, no Reddit API costs

##### Performance

The Actor is optimized for **fast, single-subreddit lookups**. A run makes one feed request, so results typically arrive within seconds. If the first attempt does not return a usable feed, the Actor **retries up to four times with a short backoff** before giving up and emitting an error row — a run that ends in an error may therefore take a few seconds longer than a successful one.

##### Limits

Know these before you build on the Actor:

- **One subreddit per run** — there is no multi-subreddit input
- **Maximum 100 posts per run** (`limit` ceiling), with a default of 25
- **A single feed page is fetched — there is no pagination.** `limit` caps how many posts are returned from that page; it does not make the Actor fetch more. You may receive fewer posts than your `limit` even on a huge subreddit, and you **cannot** page back through a subreddit's history
- **Posts only, no comments** — you get `num_comments` as a number, not the comment bodies
- **No time window filter** — `top` returns the feed's default top ranking; there is no "past week"/"past month" control on this Actor
- **Public subreddits only** — private, banned and quarantined communities return an error row
- **Point-in-time data** — `score` and `num_comments` reflect the moment of scraping

***

#### Data Sources and Legality

**All data returned by this Actor is publicly available information** published openly by Reddit users in public subreddits — the same posts any logged-out visitor can read. The Actor does not access private communities, non-public content, or anything behind authentication, and it does not attempt to circumvent access controls.

**Your responsibilities:**

- You are responsible for complying with applicable laws and regulations, including data-protection law such as GDPR, in your jurisdiction
- You are responsible for complying with Reddit's terms of service and content policy
- Usernames are personal data in many jurisdictions — have a lawful basis before storing or processing `author` values, and honor deletion requests
- Post content is authored by Reddit users and may be subject to their rights — respect them when republishing
- Use the data for legitimate purposes; do not use it to harass, profile or spam individuals

This documentation is not legal advice. If your use case is sensitive or large-scale, take your own legal advice.

*Not affiliated with, endorsed by, or sponsored by Reddit.*

***

#### Frequently Asked Questions

**Q: Do I need a Reddit account or an official Reddit API key?**
A: No. There is no credential field in the input and nothing to register. Provide a subreddit name and run the Actor.

**Q: What is the difference between this Actor and the Reddit Keyword Search Scraper?**
A: This Actor browses **one subreddit's feed** — "show me what's in r/technology, sorted by new". The [Reddit Keyword Search Scraper](https://apify.com/endspec/reddit-instant-search-scraper) **searches by keyword across Reddit** — "find posts mentioning electric vehicles" — optionally narrowed to one subreddit, with time-window filters. Use this one to follow a community; use that one to hunt a topic.

**Q: Why did I get fewer posts than my `limit`?**
A: `limit` is a ceiling, not a target. The Actor fetches a single feed page and returns at most `limit` posts from it, so you can receive fewer even from a very active subreddit. There is no pagination to fetch more.

**Q: Can I get more than 100 posts, or scrape a subreddit's full history?**
A: No. 100 is the `limit` maximum, and the Actor fetches one page with no backfill. For an ongoing archive, schedule repeated `new` runs and deduplicate on `id`.

**Q: Will empty or failed runs cost me anything?**
A: No. You are charged only per post actually returned. Error rows — including the "no results" case — are never billed.

**Q: I got "No results were found for this input" but the subreddit definitely exists. Why?**
A: The most common cause is the `r/` prefix — pass `technology`, not `r/technology`. Otherwise check spelling, and confirm the community is public rather than private, banned or quarantined.

**Q: Can I scrape multiple subreddits in one run?**
A: Not in one run — the input takes a single subreddit. Start one run per subreddit; runs are independent and can go in parallel.

**Q: Can I get the comments on these posts?**
A: No. This Actor returns posts and their comment *count* (`num_comments`), not the comment bodies.

**Q: Why is `text` empty on some posts?**
A: Link posts and image posts have no self-text body — only self-posts do. For those, check `url` for the destination the post points to.

**Q: Can I get the top posts of the past week or month?**
A: Not with this Actor — it has no time filter, so `top` returns the feed's default top ranking. The [Reddit Keyword Search Scraper](https://apify.com/endspec/reddit-instant-search-scraper) exposes a `timeFilter` parameter if you need a specific window.

**Q: What is the `_query` field in each row?**
A: It is an echo of the query the Actor ran for you — your subreddit and the effective sort order, as a JSON string. It is handy for tracing rows back to their run when you merge datasets, and you can ignore or drop it otherwise.

**Q: Are `score` and `num_comments` exact?**
A: They are accurate as of the moment of scraping and will change as the thread ages. Reddit also fuzzes vote counts, so treat `score` as a strong indicator rather than an exact tally.

**Q: Can I use this Actor commercially?**
A: Yes. The data is publicly available. You remain responsible for complying with applicable law and Reddit's terms — see Data Sources and Legality above.

**Q: How do I export the results?**
A: From the Apify dataset, download as JSON, CSV, Excel, HTML or XML, or fetch it programmatically via the Apify API.

***

#### Contact & Support

**Questions? Need help? We're here for you.**

For any questions, technical support, feature requests, or general inquiries about the Reddit Subreddit Scraper, please reach out:

**Email:** contact@endspec.net

**Response Time:** We respond within 24 hours during business days.

**What to Include in Your Inquiry:**

- Your question or a description of the issue
- The Apify run ID (if applicable)
- The input you used
- The `error` message or row you received, if any
- What you expected to happen instead

You can also report problems directly through the **Issues** tab on this Actor's Apify page. We're committed to helping you get the most out of the Actor — whether you're integrating it into a workflow, troubleshooting, or exploring a new use case.

***

#### Related Actors

- [Reddit Keyword Search Scraper](https://apify.com/endspec/reddit-instant-search-scraper) – Search all of Reddit by keyword, optionally restricted to one subreddit, with time-window and sort filters.
- [Instagram Instant Media Scraper](https://apify.com/endspec/instagram-instant-media-scraper) – Extract public posts and media data from Instagram profiles.
- [LinkedIn Instant Profile Search](https://apify.com/endspec/linkedin-instant-profile-search) – Find LinkedIn profiles by name, job title or company.
- [YouTube Instant Email Scraper](https://apify.com/endspec/youtube-instant-email-scraper) – Find publicly listed contact emails for YouTube channels.

***

*Last Updated: July 2026*

# Actor input Schema

## `subreddit` (type: `string`):

Subreddit name (without r/)

## `sortType` (type: `string`):

Order posts are returned in: new, hot, top or rising.

## `limit` (type: `integer`):

Maximum number of posts to return (1-100). Fewer may be returned if the subreddit has less.

## Actor input object example

```json
{
  "subreddit": "technology",
  "sortType": "new",
  "limit": 25
}
```

# Actor output Schema

## `dataset` (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 = {
    "subreddit": "technology"
};

// Run the Actor and wait for it to finish
const run = await client.actor("endspec/reddit-instant-subreddit-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 = { "subreddit": "technology" }

# Run the Actor and wait for it to finish
run = client.actor("endspec/reddit-instant-subreddit-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "subreddit": "technology"
}' |
apify call endspec/reddit-instant-subreddit-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=endspec/reddit-instant-subreddit-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Reddit Subreddit Scraper – Export Posts from Any Subreddit",
        "description": "Scrape the newest, hot, top or rising posts from any public subreddit. Export post title, body text, author, score, comment count, timestamp, permalink and URL to JSON, CSV or Excel. No login, no Reddit API key. Pay only per post returned.",
        "version": "0.1",
        "x-build-id": "1eBzLSJKhdlG38LY3"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/endspec~reddit-instant-subreddit-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-endspec-reddit-instant-subreddit-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/endspec~reddit-instant-subreddit-scraper/runs": {
            "post": {
                "operationId": "runs-sync-endspec-reddit-instant-subreddit-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/endspec~reddit-instant-subreddit-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-endspec-reddit-instant-subreddit-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "subreddit"
                ],
                "properties": {
                    "subreddit": {
                        "title": "Subreddit",
                        "type": "string",
                        "description": "Subreddit name (without r/)"
                    },
                    "sortType": {
                        "title": "Sort",
                        "enum": [
                            "new",
                            "hot",
                            "top",
                            "rising"
                        ],
                        "type": "string",
                        "description": "Order posts are returned in: new, hot, top or rising.",
                        "default": "new"
                    },
                    "limit": {
                        "title": "Max Posts",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum number of posts to return (1-100). Fewer may be returned if the subreddit has less.",
                        "default": 25
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
