Apify example task · whoareyouanas/reddit-scraper
Discover Reddit communities about homelabs
Search by homelab and collect the matching subreddit records. Review available community names, descriptions and member counts.
- Actor
- Reddit Scraper - Posts, Comments & Search
- Result limit
- 10 (maxItems)
- Estimated cost
- Up to $0.015
- Run options
- Actor defaults
Example updated 2026-11-20 · actor build 2.1.5 · runs in your own Apify account
01 / About the actor
Reddit Scraper - Posts, Comments & Search
Export archived Reddit posts and nested comments from Reddit URLs or keyword searches scoped to a subreddit. Filter by date and flair and download CSV, Excel, or JSON.
URLs or subreddit search
Provide a Reddit post, subreddit, or profile URL, or search for a keyword in a particular subreddit.
Nested comments
Collect available replies alongside post records when comments are enabled.
Scoped exports
Choose filters and record caps before exporting for research.
02 / Input
The exact input this example runs.
Set startUrls for URL-based collection. For keyword searches, provide searches and a subreddit scope. Set explicit caps for the record types you need.
{
"includeNSFW": false,
"maxItems": 10,
"proxy": {
"useApifyProxy": true
},
"searches": [
"homelab"
],
"ignoreStartUrls": true,
"searchPosts": false,
"searchCommunities": true,
"maxCommunitiesCount": 5
}| Field | Value in this example | What it controls |
|---|---|---|
| includeNSFWChange this | false | Include adult-rated posts, associated comments, and subreddits in results. |
| maxItemsChange this | 10 | Hard cap on the total number of items saved to the dataset across all categories. |
| proxy | 1 settings | Legacy proxy setting retained for saved inputs. This actor uses a public archive. |
| searchesChange this | homelab | Keywords to search in the archive. With Start URLs, use the searchTerms API alias to run both. |
| ignoreStartUrlsChange this | true | Set to true to bypass the Start URLs field (used as a fix for tools like Zapier). |
| searchPostsChange this | false | Include matching posts in search results. |
| searchCommunitiesChange this | true | Include matching communities (subreddits) in search results. |
| maxCommunitiesCountChange this | 5 | Maximum number of communities returned from search or leaderboard. |
Other inputs you can add (8)
| Field | Type / required | Default | Purpose |
|---|---|---|---|
| startUrls | array | Not specified | Paste Reddit post, comment, subreddit, user, or search-page URLs. Clear this field to use the keyword search form. |
| searchCommunityName | string | Not specified | Search inside one subreddit, such as programming or r/programming. Without a scope the archive only searches communities whose names match the keyword. |
| searchComments | boolean | false | Search comment text in the selected community. |
| searchUsers | boolean | false | Include matching user profiles in search results. |
| sort | string | "new" | Rank results by recency, keyword relevance, score, activity, or comment count. Options: , relevance, hot, top, new, rising, comments |
| time | string | "" | Limit results to a recent time window (most useful with sort = top or controversial). Options: , all, hour, day, week, month, year |
| skipComments | boolean | false | Skip scraping comments when going through posts. |
| skipUserPosts | boolean | false | Skip scraping a user's submitted posts when going through their profile. |
03 / Make it yours
Change these fields for your own research.
01 · includeNSFW
Include NSFW content
Include adult-rated posts, associated comments, and subreddits in results.
Example: false
02 · maxItems
Max items (total)
Hard cap on the total number of items saved to the dataset across all categories.
Example: 10
03 · searches
Search terms
Keywords to search in the archive. With Start URLs, use the searchTerms API alias to run both.
Example: homelab
04 · ignoreStartUrls
Ignore Start URLs
Set to true to bypass the Start URLs field (used as a fix for tools like Zapier).
Example: true
05 · searchPosts
Search posts
Include matching posts in search results.
Example: false
06 · searchCommunities
Search communities
Include matching communities (subreddits) in search results.
Example: true
07 · maxCommunitiesCount
Max communities
Maximum number of communities returned from search or leaderboard.
Example: 5
Run it in three steps
- Open the example on Apify and select Try for free to copy it into your Apify account.
- Replace the sample values above with your own target and keep the limit small.
- Start the run, then export the dataset as JSON, CSV or Excel.
04 / Output
What the results table shows.
- Inspect the record type and source URL before combining post, comment, community, and user records.
- Check the available reply hierarchy and dates against the source when using nested comments.
Columns in the “Communities” view
id
ID
name
Name
title
Title
description
Description
numberOfMembers
Members
over18
NSFW
communityIcon
Icon
headerImage
Header
url
URL
createdAt
Created
A view selects columns for the table. The full JSON export keeps every field, including nested arrays and objects.
05 / Cost
What this example costs to run.
At most about $0.015: up to 10 results at $0.0015 each (Reddit result) plus $0.0005 per GB of memory for the start event. Fewer results cost less. The live Pricing tab on Apify is authoritative.
Actor Start
$0.0005 per event · per GB of memory
Reddit result
$0.0015 per event
Prices checked 2026-11-23. Set a run spending limit in Apify when you widen the input.
06 / API
Run the same input from your code.
This call starts a billable run of Reddit Scraper - Posts, Comments & Search with this example's input and returns the dataset items when it finishes. Synchronous calls wait up to five minutes; for longer runs, POST to /runs instead and read the run's default dataset when it succeeds. Keep the token in an environment variable.
curl --request POST \
'https://api.apify.com/v2/acts/whoareyouanas~reddit-scraper/run-sync-get-dataset-items?format=json' \
--header "Authorization: Bearer $APIFY_TOKEN" \
--header 'Content-Type: application/json' \
--data '{"includeNSFW":false,"maxItems":10,"proxy":{"useApifyProxy":true},"searches":["homelab"],"ignoreStartUrls":true,"searchPosts":false,"searchCommunities":true,"maxCommunitiesCount":5}'Coverage & interpretation
Check the result before relying on it.
- Archive coverage varies by subreddit and date. Recent or removed posts and replies may be missing.
- Keyword search is scoped to a subreddit. Use the source URL to confirm a match before relying on it.
Questions
About this example.
What does the "Discover Reddit communities about homelabs" example collect?
Search by homelab and collect the matching subreddit records. Review available community names, descriptions and member counts. It runs Reddit Scraper - Posts, Comments & Search, published by whoareyouanas on Apify.
Which input does this example use?
Include NSFW content (includeNSFW) set to false; Max items (total) (maxItems) set to 10; Search terms (searches) set to homelab; Ignore Start URLs (ignoreStartUrls) set to true; Search posts (searchPosts) set to false; Search communities (searchCommunities) set to true. The full JSON input is shown on this page.
How much does it cost to run this example?
At most about $0.015: up to 10 results at $0.0015 each (Reddit result) plus $0.0005 per GB of memory for the start event. Fewer results cost less. The live Pricing tab on Apify is authoritative.
How do I change it for my own research?
Open the example on Apify and select Try for free to copy it into your account, then edit Include NSFW content, Max items (total), Search terms, Ignore Start URLs, Search posts, Search communities, Max communities. Keep the result limit small for the first run and check the output before scaling up.
Can I run it from the API or on a schedule?
Yes. Send the same JSON input to the Reddit Scraper - Posts, Comments & Search run endpoint with your Apify API token, or save the copied task in your Apify account and add a schedule. Results land in the run's default dataset as JSON, CSV or Excel.
More examples
Related tasks you can copy.
Compare top posts across two data science subreddits
Sample public posts from r/datascience and r/dataengineering. Compare topics, scores and source links using a shared sorting and scope.
View exampleFind Python testing discussions on Reddit
Search public r/learnpython posts for pytest. Review post text, scores and source links for a small developer research sample.
View exampleFind Home Assistant backup discussions in Reddit comments
Search public r/homeassistant comments for backup restore experiences. Review the returned text and permalinks to locate the source threads.
View exampleAI Ad Analyzer
Score an ad creative with your own AI API key
Analyze one sample image ad for hooks, visible text, creative attributes and improvement suggestions. Add your own OpenAI API key in the secret apiKey field before running. Provider charges apply in addition to Apify usage; AI scores are not measured ad performance.
View exampleFacebook Group & Page Scraper
Collect images and video links from ESA Facebook posts
Sample public ESA Facebook posts with media extraction enabled. Review available image links, video links and source post URLs.
View exampleFacebook Post Scraper by ID
Look up a batch of Facebook posts by numeric ID
Supply three documented numeric IDs and compare the returned post text, timestamps and source URLs. Use the input ID to match the output back to your list.
View exampleGuides
Read more about this workflow.
Export Reddit Posts and Comments to CSV: Browser or Archive?
Choose a local export for the Reddit page you are reviewing or a dated archive export for historical research, with the right expectations for each.
How to Scrape Reddit Posts and Comments for Market Research
Use a Reddit scraper to find buyer language, product complaints, content ideas, and community signals from posts, comments, subreddits, and user profiles.
Top 5 Apify Scrapers to Automate Marketing Research
A practical stack of Apify scrapers for automating marketing research across Meta ads, Google ads, TikTok ads, Facebook Groups, and Reddit.
Top 7 Web Scrapers for Competitor Research in 2026
Compare the best web scrapers for competitor ad research, social listening, lead generation, and market research across Meta, Google, TikTok, Reddit, websites, and Facebook Groups.