# Reddit Keyword Search & Mentions Scraper (`scrapers_lat/reddit-search-scraper`) Actor

Search all of Reddit by keyword and extract every matching post. Get title, full selftext, author, subreddit, score, upvote ratio, comment count, flair and permalink. Track brand, product and topic mentions. Export to JSON, CSV or Excel.

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

## Pricing

from $6.15 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

[![Reddit Keyword Search & Mentions Scraper](https://scrapers.lat/banners/reddit-search-scraper.png)](https://console.apify.com/actors/IX61DCDFiwfIkb0Ym/input)

## Reddit Keyword Search & Mentions Scraper

Here is one real result, with every field the actor returns:

```json
{
  "thumbnail": "https://external-preview.redd.it/OrZ7103Cd5oE63jTDiFluE-UdCrLwHjpMiCgWK7YrIM.jpeg?width=140&height=73&auto=webp&s=852e4c2c91fca7ad7ab8179627a9c42eea2db8c5",
  "title": "Pope Leo \"Artificial intelligences do not undergo experiences, do not possess a body, do not feel joy or pain, do not mature through relationships, and do not know from within what love, work, friendship or responsibility mean. Nor do they have a moral conscience, since they do not judge goodand..\"",
  "url": "https://www.ncronline.org/vatican/vatican-news/pope-leo-calls-disarm-ai-major-document-warns-technologic-threats-humanity",
  "id": "1tr0bv8",
  "selftext": null,
  "subreddit": "technology",
  "author": "Caledor152",
  "authorFullname": "t2_notffc4i",
  "score": 34095,
  "upvoteRatio": 0.96,
  "numComments": 1836,
  "numCrossposts": 12,
  "totalAwards": 0,
  "linkFlairText": null,
  "permalink": "https://www.reddit.com/r/technology/comments/1tr0bv8/pope_leo_artificial_intelligences_do_not_undergo/",
  "domain": "ncronline.org",
  "isSelf": false,
  "isVideo": false,
  "isNsfw": false,
  "isSpoiler": false,
  "isOriginalContent": false,
  "isPinned": false,
  "isLocked": false,
  "isArchived": false,
  "edited": "2026-05-29T19:12:07+00:00",
  "galleryImageUrls": null,
  "createdAt": "2026-05-29T12:28:08.000Z",
  "matchedQuery": "artificial intelligence",
  "observedAt": "2026-08-10T14:25:01.287Z",
  "error": null
}
```

The most complete Reddit search scraper available. It searches all of Reddit (or a set of subreddits) for any keyword and returns every field Reddit exposes for each matching post, from full self text, upvote ratio and award counts to gallery images, flair and NSFW, spoiler, locked and pinned flags, plus a `matchedQuery` field so you can track which term surfaced each mention.

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

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

### Table of contents

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

### What it does

The actor runs each of your search queries against Reddit, optionally restricted to a set of subreddits, applies the sort and time window you pass, and writes one normalized record per matching post to the run's dataset. Use it to track brand, product, competitor and topic mentions across Reddit. When Fetch Full Post Text is enabled it opens each matched post to capture its full `selftext`, upvote ratio and gallery images. Timestamps are normalized to ISO 8601, missing source values are returned as `null`, and each record carries the `matchedQuery` that surfaced it so you can attribute mentions when searching several terms at once.

### Quickstart

Open the actor, paste this into the input, and press Run. It returns the 10 most relevant posts across Reddit mentioning "artificial intelligence".

```json
{
  "maxPosts": 10,
  "searchQueries": ["artificial intelligence"],
  "sort": "relevance",
  "timeFilter": "all",
  "withDetails": true
}
```

Add more terms to `searchQueries` to track several brands or topics in one run. Set `subreddits` to restrict the search to specific communities. Set `withDetails` to `false` for a faster, listing-only run.

### Input reference

Every field is optional. With an empty input the actor searches the default query across all of Reddit.

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `maxPosts` | integer | no | `10` | Maximum number of posts to collect across all queries. |
| `searchQueries` | string\[] | no | `["artificial intelligence"]` | Keywords or phrases to search across Reddit. Each query is searched separately, for example a brand name, a product, a competitor. |
| `searchQuery` | string | no | (empty) | A single search term, as an alternative to `searchQueries`. |
| `subreddits` | string\[] | no | (all) | Limit the search to these subreddits (names without the `r/` prefix). Empty searches all of Reddit. |
| `sort` | enum | no | `relevance` | Result ordering: `relevance`, `hot`, `top`, `new`, `comments`. |
| `timeFilter` | enum | no | `all` | Time window for results: `hour`, `day`, `week`, `month`, `year`, `all`. |
| `withDetails` | boolean | no | `true` | When enabled, opens each matched post to capture full self text, upvote ratio and gallery images. Disable for a faster, listing-only run. |

### Output reference

One dataset item per matching post. Types: `string`, `integer`, `number`, `boolean`, `string[]`, or `null` when the source value is absent.

| Field | Type | Description |
|---|---|---|
| `id` | string | Reddit post id. |
| `title` | string | Post title. |
| `selftext` | string | Full body text of a self (text) post, or `null`. Populated when `withDetails` is on. |
| `url` | string | Outbound or content URL of the post, or `null` for self posts without a link. |
| `subreddit` | string | Subreddit the post is in (without prefix). |
| `author` | string | Username of the post author. |
| `authorFullname` | string | Reddit author id (`t2_...`). |
| `score` | integer | Net vote score. |
| `upvoteRatio` | number | Fraction of votes that are upvotes. Populated when `withDetails` is on. |
| `numComments` | integer | Comment count on the post. |
| `numCrossposts` | integer | Number of crossposts. |
| `totalAwards` | integer | Total awards received. |
| `linkFlairText` | string | Link flair text, or `null`. |
| `permalink` | string | Full reddit.com permalink of the post. |
| `domain` | string | Domain of the linked content, for example `self.AskReddit` for self posts. |
| `thumbnail` | string | Thumbnail image URL, or `null`. |
| `isSelf` | boolean | `true` for text (self) posts. |
| `isVideo` | boolean | `true` for native video posts. |
| `isNsfw` | boolean | `true` when the post is flagged NSFW. |
| `isSpoiler` | boolean | `true` when marked spoiler. |
| `isOriginalContent` | boolean | `true` when marked OC. |
| `isPinned` | boolean | `true` when pinned in its subreddit. |
| `isLocked` | boolean | `true` when the post is locked. |
| `isArchived` | boolean | `true` when the post is archived. |
| `edited` | string | ISO 8601 edit timestamp, or `false`/`null` when never edited. |
| `galleryImageUrls` | string\[] | Image URLs for gallery posts, or `null`. Populated when `withDetails` is on. |
| `matchedQuery` | string | The search term that surfaced this post. |
| `createdAt` | string | ISO 8601 creation timestamp. |
| `observedAt` | string | ISO 8601 timestamp of when the record was collected. |
| `error` | string | `null` on success. On a failed query, a single item with a populated `error` field is written instead. |

### Example output record

Real self-post record from the same run (input `{"searchQueries": ["artificial intelligence"]}`):

```json
{
  "thumbnail": null,
  "title": "What scares you most about artificial intelligence now and in the future?",
  "url": null,
  "id": "1ub2f4v",
  "selftext": "That how fast it is advancing. Look at ai generated images from 5 years ago and look at them now. Imagine what it would be in like 50 years.",
  "subreddit": "AskReddit",
  "author": "MESHO-53465",
  "authorFullname": "t2_27927ck2ez",
  "score": 2,
  "upvoteRatio": 0.6,
  "numComments": 98,
  "numCrossposts": 0,
  "totalAwards": 0,
  "linkFlairText": null,
  "permalink": "https://www.reddit.com/r/AskReddit/comments/1ub2f4v/what_scares_you_most_about_artificial/",
  "domain": "self.AskReddit",
  "isSelf": true,
  "isVideo": false,
  "isNsfw": false,
  "isSpoiler": false,
  "isOriginalContent": false,
  "isPinned": false,
  "isLocked": false,
  "isArchived": false,
  "edited": "2026-06-20T17:48:33+00:00",
  "galleryImageUrls": null,
  "createdAt": "2026-06-20T17:33:19.000Z",
  "matchedQuery": "artificial intelligence",
  "observedAt": "2026-08-10T14:25:04.841Z",
  "error": null
}
```

### Run via API and CLI

Start a run and wait for it to finish, then read the dataset. Replace `<TOKEN>` with your Apify API token.

Run synchronously and get dataset items in one call:

```bash
curl -X POST "https://api.apify.com/v2/acts/scrapers_lat~reddit-search-scraper/run-sync-get-dataset-items?token=<TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"searchQueries":["your brand"],"sort":"new","timeFilter":"week","maxPosts":50}'
```

Start a run asynchronously:

```bash
curl -X POST "https://api.apify.com/v2/acts/scrapers_lat~reddit-search-scraper/runs?token=<TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"searchQueries":["product a","competitor b"],"subreddits":["technology"],"sort":"top","timeFilter":"month","maxPosts":200}'
```

Apify CLI:

```bash
apify call scrapers_lat/reddit-search-scraper \
  --input '{"searchQueries":["artificial intelligence"],"sort":"relevance","withDetails":true}'
```

### Fetch results

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

```bash
## JSON
curl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?token=<TOKEN>&clean=true&format=json"

## CSV
curl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?token=<TOKEN>&clean=true&format=csv"

## Paginate large datasets
curl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?token=<TOKEN>&offset=1000&limit=1000"
```

`<DATASET_ID>` is returned as `defaultDatasetId` in the run object. Use `offset` and `limit` to page through large result sets. `clean=true` drops empty and internal fields.

### Billing and limits

- **Pay per result.** You are charged per matching post returned (`result` event). When `withDetails` is on and a post page is successfully enriched, an add-on `details` event is also charged. See the [pricing tab](https://apify.com/scrapers_lat/reddit-search-scraper/pricing) for current prices.
- **No charge on failure.** If a query errors, the actor writes a single item with a populated `error` field and does not charge for it. Empty runs cost nothing.
- **Spend cap respected.** Set `maxTotalChargeUsd` on the run; once reached, the actor stops emitting and charging further billable results.
- **Free Apify plans** are capped at 10 posts per run. Upgrade for higher `maxPosts`.
- **Turn off enrichment to save.** Set `withDetails` to `false` for listing-only results with no `details` charge.

### FAQ and troubleshooting

**A run returned 0 records. Why?**
The query matched nothing, the `subreddits` restriction was too narrow, or the `timeFilter` window excluded everything. Loosen the query or widen the time range. Zero-result runs are not charged.

**How do I track several brands at once?**
Add each term to `searchQueries`. Every record carries the `matchedQuery` that surfaced it, so you can attribute mentions per term.

**How do I search only within specific subreddits?**
Set `subreddits` to the community names (without `r/`). Leave it empty to search all of Reddit.

**Why is `selftext` null on some posts?**
Only self (text) posts carry `selftext`, and it is captured when `withDetails` is enabled. Link posts store their target in `url` instead.

**What is the difference between this and the Reddit Posts & Comments Scraper?**
This actor is search-first and mention-tracking oriented (one record per matching post, with `matchedQuery`). The [Reddit Posts & Comments Scraper](https://apify.com/scrapers_lat/reddit-scraper) reads full subreddit feeds and can also return comment trees.

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

### Related scrapers

- [Reddit Posts & Comments Scraper](https://apify.com/scrapers_lat/reddit-scraper): full subreddit feeds and comment trees.
- [Reddit Trending Scraper](https://apify.com/scrapers_lat/reddit-trending-scraper): trending and popular posts across Reddit.
- [Reddit User Scraper](https://apify.com/scrapers_lat/reddit-user-scraper): a user's posts, comments and profile.
- [Hacker News Scraper](https://apify.com/scrapers_lat/hacker-news-scraper): Hacker News stories, comments and points.
- [Google News Scraper](https://apify.com/scrapers_lat/google-news-scraper): news articles by keyword and topic.

### More scrapers at scrapers.lat

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

***

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

# Actor input Schema

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

Maximum number of posts to collect across all queries.

## `searchQueries` (type: `array`):

Keywords or phrases to search across Reddit. Add one per line, for example: your brand name, a product, a competitor. Each query is searched separately.

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

Optional. A single search term, as an alternative to the list above.

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

Optional. Limit the search to these subreddits (names without the r/ prefix). Leave empty to search all of Reddit.

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

Result ordering.

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

Time window for the search results.

## `withDetails` (type: `boolean`):

When enabled, opens each matched post to capture its full self text, upvote ratio and gallery images. Disable for a faster, listing-only run.

## Actor input object example

```json
{
  "maxPosts": 10,
  "searchQueries": [
    "artificial intelligence"
  ],
  "subreddits": [],
  "sort": "relevance",
  "timeFilter": "all",
  "withDetails": true
}
```

# Actor output Schema

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

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "maxPosts": 10,
    "searchQueries": [
        "artificial intelligence"
    ],
    "subreddits": []
};

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

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

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

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

```

## CLI example

```bash
echo '{
  "maxPosts": 10,
  "searchQueries": [
    "artificial intelligence"
  ],
  "subreddits": []
}' |
apify call scrapers_lat/reddit-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapers_lat/reddit-search-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/IX61DCDFiwfIkb0Ym/builds/Bu31x0NIPfjSe3d85/openapi.json
