Reddit Keyword Scraper
Pricing
$9.00/month + usage
Go to Apify Store
Pricing
$9.00/month + usage
Rating
0.0
(0)
Developer

Alexandre AMIEL
Maintained by Community
Actor stats
0
Bookmarked
1
Total users
0
Monthly active users
3 days ago
Last modified
Categories
Share
An Apify Actor that searches a subreddit for a keyword and returns every matching post and comment.
Input
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
subreddit | string | ✅ | — | Subreddit to scan (e.g. pasta) |
keyword | string | ✅ | — | Keyword to search for (e.g. tomato) |
maxPosts | integer | 50 | Maximum posts to analyze (1–1000) | |
sort | string | new | Sort order: new · top · relevance · comments | |
time | string | month | Time filter: hour · day · week · month · year · all | |
includePosts | boolean | true | Match keyword in post title / body | |
includeComments | boolean | true | Match keyword in comments | |
maxCommentsPerPost | integer | 200 | Max comments to scan per post (0–2000) | |
commentDepth | integer | 3 | Nested reply depth to traverse (1–10) | |
requestDelayMs | integer | 800 | Delay between requests in ms (rate-limit safety) |
Example storage/key_value_stores/default/INPUT.json:
{"subreddit": "pasta","keyword": "tomato","maxPosts": 50,"includePosts": true,"includeComments": true}
Output
Each dataset item represents one post that matched the keyword (in the post itself and/or in its comments).
{"keyword": "tomato","subreddit": "pasta","post": {"id": "abc123","title": "My tomato pasta recipe","selftext": "...","author": "u/someone","score": 142,"numComments": 37,"createdUtc": 1708300000,"permalink": "https://www.reddit.com/r/pasta/comments/abc123/...","url": "https://www.reddit.com/r/pasta/comments/abc123/...","matchedInPost": true},"matchedComments": [{"id": "xyz789","author": "u/other","body": "I use canned tomato for this...","score": 12,"createdUtc": 1708301000,"permalink": "https://www.reddit.com/r/pasta/comments/abc123/_/xyz789"}],"matchSummary": {"matchedInPost": true,"matchedCommentsCount": 1}}
Project structure
.actor/├── actor.json # Actor name, version, runtime settings├── input_schema.json # Input validation & Apify Console form├── dataset_schema.json # Output dataset schema└── output_schema.json # Output storage definitionsrc/└── main.js # Actor entry pointstorage/ # Local storage (mirrors cloud during dev)├── datasets/ # Output items (JSON)├── key_value_stores/ # INPUT.json lives here└── request_queues/ # Crawl queueDockerfile # Container image definition
Local development
# Install dependenciesnpm install# Edit input# storage/key_value_stores/default/INPUT.json# Run locallyapify run
Deploy to Apify
apify login # enter your API tokenapify push # build & deploy
Or connect your Git repository directly from the Apify Console.