# Reddit Lead Generation Scraper (`deepmine/reddit-lead-gen-scraper`) Actor

Reddit lead generation scraper for buyer intent: find Reddit leads asking for a recommendation or looking to switch tools (recommend a CRM, switching from Salesforce). Set Match to Every word or Exact phrase and a post or comment that doesn't hold your phrase isn't delivered or charged.

- **URL**: https://apify.com/deepmine/reddit-lead-gen-scraper.md
- **Developed by:** [DeepMine](https://apify.com/deepmine) (community)
- **Categories:** Lead generation, Social media, Other
- **Features:** Limited permissions
- **Stats:** 7 total users, 0 monthly users, 96.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.59 / 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 Lead Generation Scraper — Find Buyers Asking for Recommendations on Reddit

**Reddit is full of people publicly asking for product recommendations, announcing they're switching tools, and looking for exactly what you sell. This actor finds them.**

Search Reddit for buying intent phrases across all subreddits or specific communities. Each result is a post or comment whose own text holds your buying phrase (its important words close together, so "recommend a CRM" keeps "can anyone recommend a good CRM?"), ranked by buzz score so the hottest, most-engaged threads surface first. Not every match is a buyer — a career question or a comment that uses the words another way can match too — so read `matchedKeywords` and the text, and tighten **Match** if you want fewer, stricter rows.

**Real rows, run on 2026-10-30 (default match, example input):** "CRM recommendations for a small Travel Agency?" (r/CRM, 21 upvotes, 53 comments, phrase `recommend a CRM`), "Is there a HubSpot alternative that makes marketing automation simple?" (r/CRMSoftware, `alternative to HubSpot`), "Which CRM do you recommend" (r/CRM, 133 comments). That run kept 63 rows for $0.0498 at the Starter price ($0.79 per 1,000 rows); some of its rows are not buyers, see [Output](#output--what-you-get).

***

### What Is Reddit Lead Generation Scraper?

Reddit Lead Generation Scraper searches Reddit for threads and comments containing high-intent phrases — the language people use when they're in active buying mode. Phrases like "recommend a CRM", "switching from Salesforce", "anyone use X for Y", or "looking for a tool that does Z".

Unlike generic Reddit scrapers that return raw posts, this actor is built for sales and marketing workflows. Defaults are tuned for lead generation: comments are searched alongside posts (most buying intent lives in comment threads), results are sorted newest-first to surface fresh leads before competitors, and the minimum score is set to zero so brand-new posts with no upvotes yet are captured.

Every result is ranked by **buzz score** — a composite metric that weights engagement relative to post age. A thread posted an hour ago with 10 upvotes scores higher than a month-old thread with 500, because the fresh one is the lead you can actually act on.

***

### Key Features

- **Intent phrase search** — search for the exact language buyers use: recommendations, comparisons, switching signals, pain point descriptions
- **Comments + posts** — buying intent is often buried in comment threads, not just top-level posts. Both are searched by default
- **Who wrote it, on every comment** — each comment found is read from its own page: its author and author id, and its thread's upvotes, comment count and poster
- **Strict match by default** — only posts and comments whose own text holds the phrase's important words close together are delivered. Switch **Match** to every word or the exact phrase for stricter rows, or to Reddit's broad match to explore a topic. Rows that don't match aren't delivered, so they aren't charged
- **Sentiment on every row, free** — a positive / negative / neutral label and score for each post and comment (the same score as Reddit Sentiment Tracker)
- **Newest-first by default** — find leads before competitors. Sort by new to catch fresh threads as they're posted
- **Buzz score ranking** — results ranked by engagement velocity, not raw upvotes. Fresh high-engagement threads always surface first
- **Subreddit targeting** — restrict to specific communities (r/entrepreneur, r/sales, r/smallbusiness) for vertical-specific lead gen
- **Zero minimum score** — catches brand-new posts that haven't accumulated votes yet. The freshest leads are often unscored
- **Multi-phrase search** — run dozens of intent phrases in one pass, all searched at the same time. Each is tracked independently with its own summary
- **Per-phrase summary, free** — every phrase gets a summary (total results, top subreddits, top post, buzz breakdown) in the run's `SUMMARY` record. You only pay for mention rows
- **Monitor mode** — schedule recurring runs and track which intent threads are still gaining traction between sessions
- **No browser, no residential proxy needed** — reads Reddit's own JSON and search endpoints over Apify's datacenter proxy, so runs are fast and cheap on every plan

***

### Who Uses This?

#### B2B SaaS Sales Teams & SDRs

Reddit surfaces buyers in active evaluation mode that no CRM or intent tool catches. Search for phrases like "switching from \[competitor]", "recommend a \[category]", or "best \[tool] for \[use case]" and find people who are literally asking for your product right now. Export results and add them to your outreach sequence.

#### Growth Hackers & Demand Gen Marketers

Reddit buying intent discussions are warm leads hiding in plain sight. Someone asking "what's the best email marketing tool for e-commerce" in r/shopify is a qualified prospect. Find them, engage authentically, and convert before anyone else does.

#### Recruiting & Staffing Agencies

Search for phrases like "looking for a developer", "hiring a freelancer", "need a designer for" to find companies actively looking to hire. Reddit is full of founders and small business owners posting hiring needs in communities like r/entrepreneur, r/startups, and r/forhire.

#### Digital Marketing Agencies & Consultants

Find businesses publicly struggling with the exact problems you solve. Search for pain point phrases ("Facebook ads not converting", "need help with SEO", "struggling with email open rates") in relevant subreddits to identify prospects who are pre-sold on the need — they just need to find you.

#### E-commerce & DTC Brands

Monitor product category subreddits for people asking for recommendations in your niche. Someone posting "looking for a good quality X under $Y" in r/BuyItForLife or a product-specific community is a buyer with their wallet open.

#### Investor & Market Researchers

Track which product categories people are actively seeking solutions for. Consistent volume of recommendation requests in a niche signals unsatisfied demand and real market opportunity.

#### Competitor Intelligence Teams

Search for your competitor's name combined with switching signals — "leaving \[competitor]", "switching from \[competitor]", "alternatives to \[competitor]" — to find dissatisfied customers actively looking for something better.

***

### Output — What You Get

Real rows from a run on 2026-10-30 (build 2.0.24, the default **Match**: words close together; 4 phrases, sorted by relevance, past month, 12 per phrase and type). These are the rows from that run that ask for or compare a CRM, with their rank in the run:

| rank | type | buzzScore | subreddit | score | numComments | matchedKeywords | title |
|---|---|---|---|---|---|---|---|
| 1 | post | 4.7 | smallbusiness | 20 | 75 | looking for a CRM | crm for a small business, 40 clients and a spreadsheet that keeps break… |
| 2 | post | 3.3 | CRM | 21 | 53 | recommend a CRM | CRM recommendations for a small Travel Agency? |
| 4 | post | 2.4 | CRM | 19 | 133 | recommend a CRM, looking for a CRM | Which CRM do you recommend |
| 5 | post | 2.3 | CRMSoftware | 9 | 20 | alternative to HubSpot | Is there a HubSpot alternative that makes marketing automation simple? |
| 9 | post | 1.4 | CRMSoftware | 4 | 55 | looking for a CRM | I need a med spa CRM that follows up with leads while I'm busy with cli… |
| 14 | post | 0.8 | CRMSoftware | 17 | 42 | alternative to HubSpot | HubSpot alternatives for small business that don't charge extra for eve… |
| 20 | post | 0.5 | LawFirmMarketing | 4 | 43 | recommend a CRM | CRM Recommendations |

**What that run cost:** it kept 63 rows under a $0.05 spending limit, $0.0498 at the Starter price ($0.79 per 1,000 rows). The run also held rows that are not buyers (career questions about Salesforce, comments that use "CRM" or "recommend" in another sense): the match is about the words, not the intent, so skim the text, or use *Exact phrase* for the tightest set.

#### Mention rows

The Output tab has two tables: **Leads** (rank, type, author, sentiment, phrase, title, thread, text, subreddit, upvotes, buzz score, date and links) and **Mentions**, the table of earlier versions, whose 13 keys are:

| Field | Description |
|---|---|
| `rank` | Position in results (1 = highest buzz score) |
| `buzzScore` | (upvotes + 2 × comments) / age in hours^0.8 (age at least 1 hour), one decimal |
| `scoreDelta` | Upvote change since last run (monitor mode only) |
| `type` | `post` or `comment` |
| `matchedKeywords` | Which intent phrase(s) triggered this result |
| `title` | Post title |
| `body` | Comment text, or a text post's own text |
| `subreddit` | Which subreddit this came from |
| `score` | Raw upvote count |
| `numComments` | Total replies on the post |
| `postAgeHours` | How old the post is in hours |
| `postUrl` | Link to the original post |
| `commentUrl` | Direct link to the comment (for comment results) |

Every key, in row order:

- **Posts:** `rank`, `type`, `matchedKeywords`, `buzzScore`, `title`, `postUrl`, `externalUrl`, `subreddit`, `author`, `score`, `upvoteRatio`, `numComments`, `postAgeHours`, `createdAt`, `flair`, `domain`, `isVideo`, `isSelf`, `thumbnail`, `scoreDelta`, then `id`, `body`, `bodySnippet`, `postType`, `over18`, `imageUrls`, `videoUrl`, `engagementTotal`, `commentToScoreRatio`, `subredditSubscribers`, `authorFlairText`, `isOriginalContent`, `spoiler`, `locked`, `stickied`, `distinguished`, `numCrossposts`, `edited`, `shortUrl`, `sentimentScore`, `sentimentLabel`, `scrapedAt`.
- **Comments:** `rank`, `type`, `matchedKeywords`, `buzzScore`, `body`, `postTitle`, `postUrl`, `commentUrl`, `subreddit`, `author`, `score`, `postAgeHours`, `createdAt`, `scoreDelta`, then `id`, `bodySnippet`, `parentId`, `parentKind`, `postId`, `postCreatedAt`, `over18`, `isSubmitter`, `authorFlairText`, `edited`, `distinguished`, `stickied`, `controversiality`, `permalinkUrl`, `authorId`, `postUpVotes`, `postCommentsCount`, `postAuthor`, `sentimentScore`, `sentimentLabel`, `scrapedAt`.

The keys up to `scoreDelta` are the same, in the same order and with the same values, as in earlier versions, so saved integrations keep working. A value Reddit doesn't give is `null`.

- **Comments' authors.** Reddit's comment search no longer shows who wrote a comment, so each comment found is read from its own page (about 20 KB, several at a time while the next search page loads). That fills `author`, `authorId`, `isSubmitter`, `edited`, `stickied` and the thread's `postUpVotes`, `postCommentsCount` and `postAuthor`. If Reddit doesn't answer a comment's page, that comment keeps the search page's fields (no author) and the status line says how many.
- **Sentiment.** `sentimentScore` is the AFINN-165 word score of the text per word (a post's title and text, a comment's body), nudged by a post's upvote ratio (+ (ratio − 0.75)), two decimals; `sentimentLabel` is `positive` above 0.05, `negative` below −0.05, else `neutral`. It's computed in the run (no AI service, no extra cost) and matches Reddit Sentiment Tracker's score for the same text.

#### Per-phrase summary (free)

One summary per phrase, saved in the `SUMMARY` record of the run's key-value store (the "Per-phrase summary" link on the Output tab), not as dataset rows, so you aren't charged for it. Turn on **Add summary rows to the dataset** to also get them as rows, free, in the run's own `summary` dataset. Its table link is in the run's `OUTPUT` record (the "Run summary" link on the Output tab): `summaryDataset.itemsUrl` for the rows, `summaryDataset.consoleUrl` to open it in Apify Console. The "Per-phrase summary" link on the Output tab is the same summary as one JSON record.

| Field | Description |
|---|---|
| `keyword` | The intent phrase |
| `mentionsDelta` | Change in total results vs. last run |
| `avgBuzzDelta` | Change in average buzz score vs. last run |
| `totalMentions` | Total results found for this phrase |
| `postCount` / `commentCount` | Breakdown by type |
| `topSubreddits` | Top 5 communities where this phrase appears |
| `topPostTitle` | Highest buzz result for this phrase |
| `topPostUrl` | Link to the top result |

The run's `OUTPUT` record says how each search went (pages read, results found, filtered, not matching the phrase and kept), and `commentRecordsRead` how many comments were filled from their own page ("48 of 48").

***

### Pricing

Pay per result: $0.79 per 1,000 mention rows on Starter ($0.89 Free, $0.69 Scale, $0.59 Business), no start fee. The per-phrase summary in the `SUMMARY` record is free. Set a spending limit on the run and the actor stops there, keeping its top-ranked rows.

***

### Getting Started

1. **Add your intent phrases** — Enter the buying language your target customers use. What would someone type on Reddit when they're looking for your product? Add one phrase per line.

2. **Set your time window** — "Past week" catches recent intent without missing slower-moving buying cycles. If running daily, use "Past 24 hours".

3. **Choose your subreddits** — Leave empty to search all of Reddit, or restrict to specific communities for targeted results.

4. **Run** — Results appear in the Mentions tab ranked by buzz score. The top results are the freshest, most-engaged buying discussions.

***

### Input Parameters

| Parameter | Default | Description |
|---|---|---|
| `keywords` | — | Buying intent phrases to search (required) |
| `sortBy` | `new` | Sort order: new, relevance, top, hot, comments |
| `timeFilter` | `week` | Time window: hour, day, week, month, year, all |
| `searchPosts` | `true` | Search top-level posts |
| `searchComments` | `true` | Search comments (recommended) |
| `subredditFilter` | `[]` | Restrict to specific subreddits (optional) |
| `maxResultsPerKeyword` | `50` | Max posts, and max comments, per phrase (up to 1,000) |
| `minScore` | `0` | Minimum upvote score (0 = catch brand-new posts) |
| `matchMode` | `near` | `near`: the phrase's important words close together (default); `all`: the text holds every word of the phrase; `phrase`: the exact phrase; `any`: whatever Reddit's search finds (broad, to explore a topic). Results that don't match are free |
| `trackChanges` | `false` | Enable monitor mode for delta tracking |
| `includeSummaryRows` | `false` | Also add the per-phrase summaries as rows to the run's `summary` dataset (free) |
| `proxyConfiguration` | Datacenter | Proxy settings. A residential pick is kept for retries only |

***

### Intent Phrase Examples by Use Case

**B2B SaaS / CRM**
`recommend a CRM`, `switching from Salesforce`, `HubSpot alternatives`, `best CRM for small business`, `looking for a sales tool`

**Marketing tools**
`best email marketing software`, `recommend an email tool`, `switching from Mailchimp`, `looking for a marketing automation tool`

**Development / Tech**
`recommend a hosting provider`, `best VPS for`, `switching from AWS`, `looking for a developer tool`

**E-commerce**
`best Shopify app for`, `recommend a shipping solution`, `looking for a print on demand`, `switching from Etsy`

**Agencies / Services**
`looking for an agency`, `need help with Facebook ads`, `recommend a freelancer`, `hiring a developer`

**Competitive displacement**
`[competitor name] alternative`, `leaving [competitor name]`, `frustrated with [competitor name]`

***

### Monitor Mode — Track Fresh Intent Over Time

Enable **Track Changes Between Runs** and schedule the actor weekly or daily. Each run records a snapshot. The next run adds a `scoreDelta` field showing how many upvotes each thread gained since last check — rising upvotes on an intent thread means the conversation is still active.

**Practical workflow:** Run on a Monday schedule targeting the past week. Export results to Google Sheets or a CRM via Apify integrations. Each week's run shows net-new threads (`mentionsDelta`) alongside still-active older ones.

Snapshots saved by earlier versions carry over.

***

### Frequently Asked Questions

**How is this different from a generic Reddit scraper?**
Defaults are tuned for lead generation: comments searched alongside posts, sorted newest-first, minimum score at zero, buzz scoring surfaces the freshest high-engagement threads. A generic scraper dumps raw results. This one is set up for your sales workflow out of the box.

**Can I search multiple phrases at once?**
Yes — add as many as you want. Each is searched independently and gets its own summary in the `SUMMARY` record. All results are combined and ranked together by buzz score.

**Why do some results not contain my exact phrase?**
Reddit's search also matches word stems, single words and other fields. The default **Match** (*Words close together*) keeps only rows whose own text holds the phrase's important words within about a sentence of each other; the others aren't delivered and aren't charged. Set it to *Every word of the phrase* or *Exact phrase* to be stricter, or to *Reddit's match (broad)* to get everything Reddit's search finds.

**What subreddits work best for lead gen?**
Depends on your market. B2B: r/entrepreneur, r/startups, r/smallbusiness, r/sales, r/marketing. E-commerce: r/shopify, r/Etsy, r/dropshipping. Tech: r/webdev, r/sysadmin, r/devops. Leave the filter empty to cast the widest net.

**How do I act on the leads?**
Reddit is a community — hard pitching gets downvoted. The best approach is authentic engagement: answer the question helpfully, mention your product as one option, and be transparent about your affiliation. Alternatively, use the threads for prospect research and reach out off-platform.

**Can I connect this to my CRM?**
Yes — Apify integrates natively with Zapier, Make, Google Sheets, and hundreds of other tools. Set up a Zap that imports new results into your CRM after each run.

**Can I schedule it to run automatically?**
Yes. Use Apify's built-in scheduler. Combined with monitor mode, you get a continuous stream of fresh buying intent delivered on schedule.

***

### Related Actors

- [Reddit Scraper](https://apify.com/deepmine/reddit-scraper) — full posts, comment threads, users and communities from any Reddit link or search.
- [Subreddit Finder](https://apify.com/deepmine/reddit-subreddit-finder) and [Subreddit Trend Finder](https://apify.com/deepmine/subreddit-trend-finder) — find the communities worth watching, and what is rising in them
- [Reddit Comments Scraper](https://apify.com/deepmine/reddit-comments-scraper) — paste a result's post link for the whole thread, every comment and reply
- [Reddit Search Scraper](https://apify.com/deepmine/reddit-search-scraper) — plain keyword search over posts and comments

***

*Built for sales teams, SDRs, growth marketers, and agencies who know Reddit is full of warm leads — and want a systematic way to find them.*

# Actor input Schema

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

Phrases people use when they're actively looking to buy, switch, or get a recommendation. Each phrase is searched independently across all of Reddit.

Examples of high-intent phrases:
• "recommend a CRM"
• "switching from Salesforce"
• "looking for project management tool"
• "best email marketing software"
• "anyone use X for Y"

Tip: include your competitor's name to catch people looking to switch away from them. For a brand name that is also an everyday word (Linear, Notion, Slack), add a word that gives it context ("switching from Linear app") or restrict the subreddits below.

## `sortBy` (type: `string`):

How Reddit ranks the results returned for each phrase.

• New — most recent posts first. Best for finding fresh leads before competitors see them.
• Relevance — Reddit's own relevance ranking.
• Top — highest-scored posts. Good for finding high-visibility buying discussions.
• Hot — currently active threads.
• Most Comments — the busiest threads.

Comment search offers New, Relevance and Top; Hot and Most Comments use Relevance there.

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

Only return posts and comments from within this time window. 'Past week' catches fresh intent signals without missing recent discussions. Use 'Past month' for broader coverage of slower-moving buying cycles.

## `searchPosts` (type: `boolean`):

Search Reddit posts (threads, discussions, links) for buying intent phrases. Most high-intent ask posts are top-level posts.

## `searchComments` (type: `boolean`):

Also search individual comments for buying intent phrases. Recommended — many of the best leads are comments like 'anyone know a good X?' buried inside existing threads.

## `subredditFilter` (type: `array`):

Limit results to specific subreddits for more targeted lead gen. Leave empty to search all of Reddit. Examples for B2B SaaS: entrepreneur, startups, smallbusiness, sales. Accepts any format: sales, r/sales, or full URL.

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

Maximum number of posts, and of comments, to collect per intent phrase (each counted after your Minimum Upvote Score). 50 is a good starting point — enough to find real leads without overwhelming your workflow.

## `minScore` (type: `integer`):

Ignore results with fewer upvotes than this. Keep at 0 to catch brand-new posts before anyone else — the freshest leads have no votes yet.

## `matchMode` (type: `string`):

How closely a post or comment must match your phrase. Results that don't match aren't delivered and aren't charged.

• Words close together (default) — the phrase's important words (not a, the, for…; plurals and endings like -ing and -ed count) sit within about a sentence of each other, so "recommend a CRM" keeps "can anyone recommend a good CRM?" and drops a story that mentions a CRM somewhere.
• Every word — the title and text (or the comment) hold every word of the phrase anywhere, in any order.
• Exact phrase — the words in a row, as typed (case, punctuation and line breaks don't matter).
• Reddit's match (broad) — whatever Reddit's search finds for the words, including word stems and other fields. Use it to explore a topic, not to qualify leads: many results only touch the phrase.

## `trackChanges` (type: `boolean`):

Saves a snapshot after each run. On the next run, adds a scoreDelta field showing how much traction each thread has gained. Useful when running weekly — rising upvotes on an intent thread means the conversation is still active and worth engaging.

## `includeSummaryRows` (type: `boolean`):

Every run saves one summary per phrase (total results, top subreddits, top post, buzz breakdown) in the SUMMARY record of the run's key-value store, free. Turn this on to also get those summaries as rows, free, in the run's summary dataset (linked as summaryDataset in the run's OUTPUT record, and in Storage). Only mention rows are charged.

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

Reddit answers Apify's datacenter proxy, so the default works for every plan. If you pick residential, the run still reads through datacenter and keeps residential for retries Reddit refuses there (charged to the run's own proxy traffic only when needed).

## Actor input object example

```json
{
  "keywords": [
    "recommend a CRM",
    "looking for a CRM",
    "alternative to HubSpot",
    "switching from Salesforce"
  ],
  "sortBy": "relevance",
  "timeFilter": "month",
  "searchPosts": true,
  "searchComments": true,
  "subredditFilter": [],
  "maxResultsPerKeyword": 12,
  "minScore": 0,
  "matchMode": "near",
  "trackChanges": false,
  "includeSummaryRows": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `leads` (type: `string`):

No description

## `mentions` (type: `string`):

No description

## `summary` (type: `string`):

No description

## `run` (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 = {
    "keywords": [
        "recommend a CRM",
        "looking for a CRM",
        "alternative to HubSpot",
        "switching from Salesforce"
    ],
    "sortBy": "relevance",
    "timeFilter": "month",
    "maxResultsPerKeyword": 12
};

// Run the Actor and wait for it to finish
const run = await client.actor("deepmine/reddit-lead-gen-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 = {
    "keywords": [
        "recommend a CRM",
        "looking for a CRM",
        "alternative to HubSpot",
        "switching from Salesforce",
    ],
    "sortBy": "relevance",
    "timeFilter": "month",
    "maxResultsPerKeyword": 12,
}

# Run the Actor and wait for it to finish
run = client.actor("deepmine/reddit-lead-gen-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 '{
  "keywords": [
    "recommend a CRM",
    "looking for a CRM",
    "alternative to HubSpot",
    "switching from Salesforce"
  ],
  "sortBy": "relevance",
  "timeFilter": "month",
  "maxResultsPerKeyword": 12
}' |
apify call deepmine/reddit-lead-gen-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,deepmine/reddit-lead-gen-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/c7HOmqeDKC0JV1nfY/builds/x8IytbCIcEU0kJPNz/openapi.json
