# Reddit Keyword Search Scraper – Find Posts Across Reddit (`endspec/reddit-instant-search-scraper`) Actor

Search all of Reddit by keyword (optionally restricted to one subreddit) and export every matching post: title, body, author, score, comment count, permalink and URL. Filter by time window and sort order. No login, no Reddit API key. Pay only per result returned.

- **URL**: https://apify.com/endspec/reddit-instant-search-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 $5.50 / 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 Keyword Search Scraper – Find Posts Across Reddit

**Search all of [Reddit](https://www.reddit.com) by keyword and export every matching post — no login, no Reddit API key.**

---

**Simple Input-Output Example**

Input (only `search` is required):
```json
{
  "search": "electric vehicles"
}
````

Output (one dataset row per matching post):

```json
{
  "id": "1c8x2fq",
  "title": "Why did EV prices drop so much this year?",
  "text": "Been watching the used market since January and the swings are wild...",
  "author": "range_anxiety_99",
  "subreddit": "electricvehicles",
  "score": 1842,
  "num_comments": 431,
  "created_utc": 1745012933,
  "url": "https://www.reddit.com/r/electricvehicles/comments/1c8x2fq/why_did_ev_prices_drop_so_much_this_year/",
  "permalink": "https://reddit.com/r/electricvehicles/comments/1c8x2fq/why_did_ev_prices_drop_so_much_this_year/",
  "_query": "{\"search\":\"electric vehicles\",\"filter\":\"posts\",\"timeFilter\":\"year\",\"sortType\":\"relevance\"}"
}
```

**Important Notes:**

- You get results **instantly** — one search request per run, no crawling, no browser
- Pay per result — **$0.0058 per post returned**, and **nothing** for empty or failed runs
- Searches **posts only** (titles and self-text) — not comments, users or subreddit listings
- Optionally restrict the search to **one subreddit**, or leave it empty to search all of Reddit
- All data comes from **public sources** only — no login, no Reddit account, no official API key
- Zero matches returns an **error row**, not an empty dataset (see [Output Examples](#output-examples))
- Contact: contact@endspec.net

***

### Full Actor Documentation

#### Reddit Keyword Search Scraper

**Find every Reddit post that mentions your keyword.** Search across all of Reddit — or inside a single subreddit — and export title, body text, author, subreddit, score, comment count, timestamp, permalink and URL.

***

#### Overview

The Reddit Keyword Search Scraper is an Apify Actor that runs a full-text keyword search over public posts on [Reddit](https://www.reddit.com) and returns the matching posts as structured data. Whether you are monitoring brand mentions, researching a market, mining product feedback, or building a dataset for analysis, this Actor turns a keyword into a clean, exportable list of Reddit posts in seconds.

You give it a search query. It returns the posts that match, filtered by time window and ordered by the sort you choose. No Reddit account, no OAuth, no rate-limit juggling.

##### What You Can Do

- **Search all of Reddit by keyword**: Full-text search across public Reddit posts — titles and self-text
- **Restrict to a single subreddit**: Narrow the same keyword search to one community (e.g. only `wallstreetbets`)
- **Filter by time window**: Last hour, day, week, month, year, or all time
- **Choose the sort order**: Relevance, hot, new, top, or comments
- **Get full post context**: Title, body text, author, subreddit, score, comment count, creation timestamp, permalink and URL
- **Cap your spend per run**: Set the maximum number of posts to return (1–100)
- **Export anywhere**: Download as JSON, CSV, Excel, HTML or XML, or pull the dataset via the Apify API

##### What This Actor Does Not Do

Stated plainly so you can pick the right tool:

- **It does not search comments.** Results are posts only. A keyword that appears only in a comment thread will not match.
- **It does not paginate.** One run issues one search request and returns up to your `limit` from that single result set. It is not a bulk historical archive crawler.
- **It does not browse a subreddit's feed.** If you want "the newest 100 posts in r/technology" with no keyword at all, use the [Reddit Subreddit Scraper](https://apify.com/endspec/reddit-instant-subreddit-scraper) instead — see [Related Actors](#related-actors).
- **It does not access private, quarantined or deleted content.** Public posts only.

##### Data Availability

**All data returned by this Actor is publicly available information.** It returns only posts that their authors published publicly on Reddit and that are visible to any logged-out visitor. The Actor makes that public information easier to collect and analyze programmatically. It does not access private subreddits, direct messages, deleted posts, or any content behind a login.

***

#### Actor Input Parameters

The Actor accepts the following input parameters:

**search**
• Type: string
• Required: **Yes**
• Description: The keywords to search Reddit posts for. Free-text query.
e.g., `"electric vehicles"`, `"noise cancelling headphones"`, `"my saas launch"`

**subreddit**
• Type: string
• Required: Optional
• Default: `""` (empty — searches all of Reddit)
• Description: Limit the search to a single subreddit. Use the plain name **without** the `r/` prefix.
e.g., `"electricvehicles"`, `"technology"`

**timeFilter**
• Type: string (select)
• Required: Optional
• Default: `"year"`
• Allowed values: `hour`, `day`, `week`, `month`, `year`, `all`
• Description: Only return posts created within this time window.

**sortType**
• Type: string (select)
• Required: Optional
• Default: `"relevance"`
• Allowed values: `relevance`, `hot`, `new`, `top`, `comments`
• Description: The order search results are returned in.

**limit**
• Type: integer
• Required: Optional
• Default: `25`
• Minimum: `1` • Maximum: `100`
• Description: Maximum number of posts to return. Fewer may be returned if the query matches less.

**Important Notes:**

- **`search` is the only required field** — everything else has a working default. `{"search": "your keyword"}` is a complete, valid input.
- **Do not include the `r/` prefix** in `subreddit`. Use `"technology"`, not `"r/technology"`. The prefix is passed through verbatim and will simply match nothing.
- **Leave `subreddit` empty to search all of Reddit.** An empty string is treated as "no restriction", not as a subreddit named "".
- **`limit` is a cap, not a quota.** It is the maximum returned, not a guarantee. A narrow query, a short `timeFilter`, or a small subreddit will return fewer — and you are only charged for what you actually receive.
- **Results are posts, always.** The post/comment distinction is fixed by the Actor; there is no input that switches it to comments.
- **A tighter `timeFilter` is a different search, not a filter applied afterwards.** `hour` on a low-volume keyword frequently matches nothing at all. If you get no results, widen it before assuming the query is wrong.

***

#### Input Examples

##### Example 1: Simple Keyword Search Across All of Reddit

```json
{
  "search": "electric vehicles"
}
```

**When to use:** The everyday case. Searches all of Reddit, last year, by relevance, returns up to 25 posts. Best starting point for any new query.

##### Example 2: Brand Monitoring — Recent Mentions Only

```json
{
  "search": "acme analytics",
  "timeFilter": "week",
  "sortType": "new",
  "limit": 100
}
```

**When to use:** Scheduled monitoring. `sortType: "new"` plus a short `timeFilter` surfaces fresh mentions in posting order, which is what you want when you run this daily or weekly and deduplicate on `id`.

##### Example 3: Keyword Search Inside a Single Subreddit

```json
{
  "search": "index funds",
  "subreddit": "personalfinance",
  "timeFilter": "all",
  "sortType": "top",
  "limit": 50
}
```

**When to use:** Research inside one community. `timeFilter: "all"` with `sortType: "top"` returns that subreddit's highest-scoring discussions of the topic across its whole history — a good way to find canonical threads.

##### Example 4: A Common Mistake — the `r/` Prefix

```json
{
  "search": "index funds",
  "subreddit": "r/personalfinance"
}
```

**Result:** No results. The `r/` prefix is not stripped for you — the search is restricted to a community literally named `r/personalfinance`, which does not exist. The run emits the "no results" error row shown in [Output Example 4](#example-4-no-results-found), and you are not charged. Use `"personalfinance"`.

***

#### Output Structure

The Actor pushes **one dataset row per post returned**. There is no wrapper object and no run-level summary row — the dataset *is* the result list.

##### Successful Output 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: The Reddit post ID (base-36, e.g. `1c8x2fq`). Stable — use it to deduplicate across repeated or scheduled runs.

**title**
• Type: string
• Description: The post title.

**text**
• Type: string
• Description: The post's self-text body. Empty (`""`) for link posts, image posts and other non-text submissions.

**author**
• Type: string
• Description: The Reddit username of the poster, without the `u/` prefix.

**subreddit**
• Type: string
• Description: The subreddit the post lives in, without the `r/` prefix. Useful when searching all of Reddit — it tells you which community each hit came from.

**score**
• Type: number
• Description: The post's score (upvotes minus downvotes) at the moment of the run. This is a live value and changes over time.

**num\_comments**
• Type: number
• Description: The comment count at the moment of the run. Also a live value.

**created\_utc**
• Type: number
• Description: The post's creation time as a UTC Unix timestamp, as published in the source data.

**url**
• Type: string
• Description: The post's content URL — the outbound link for link posts, or the Reddit thread URL for self-posts.

**permalink**
• Type: string
• Description: The full `https://reddit.com/...` link to the post's thread.

**\_query**
• Type: string
• Description: A JSON string echoing back the search parameters the run actually used, including the applied defaults. Present on **every** row, success or error. Handy when you merge datasets from several runs and need to know which query produced which row.

**Note on absent fields:** fields the source data did not carry are **omitted from the row entirely** rather than set to `null`. Do not assume every key is present on every row — see [Output Example 2](#example-2-link-post-with-no-body-text-partial-data). `id`, `title` and `_query` are the ones you can rely on in practice.

**Note on `status`:** successful post rows have **no `status` field**. Only error rows carry `status: "error"`. Testing for `row.status === "error"` is the correct check; testing for `status === "success"` will match nothing.

You can download the dataset as **JSON, CSV, Excel, HTML or XML** from the Apify console, or fetch it through the Apify API.

***

#### Output Examples

##### Example 1: Rich Result — Text Post with Full Data

```json
{
  "id": "1c8x2fq",
  "title": "Why did EV prices drop so much this year?",
  "text": "Been watching the used market since January and the swings are wild. Three dealers near me have cut sticker twice...",
  "author": "range_anxiety_99",
  "subreddit": "electricvehicles",
  "score": 1842,
  "num_comments": 431,
  "created_utc": 1745012933,
  "url": "https://www.reddit.com/r/electricvehicles/comments/1c8x2fq/why_did_ev_prices_drop_so_much_this_year/",
  "permalink": "https://reddit.com/r/electricvehicles/comments/1c8x2fq/why_did_ev_prices_drop_so_much_this_year/",
  "_query": "{\"search\":\"electric vehicles\",\"filter\":\"posts\",\"timeFilter\":\"year\",\"sortType\":\"relevance\"}"
}
```

A self-post: every field populated, `text` carries the body, `score` and `num_comments` reflect the moment of the run.

##### Example 2: Link Post with No Body Text (Partial Data)

```json
{
  "id": "1d0kq7m",
  "title": "EV sales grew 21% year over year, new registration data shows",
  "text": "",
  "author": "chartsandcharts",
  "subreddit": "electricvehicles",
  "score": 96,
  "num_comments": 8,
  "created_utc": 1747399201,
  "url": "https://example-news-site.com/ev-registrations-q2",
  "permalink": "https://reddit.com/r/electricvehicles/comments/1d0kq7m/ev_sales_grew_21_year_over_year_new_registration/",
  "_query": "{\"search\":\"electric vehicles\",\"filter\":\"posts\",\"timeFilter\":\"year\",\"sortType\":\"relevance\"}"
}
```

Link posts carry no self-text, so `text` is an empty string and `url` points off-site. This is a normal, fully successful result — not an error.

##### Example 3: Sparse Result — Fields Omitted

```json
{
  "id": "1d33p8a",
  "title": "Charging network coverage map, updated",
  "text": "",
  "author": "gridmapper",
  "subreddit": "electricvehicles",
  "score": 14,
  "num_comments": 2,
  "_query": "{\"search\":\"electric vehicles\",\"filter\":\"posts\",\"timeFilter\":\"year\",\"sortType\":\"relevance\"}"
}
```

Here the source data carried no `created_utc`, `url` or `permalink`, so those keys are **absent from the row** rather than `null`. Write your integration to tolerate missing keys.

##### Example 4: No Results Found

When a search matches nothing, the run succeeds but pushes a single error row — **the dataset is not empty**:

```json
{
  "status": "error",
  "_query": "{\"search\":\"asdkjhqwe zzz\",\"filter\":\"posts\",\"timeFilter\":\"hour\",\"sortType\":\"relevance\"}",
  "error": "No results were found for this input. You were not charged."
}
```

**You are not charged.** The most common causes are a `timeFilter` that is too narrow, an `r/` prefix in `subreddit`, or a genuinely unmatched keyword.

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

```json
{
  "status": "error",
  "_query": "{\"search\":\"electric vehicles\",\"filter\":\"posts\",\"timeFilter\":\"year\",\"sortType\":\"relevance\"}",
  "error": "The service is busy right now — please retry in a moment. You were not charged."
}
```

Transient. Retry the run in a moment. **You are not charged.**

##### Example 6: Service Temporarily Unavailable

```json
{
  "status": "error",
  "_query": "{\"search\":\"electric vehicles\",\"filter\":\"posts\",\"timeFilter\":\"year\",\"sortType\":\"relevance\"}",
  "error": "The data service is temporarily unavailable — please retry shortly. You were not charged."
}
```

The Actor already retried internally several times before emitting this. Retry the run shortly. **You are not charged.**

##### Example 7: Generic Failure

```json
{
  "status": "error",
  "_query": "{\"search\":\"electric vehicles\",\"filter\":\"posts\",\"timeFilter\":\"year\",\"sortType\":\"relevance\"}",
  "error": "The request could not be completed right now. Please retry shortly. You were not charged."
}
```

The catch-all for anything unexpected. **You are not charged.** If it repeats for the same input, send us the run ID — see [Support](#contact--support).

**The four messages above are the complete set of error strings this Actor emits.** They are fixed and self-authored; nothing from any internal service is ever passed through to you. Every error path pushes exactly one row, and every error path charges you nothing.

***

#### Use Cases

##### For Marketers and Brand Teams

**Brand and keyword monitoring:** Reddit is where unfiltered opinion about your product actually lives, and most of it never reaches your support inbox. Search your brand, product names and competitor names on a schedule and get the mentions as rows.

**Example Workflow:**

1. Run with `search: "<your brand>"`, `timeFilter: "week"`, `sortType: "new"`, `limit: 100`
2. Schedule the run daily in the Apify console
3. Deduplicate incoming rows on `id` against what you already stored
4. Sort new rows by `score` and `num_comments` to triage what is actually gaining traction
5. Open the `permalink` for anything that needs a response

##### For Product and Research Teams

**Voice-of-customer mining:** Pull long-tail complaints and feature requests in users' own words — the `text` field is the raw material for thematic coding.

**Example Workflow:**

1. Run several searches for the problem language your users use ("<product> keeps crashing", "alternative to <product>")
2. Use `timeFilter: "all"` with `sortType: "top"` to find the canonical threads first
3. Then re-run with `timeFilter: "month"` and `sortType: "new"` for what is current
4. Export the dataset to CSV and tag `title` + `text` by theme
5. Weight themes by `score` and `num_comments` to separate loud from widespread

##### For Analysts and Researchers

**Topic and sentiment datasets:** Build a labeled corpus of public discussion on a topic, with engagement metrics already attached.

**Example Workflow:**

1. Define your keyword set and, if the topic has a home community, its `subreddit`
2. Run each keyword with `timeFilter: "all"`, `sortType: "top"`, `limit: 100`
3. Export as JSON and load into pandas or your notebook of choice
4. Use `created_utc` for time-series bucketing and `score` / `num_comments` as engagement weights
5. Keep `_query` alongside each row so the provenance of every data point stays traceable

##### For Sales and Lead Generation

**Intent mining:** Find people publicly asking for what you sell — "looking for a tool that...", "any recommendations for...".

**Example Workflow:**

1. Search intent phrases in your category, `timeFilter: "week"`, `sortType: "new"`
2. Optionally restrict to the subreddit where your buyers gather
3. Filter rows by `num_comments` — unanswered threads are the warmest
4. Engage on the thread through the `permalink`, honestly and within the subreddit's rules

##### For Developers

**Integration:** Wire Reddit keyword search into your own product, alerting stack or CRM without touching Reddit's API, OAuth or rate limits.

**Example Workflow:**

1. Call the Actor through the Apify API with your query as input
2. Poll the run, then fetch the dataset items
3. Check `row.status === "error"` first and branch on it
4. Upsert the rest into your store keyed on `id`
5. Schedule it and treat each new `id` as an event

***

#### Best Practices

##### Getting Good Results

- **Start broad, then narrow.** Run the keyword alone first. If you get too much noise, add `subreddit`; if you get too little, widen `timeFilter`.
- **Match `sortType` to the job.** `relevance` for discovery, `new` for monitoring, `top` for finding the canonical threads, `comments` for the most-discussed.
- **`timeFilter: "hour"` is aggressive.** On anything but a high-volume keyword it will often match nothing. Use `day` or `week` for monitoring.
- **Never prefix `subreddit` with `r/`.** It is the single most common cause of an empty result.
- **Remember it searches posts, not comments.** If your keyword tends to appear in replies rather than titles and bodies, search the broader topic term instead.

##### Error Handling

- **Check `status` first** — `row.status === "error"` identifies an error row. Success rows have no `status` field at all.
- **Tolerate missing keys** — `created_utc`, `url` and `permalink` can be absent from a row.
- **Retry the transient ones** — the busy and temporarily-unavailable messages are worth a retry; the "no results" message is not, since the input is what needs to change.
- **Log run IDs** — include the Apify run ID when contacting support.

##### Cost Control

- **Set `limit` deliberately.** It is your per-run spend cap; there is no reason to leave it at 100 while you are still tuning a query.
- **Test with a small `limit` first.** Run at `limit: 5` to check that the query returns what you expect, then raise it.
- **Empty and failed runs are free.** Iterating on a query that returns nothing costs nothing.
- **Deduplicate on `id`.** Scheduled runs over overlapping time windows will return posts you already have — and yes, you pay for them again, so keep windows tight.

##### Data Usage

- **Scores and comment counts are snapshots** taken at run time. Re-run if you need current engagement numbers.
- **Respect Reddit's rules and each subreddit's rules** if you act on what you find.
- **Handle personal data lawfully** — usernames are personal data under GDPR and similar regimes.

***

#### Cost, Performance, and Limits

##### Pricing

This Actor uses **pay per result**. You are charged **$0.0058 per post returned** — the `post-returned` event fires once for each post pushed to the dataset.

**You are charged nothing for:**

- Runs that find no matching posts
- Runs that hit a rate limit or a temporary service failure
- Any error row of any kind

No monthly subscription, no minimums, no charge for a run that gives you nothing.

##### Performance

- **Instant by design.** A run issues a single search request and returns — typically seconds, not minutes. No browser, no crawl.
- **Automatic retries.** Transient failures are retried internally, with backoff, before the run reports a failure to you. That work is invisible and costs you nothing extra.
- **Default resources are sufficient.** The Actor is not CPU- or memory-bound; leave the defaults.

##### Limits

- **1–100 posts per run** — set by `limit`, default 25.
- **One search request per run.** The Actor does not paginate: a run returns at most what a single search response contains, capped by your `limit`. It is not a bulk historical archive tool.
- **Posts only** — not comments, not users, not subreddit listings.
- **One query per run.** To search several keywords, run the Actor several times (schedule them, or drive it via the Apify API).
- **Public content only** — no private subreddits, no deleted posts, nothing behind a login.
- **Live values** — `score` and `num_comments` are snapshots at run time, not stable identifiers.

***

#### Data Sources and Legality

**This Actor accesses only publicly available information on Reddit** — posts that their authors chose to publish publicly and that any logged-out visitor can read. It does not access private subreddits, direct messages, deleted content, or anything requiring authentication. It does not attempt to circumvent access controls.

**Your responsibilities:**

- You are responsible for complying with applicable laws — including GDPR, CCPA and other data-protection regimes — when you collect, store or process the results.
- Usernames and post content may constitute personal data. Have a lawful basis before you process them, and honor deletion requests.
- Respect Reddit's terms of service and each subreddit's rules, particularly if you engage with the threads you find.
- Reddit content is authored by its posters and remains theirs. Republishing it may require attribution or permission.

This Actor is **not affiliated with, endorsed by, or sponsored by Reddit**. Nothing here is legal advice; if your use case is sensitive, get advice that is.

***

#### Contact & Support

**Questions? Need Help? We're Here for You!**

For any questions, technical support, feature requests, or general inquiries about the Reddit Keyword Search 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 issue description
- Actor run ID (if applicable)
- The exact input JSON you used
- The `error` message or row you received, if any
- What you expected instead

We are committed to providing excellent support and helping you get the most out of this Actor — whether you are integrating it into a workflow, troubleshooting a query that returns nothing, or exploring a new use case.

***

#### Frequently Asked Questions

**Q: Do I need a Reddit account or an official Reddit API key?**
A: No. There is nothing to authenticate, register or configure. Provide a `search` keyword and run the Actor.

**Q: Will empty or failed runs cost me anything?**
A: No. You are charged only per post actually returned. A search that matches nothing, or a run that hits a transient failure, costs you nothing.

**Q: My search returned an error row saying "No results were found for this input" — is the Actor broken?**
A: Almost certainly not. That message means the search ran fine and matched zero posts. Check three things, in order: an `r/` prefix in `subreddit` (remove it), a `timeFilter` that is too narrow (widen it), and the keyword itself (broaden it).

**Q: Why is the dataset not simply empty when there are no results?**
A: By design — the run tells you *why* you got nothing rather than leaving you with a silent empty dataset. Zero matches pushes one row with `status: "error"` and the "no results" message. You are not charged for it.

**Q: Does it search Reddit comments?**
A: No. Results are posts only — the keyword is matched against titles and self-text. A keyword appearing only inside a comment thread will not match.

**Q: Can I get more than 100 posts in one run?**
A: No — `limit` caps at 100, and a run issues a single search request. For broader coverage, split the work: run several narrower queries (by subreddit, by time window, by keyword variant) and combine the datasets, deduplicating on `id`.

**Q: Why did I get fewer posts than my `limit`?**
A: `limit` is a maximum, not a target. Your query simply matched fewer posts. You are charged only for what you received.

**Q: How do I restrict the search to one subreddit?**
A: Set `subreddit` to the plain community name with no `r/` prefix — `"technology"`, not `"r/technology"`. Leave it empty to search all of Reddit.

**Q: How is this different from the Reddit Subreddit Scraper?**
A: This Actor is **keyword-driven**: you give it a search query and it finds matching posts anywhere on Reddit (or inside one subreddit you name). The [Reddit Subreddit Scraper](https://apify.com/endspec/reddit-instant-subreddit-scraper) is **feed-driven**: you give it a subreddit and it exports that community's new/hot/top/rising posts with no keyword at all. Use this one to find mentions of a topic; use that one to follow a community.

**Q: How fresh is the data?**
A: It is fetched live at run time. `score` and `num_comments` are snapshots from the moment of the run and will drift afterwards.

**Q: Can I get historical posts?**
A: Set `timeFilter: "all"` to search Reddit's full history. Note that a single run still returns at most `limit` posts from one search — combine `sortType: "top"` with `timeFilter: "all"` to get the most significant historical threads rather than an exhaustive archive.

**Q: Why do some rows lack `created_utc`, `url` or `permalink`?**
A: Those fields are omitted when the source data does not carry them. Absent keys are normal; write your integration to tolerate them.

**Q: What is the `_query` field for?**
A: It echoes back the search parameters the run actually used, defaults included. It is on every row, including error rows, so that merged datasets stay traceable to the query that produced them.

**Q: Can I run this Actor commercially?**
A: Yes. All data returned is publicly available. You remain responsible for complying with applicable law and with Reddit's terms.

**Q: Can I schedule it?**
A: Yes. Use Apify's scheduler for recurring monitoring. Pair a short `timeFilter` with `sortType: "new"` and deduplicate on `id`.

***

#### Related Actors

- [Reddit Subreddit Scraper](https://apify.com/endspec/reddit-instant-subreddit-scraper) – Export the new, hot, top or rising posts from any public subreddit, no keyword needed.
- [YouTube Instant Email Scraper](https://apify.com/endspec/youtube-instant-email-scraper) – Find publicly listed contact emails for YouTube channels.
- [LinkedIn Instant Profile Search](https://apify.com/endspec/linkedin-instant-profile-search) – Search LinkedIn profiles by name, job title or company.

***

*Last Updated: July 2026*

# Actor input Schema

## `search` (type: `string`):

Keywords to search Reddit posts for.

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

Limit the search to a single subreddit (name without r/). Leave empty to search all of Reddit.

## `timeFilter` (type: `string`):

Only return posts created within this time window.

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

Order search results are returned in: relevance, hot, new, top or comments.

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

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

## Actor input object example

```json
{
  "search": "investing",
  "timeFilter": "year",
  "sortType": "relevance",
  "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 = {
    "search": "investing",
    "subreddit": ""
};

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

# Run the Actor and wait for it to finish
run = client.actor("endspec/reddit-instant-search-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 '{
  "search": "investing",
  "subreddit": ""
}' |
apify call endspec/reddit-instant-search-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Reddit Keyword Search Scraper – Find Posts Across Reddit",
        "description": "Search all of Reddit by keyword (optionally restricted to one subreddit) and export every matching post: title, body, author, score, comment count, permalink and URL. Filter by time window and sort order. No login, no Reddit API key. Pay only per result returned.",
        "version": "0.1",
        "x-build-id": "THkqxVEcaAGENuQcQ"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/endspec~reddit-instant-search-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-endspec-reddit-instant-search-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-search-scraper/runs": {
            "post": {
                "operationId": "runs-sync-endspec-reddit-instant-search-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-search-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-endspec-reddit-instant-search-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": [
                    "search"
                ],
                "properties": {
                    "search": {
                        "title": "Search Query",
                        "type": "string",
                        "description": "Keywords to search Reddit posts for."
                    },
                    "subreddit": {
                        "title": "Restrict to Subreddit (optional)",
                        "type": "string",
                        "description": "Limit the search to a single subreddit (name without r/). Leave empty to search all of Reddit."
                    },
                    "timeFilter": {
                        "title": "Time Filter",
                        "enum": [
                            "hour",
                            "day",
                            "week",
                            "month",
                            "year",
                            "all"
                        ],
                        "type": "string",
                        "description": "Only return posts created within this time window.",
                        "default": "year"
                    },
                    "sortType": {
                        "title": "Sort",
                        "enum": [
                            "relevance",
                            "hot",
                            "new",
                            "top",
                            "comments"
                        ],
                        "type": "string",
                        "description": "Order search results are returned in: relevance, hot, new, top or comments.",
                        "default": "relevance"
                    },
                    "limit": {
                        "title": "Max Results",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum number of posts to return (1-100). Fewer may be returned if the query matches 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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
