# Reddit Keyword Monitor (`w3crawler/reddit-keyword-monitor`) Actor

Monitor Reddit keywords across multiple subreddits. Search for keywords/phrases, filter by subreddit, sort, time range, and content type. Perfect for brand monitoring, market research, and trend alerts.

- **URL**: https://apify.com/w3crawler/reddit-keyword-monitor.md
- **Developed by:** [w3crawler](https://apify.com/w3crawler) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 keyword results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 Monitor

Monitor **public Reddit search results** for one or more keywords or phrases, optionally scoped to specific subreddits and filtered by sort order, time window, and result type. The Actor renders Reddit's public search pages in a headless browser, follows bounded scroll batches, deduplicates posts across sources, and can open matching posts for their public self-text. It saves one row per matching post and keyword with search provenance and a bounded match excerpt.

### Get started

1. Open the [Actor Store page](https://apify.com/w3crawler/reddit-keyword-monitor) and select **Try for free**, or open the **Input** tab.
2. Enter one or more phrases in `keywords`. Leave `subreddits` empty to search all Reddit, or list up to 20 subreddits to run each keyword separately inside each one.
3. Choose `sort`, `timeFilter`, and `searchType`; set `maxResultsPerKeyword` and `maxPages` to keep the first run small.
4. Start the Actor, open the dataset, and export the rows as JSON, CSV, or Excel. Open **Run summary** (`OUTPUT_SUMMARY`) to see per-keyword counts, failed searches, and pagination stats.

### Input

`keywords` is required. Every other field is optional and uses the default shown below. Unsupported field names and out-of-range values are rejected before the browser starts.

| Field | Type | Required? | Default | Meaning |
| --- | --- | --- | --- | --- |
| `keywords` | string array | Required | `["artificial intelligence"]` | One to ten unique keywords or phrases, each 2–100 characters. |
| `subreddits` | string array | Optional | `[]` | Up to 20 unique subreddit names, with or without `r/` and without URLs. Empty searches all Reddit; otherwise each keyword is searched separately in each listed subreddit and not globally. |
| `sort` | string enum | Optional | `relevance` | Reddit search order: `relevance`, `hot`, `top`, `new`, or `comments`. |
| `timeFilter` | string enum | Optional | `week` | Search window: `hour`, `day`, `week`, `month`, `year`, or `all`. |
| `searchType` | string enum | Optional | `link` | Reddit result type: `link`, `comment`, `sr`, or `all`. |
| `maxResultsPerKeyword` | integer | Optional | `25` | Maximum rows saved for each keyword across all of its subreddit sources, 1–100. |
| `maxPages` | integer | Optional | `3` | Maximum rendered search snapshots or scroll batches per keyword and subreddit source, 1–10. The URL stays unchanged while Reddit appends result cards. |
| `scrollDelayMs` | integer | Optional | `500` | Wait after each public scroll so cards can load, 0–3,000 ms. Use `0` only for tests. |
| `includePostBody` | boolean | Optional | `true` | Open each matching post to capture visible public self-text when available. |
| `proxyConfiguration` | object | Optional | `{"useApifyProxy":true}` | Apify Proxy or custom proxy settings; Apify Proxy is enabled by default. |

Full default input:

```json
{
  "keywords": [
    "artificial intelligence"
  ],
  "subreddits": [],
  "sort": "relevance",
  "timeFilter": "week",
  "searchType": "link",
  "maxResultsPerKeyword": 25,
  "maxPages": 3,
  "scrollDelayMs": 500,
  "includePostBody": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

The Actor builds a public search URL for every keyword and subreddit pair, with `sort`, `t`, and `type` query parameters. It reads rendered search cards, tries an `old.reddit.com` HTML fallback when a search page exposes no cards, and never logs in or calls a private API.

### Output

The dataset contains one row per unique post and keyword scope. Values not visible in the public search card or post page are omitted rather than inferred. Failed searches, challenges, and empty results are counted in `OUTPUT_SUMMARY` and logs, not written as dataset rows.

| Field | Type | Availability | Meaning |
| --- | --- | --- | --- |
| `recordType` | string enum | Always | Row discriminator; always `keyword_result`. |
| `recordId` | string | Always | Stable identity for the keyword and public post. |
| `resultPosition` | integer | Always | One-based position of the post within the keyword scope. |
| `pageNumber` | integer | Always | One-based rendered snapshot or scroll batch that first exposed the row. |
| `postId` | string | Always | Bare Reddit base36 post ID without the `t3_` prefix. |
| `postFullname` | string | Always | Post fullname in `t3_<postId>` form. |
| `postTitle` | string | Always | Public post title. |
| `contentUrl` | string | Always | Public content URL; may point to a gallery or external target. |
| `permalink` | string | Always | Public Reddit permalink. |
| `subreddit` | string | Always | Public subreddit name. |
| `selfText` | string | When `includePostBody` is enabled and text is visible | Visible public post body. |
| `domain` | string | When returned | Post domain, such as `self.learnpython` or `reddit.com`. |
| `matchType` | string enum | Always | `title_and_body`, `title`, `body`, or `search_result`. |
| `matchedExcerpt` | string | Always | Bounded excerpt around the matched keyword. |
| `keyword` | string | Always | Keyword or phrase searched. |
| `searchQuery` | string | Always | Query sent to Reddit. |
| `sortUsed` | string | Always | Sort filter used. |
| `timeFilter` | string | Always | Time filter used. |
| `searchType` | string | Always | Result type requested. |
| `sourceSearchUrl` | string | Always | Public rendered search URL that produced the row. |
| `extractionMethod` | string | Always | Extraction method, currently `reddit-search-rendered-dom`. |
| `sourceUrl` | string | Always | Public permalink used as row provenance. |
| `scrapedAt` | string | Always | UTC extraction time. |
| `subredditId` | string | When published | Public subreddit identifier. |
| `subredditType` | string | When published | Public subreddit type. Declared by the schema, but absent in all three saved rows. |
| `subredditSubscribers` | number | When published | Public subscriber count. Declared by the schema, but absent in all three saved rows. |
| `author` | string | When published | Public author name. |
| `authorFullname` | string | When published | Public author identifier. |
| `postType` | string | When published | Public post type. Declared by the schema, but absent in all three saved rows. |
| `score` | number | When published | Public score. Declared by the schema, but absent in all three saved rows. |
| `upvoteRatio` | number | When published | Public upvote ratio. Declared by the schema, but absent in all three saved rows. |
| `numComments` | number | When published | Public comment count. Declared by the schema, but absent in all three saved rows. |
| `createdAt` | string | When published | Public post creation time. |
| `editedAt` | string | When published | Public edit time. Declared by the schema, but absent in all three saved rows. |
| `nsfw` | boolean | When published | Public NSFW marker. |
| `spoiler` | boolean | When published | Public spoiler marker. |
| `searchSubreddit` | string | When published | Subreddit scope used for the search; omitted for global searches. Declared by the schema, but absent in all three saved rows. |
| `sourceCursor` | string | When published | Continuation cursor exposed by the rendered route; omitted otherwise. Absent in all three saved rows. |

#### Full JSON output

This is a real saved row from the 2026-10-25 `python` search. The long `selfText` is shortened with an ellipsis; every other value is complete. Fields declared in the schema but absent from this row are listed above.

```json
{
  "recordId": "keyword-result:b7de63cd2f1a8aea6489",
  "resultPosition": 1,
  "pageNumber": 1,
  "postId": "1xegvwx",
  "postFullname": "t3_1xegvwx",
  "postTitle": "WHAT SHOULD I DO? (I am lost)",
  "contentUrl": "https://www.reddit.com/r/learnpython/comments/1xegvwx/what_should_i_do_i_am_lost/",
  "permalink": "https://www.reddit.com/r/learnpython/comments/1xegvwx/what_should_i_do_i_am_lost/",
  "subreddit": "learnpython",
  "subredditId": "t5_2r8ot",
  "author": "Ancient_Map6635",
  "authorFullname": "t2_25ed7xrbcl",
  "selfText": "So, here is how it goes. I had a feeling that i need to learn a programming language, and thought there could be no better one at this particular moment other than python. I started with the help of gpt, about 8 or 9 days ago, everyday I learnt something new and practiced lil stuff of the previous day. On day 6, i had no more motivation to continue. I wanna get back at learning it.\n    \n      Ther…",
  "domain": "self.learnpython",
  "createdAt": "2026-10-24T19:02:04.386Z",
  "nsfw": false,
  "spoiler": false,
  "matchType": "body",
  "matchedExcerpt": "…need to learn a programming language, and thought there could be no better one at this particular moment other than python. I started with the help of gpt, about 8 or 9 days ago, everyday I learnt something new and practiced lil stuff of t…",
  "keyword": "python",
  "searchQuery": "python",
  "sortUsed": "relevance",
  "timeFilter": "week",
  "searchType": "link",
  "sourceSearchUrl": "https://www.reddit.com/search/?q=python&sort=relevance&t=week&type=link",
  "extractionMethod": "reddit-search-rendered-dom",
  "recordType": "keyword_result",
  "sourceUrl": "https://www.reddit.com/r/learnpython/comments/1xegvwx/what_should_i_do_i_am_lost/",
  "scrapedAt": "2026-10-25T20:48:26.647Z"
}
```

The same saved run also produced `t3_1xcd9tl` (`matchType: "title_and_body"`) and `t3_1xah77d` (`matchType: "title"`).

### Run summary

**Run summary** is stored separately from the dataset in the run's key-value store under `OUTPUT_SUMMARY`. It records search scope, counts, and pagination behavior; failure details stay in the actor log.

| Field | Meaning |
| --- | --- |
| `recordType` | Summary discriminator; `runSummary`. |
| `status` | Actor outcome: `SUCCEEDED` or `FAILED`. |
| `runStatus` | Canonical run status; matches `status`. |
| `dataStatus` | `COMPLETE`, `PARTIAL`, `NO_RESULTS`, or `FAILED` based on saved rows and search failures. |
| `source` | Public Reddit search source. |
| `keywords` | Keywords searched. |
| `subreddits` | Subreddit scope requested; omitted when the list is empty. |
| `sort` | Search sort used. |
| `timeFilter` | Search time window used. |
| `searchType` | Result type requested. |
| `maxResultsPerKeyword` | Configured row cap per keyword. |
| `maxPages` | Configured snapshot cap per keyword and subreddit source. |
| `scrollDelayMs` | Configured wait after each scroll. |
| `requestedPages` | Configured page cap; equals `maxPages`. |
| `requestedItemsPerSource` | Configured item limit recorded for each source; equals `maxResultsPerKeyword`. |
| `includePostBody` | Whether post bodies were requested. |
| `proxyConfigured` | Whether a proxy configuration was created. |
| `recordsStored` | Rows written to the dataset. |
| `failedRequests` | Search requests that failed or were blocked after retries. |
| `keywordCounts` | Saved-row count keyed by keyword. |
| `pagesProcessed` | Total rendered search snapshots processed across sources. |
| `scrollRounds` | Total scroll continuation attempts. |
| `candidateCount` | Rendered candidate rows observed before identity deduplication. |
| `uniqueCount` | Unique candidates accepted by the paginator before normalization. |
| `normalCount` | Normal rows written; equals `recordsStored`. |
| `diagnosticCount` | Number of failed searches; no diagnostic rows are written to the dataset. |
| `outputWriteFailureCount` | Failed summary-write attempts, normally `0`. |
| `duplicatesSkipped` | Duplicate post IDs skipped across snapshots and sources. |
| `noProgressStops` | Sources stopped after repeated snapshots with no new post IDs. |
| `sourceExhaustedCount` | Sources that ended because the page could not advance or made no progress. |
| `paginationMode` | Pagination strategy; currently `bounded_scroll`. |
| `found` | Whether at least one keyword result was stored. |
| `dataAvailable` | Whether usable public search data was saved. |
| `scrapedAt` | Time the summary was written, in ISO UTC. |

| Status | Data status | Meaning |
| --- | --- | --- |
| `SUCCEEDED` | `COMPLETE` | At least one row was saved and no search failed. |
| `SUCCEEDED` | `PARTIAL` | At least one row was saved, but another search failed or was blocked. Saved rows remain available. |
| `SUCCEEDED` | `NO_RESULTS` | Searches completed without failure but no matching post was stored. |
| `FAILED` | `FAILED` | No row was saved and at least one search or crawl failure occurred. |

Example `OUTPUT_SUMMARY` from the saved run:

```json
{
  "recordType": "runSummary",
  "status": "SUCCEEDED",
  "runStatus": "SUCCEEDED",
  "dataStatus": "COMPLETE",
  "source": "https://www.reddit.com",
  "keywords": [
    "python"
  ],
  "sort": "relevance",
  "timeFilter": "week",
  "searchType": "link",
  "maxResultsPerKeyword": 3,
  "maxPages": 3,
  "scrollDelayMs": 500,
  "requestedPages": 3,
  "requestedItemsPerSource": 3,
  "includePostBody": true,
  "proxyConfigured": true,
  "recordsStored": 3,
  "failedRequests": 0,
  "keywordCounts": {
    "python": 3
  },
  "pagesProcessed": 1,
  "scrollRounds": 0,
  "candidateCount": 7,
  "uniqueCount": 3,
  "normalCount": 3,
  "diagnosticCount": 0,
  "outputWriteFailureCount": 0,
  "duplicatesSkipped": 0,
  "noProgressStops": 0,
  "sourceExhaustedCount": 0,
  "paginationMode": "bounded_scroll",
  "found": true,
  "dataAvailable": true,
  "scrapedAt": "2026-10-25T20:48:29.993Z"
}
```

### Coverage and limitations

The Actor sees only what Reddit's public rendered search returns for the requested query, sort, time window, and type. Reddit controls ranking and indexing, so a monitor run is a snapshot, not a complete archive of every mention. Private, quarantined, deleted, age-gated, or login-gated content is unavailable, and a challenge or block can stop an individual source without stopping the whole run.

`maxPages` limits rendered snapshots and scroll batches, not result pages; the Actor stops early when a source makes no progress or is exhausted. The inspected public route exposes no stable cursor, so `sourceCursor` is normally absent and `paginationMode` remains `bounded_scroll`. Post IDs are deduplicated within each keyword, so the same post found in two subreddits for one keyword is saved once; the same post found under two different keywords can produce two rows. `maxResultsPerKeyword` is shared across all subreddit sources for a keyword, and sources are processed in order, so the first subreddit can consume the cap before later subreddits run. `keywordCounts` sums to `recordsStored`. Score, comment count, ratio, subreddit metadata, and edit time appear only when the search DOM or an opened post exposes them; the three saved DOM rows contained none of those numeric fields. `includePostBody` adds one post-page visit per saved row and increases runtime.

### Usage and support

Cost is driven by headless-browser time, the number of keyword-and-subreddit sources, `maxPages`, `includePostBody` post visits, and proxy traffic. Start with one keyword, a small `maxResultsPerKeyword` of 3–10, and `subreddits` empty to verify access, then expand. See the Actor's Pricing tab for current account rates.

Use the [Actor Issues page](https://apify.com/w3crawler/reddit-keyword-monitor/issues) to report a problem. Include the run ID, the input used, and the `OUTPUT_SUMMARY` record; do not include tokens, cookies, or private data. This Actor is not affiliated with Reddit. Use it only for public data and in accordance with Reddit's terms, robots guidance, and applicable law. Public pages can contain personal information; use the output only for lawful purposes.

# Changelog

This Actor's version history is a separate document: https://apify.com/w3crawler/reddit-keyword-monitor/changelog.md

# Actor input Schema

## `keywords` (type: `array`):

One to ten keywords or phrases, each 2 to 100 characters.

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

Up to 20 subreddit names without URLs. Leave empty to search all Reddit.

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

Reddit search sort order.

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

Reddit search time window.

## `searchType` (type: `string`):

Reddit result type to request.

## `maxResultsPerKeyword` (type: `integer`):

Maximum records saved for each keyword.

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

Maximum rendered search snapshots/scroll batches processed for each keyword and subreddit source. The page URL and query parameters remain unchanged while Reddit appends public result cards.

## `scrollDelayMs` (type: `integer`):

Bounded wait after each public DOM scroll so Reddit can append result cards. Use 0 only for deterministic tests; the default is 500 ms.

## `includePostBody` (type: `boolean`):

Visit matching post pages to include public self-text when available.

## `proxyConfiguration` (type: `object`):

Optional Apify Proxy or custom proxy settings.

## Actor input object example

```json
{
  "keywords": [
    "artificial intelligence"
  ],
  "subreddits": [],
  "sort": "relevance",
  "timeFilter": "week",
  "searchType": "link",
  "maxResultsPerKeyword": 25,
  "maxPages": 3,
  "scrollDelayMs": 500,
  "includePostBody": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

Source-backed result records from the default dataset.

## `runSummary` (type: `string`):

Keyword scope, filters, per-keyword counts, failed requests, and availability state.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("w3crawler/reddit-keyword-monitor").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("w3crawler/reddit-keyword-monitor").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 '{}' |
apify call w3crawler/reddit-keyword-monitor --silent --output-dataset

```

## MCP server setup

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

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/STEwWvnzQhEeAiPJP/builds/Hsc81DwksV3EestJe/openapi.json
