Build a Lead Generation Tool That Finds High-Intent Buyers on Reddit

"Alternative to Notion?" "What do you use for invoicing?" "Looking for recommendations on a CRM." Each of those posts is someone with a problem and a reason to act now. They are also buried among thousands of posts that mention the same words for no reason.

This guide builds a lead finder in Python. It searches the subreddits you pick for buying-intent phrases, keeps only posts where the phrase really appears near the top, drops posts from people selling their own product, scores what is left, and saves a ranked CSV. It uses one SteadyAPI endpoint and under 100 lines of code.

Prerequisites

  • A SteadyAPI API key from steadyapi.com. One run of the script costs 9 requests.
  • Python 3.8+ with requests.

How the search endpoint behaves

GET /v1/reddit/search (weight 1) takes a required search term. These optional parameters matter here:

  • subreddit: limit the search to one community.
  • filter: posts (the default) or comments.
  • cursor: the value from meta.cursor, to ask for older results.

I ran the three phrases below against r/SaaS and r/smallbusiness and counted what came back:

  • Each call returns up to 25 results, but only some contain your phrase. In my runs, between 0 and 6 of 25 results held the exact words. Search is fuzzy, so the script checks the text itself.
  • Searching one subreddit gives fresher results. Without subreddit, the same kind of search returned posts about 40 days old. With it, results ranged from a few hours to about a month, so the script keeps posts up to 30 days old.
  • Do not rely on score from search. Many posts showed a score of 0 or 1, which looks stale. The script scores intent from the text instead.

The lead finder

For each subreddit and phrase, the script runs a search. It then keeps a post only if the phrase appears in the title or the first 300 characters of the body, the title does not look like a launch post ("I built", "MRR"), and the post is under 30 days old. Each lead gets a score from four signals:

  • A question mark in the title: +2.
  • Money talk such as "price", "budget", "free" or "per month": +2.
  • Five or fewer comments, so the question may still be open: +1.
  • Posted in the last 7 days: +1.
import csv
import html
import os
import re
import time

import requests

BASE = "https://api.steadyapi.com"
API = f"{BASE}/v1/reddit"
HEADERS = {"Authorization": f"Bearer {os.environ['STEADYAPI_KEY']}"}

SUBREDDITS = ["SaaS", "smallbusiness", "startups"]
PHRASES = ["alternative to", "looking for recommendations", "what do you use for"]
TOPIC_WORDS = []  # optional: ["crm", "invoice"] keeps only posts that mention one of these
MAX_AGE_DAYS = 30

BUDGET = re.compile(r"\b(price|pricing|cost|budget|afford|cheap|free|paid|per month)\w*", re.I)
PROMO = re.compile(r"\b(i built|i made|we built|we made|launch|my story|mrr)\b", re.I)  # sellers, not buyers


def call(path, **params):
    failures = 0
    for attempt in range(4):
        r = requests.get(f"{API}/{path}", headers=HEADERS, params=params, timeout=90)
        if r.status_code in (429, 500, 502, 503):
            time.sleep(2 ** attempt)
            continue
        r.raise_for_status()
        data = r.json()
        if data.get("success") is False:
            failures += 1
            if failures < 2:
                time.sleep(2)  # some requests fail once and then work, so retry one time
                continue
            raise ValueError(data["message"])
        return data
    raise RuntimeError(f"{path} failed after retries")


def score_lead(post, age_days):
    title = html.unescape(post["title"])
    points = 0
    if "?" in title:
        points += 2  # a question is a buyer asking for help
    if BUDGET.search(title + " " + (post.get("selftext") or "")):
        points += 2  # money talk means a purchase is on the table
    if (post.get("num_comments") or 0) <= 5:
        points += 1  # few replies: the question may still be open
    if age_days <= 7:
        points += 1
    return points


def find_leads():
    leads = {}
    for sub in SUBREDDITS:
        for phrase in PHRASES:
            try:
                posts = call("search", search=phrase, subreddit=sub, filter="posts")["body"]
            except ValueError:
                continue  # skip a search that fails twice
            for p in posts:
                # search is fuzzy, so keep only exact phrase matches near the top of the post
                text = html.unescape(p["title"] + " " + (p.get("selftext") or "")[:300]).lower()
                if phrase not in text or PROMO.search(p["title"]):
                    continue
                if TOPIC_WORDS and not any(w in text for w in TOPIC_WORDS):
                    continue
                age_days = (time.time() - p["created_utc"]) / 86400
                if age_days > MAX_AGE_DAYS or p["id"] in leads:
                    continue
                leads[p["id"]] = {
                    "score": score_lead(p, age_days),
                    "age_days": round(age_days, 1),
                    "subreddit": p["subreddit"],
                    "phrase": phrase,
                    "title": html.unescape(p["title"]),
                    "url": "https://www.reddit.com" + p["permalink"],
                }
    return sorted(leads.values(), key=lambda lead: (-lead["score"], lead["age_days"]))


def save(leads, path="leads.csv"):
    with open(path, "w", newline="", encoding="utf-8") as f:
        w = csv.DictWriter(f, fieldnames=["score", "age_days", "subreddit", "phrase", "title", "url"])
        w.writeheader()
        w.writerows(leads)


if __name__ == "__main__":
    leads = find_leads()
    save(leads)
    print(f"{len(leads)} leads saved to leads.csv")
    for lead in leads[:10]:
        print(f"[{lead['score']}] r/{lead['subreddit']} {lead['age_days']}d  {lead['title'][:80]}")
        print(f"     matched '{lead['phrase']}'  {lead['url']}")

Run it:

export STEADYAPI_KEY="your_api_key"
python reddit_lead_finder.py

Real output

This is the top of a run over those three subreddits. Posts change by the hour, so yours will differ.

9 leads saved to leads.csv
[6] r/SaaS 4.2d  Developers building SaaS products, what do you use for transactional emails?
     matched 'what do you use for'  https://www.reddit.com/r/SaaS/comments/1xznjmd/developers_building_saas_products_what_do_you_use/
[4] r/SaaS 19.7d  Australia: What LinkedIn + Email automation tools are small businesses and start
     matched 'looking for recommendations'  https://www.reddit.com/r/SaaS/comments/1xmlkbd/australia_what_linkedin_email_automation_tools/
[3] r/SaaS 22.2d  Looking for Affordable Image & Video Content Moderation API Recommendations
     matched 'looking for recommendations'  https://www.reddit.com/r/SaaS/comments/1xkhwlb/looking_for_affordable_image_video_content/

Nine requests produced nine leads, and not all of them are good. One result, a post about bring-your-own-key adoption, matched "alternative to" in its body text and scored 5, even though it is not a buying question. Treat the CSV as a reading list for a person, not a list to act on automatically. A lead from three weeks ago is also probably answered already, so sort by age when you read it.


Make it fit your product

  • Change PHRASES to the way your customers ask. "Anyone know a tool for" and "is there a free" both work, and each costs 1 request per subreddit.
  • Set TOPIC_WORDS to your category, such as ["crm", "invoice"], so a generic phrase only counts when it appears next to your topic. Without it, the output includes everything from payroll to supplier searches.
  • Add the exact competitor names as phrases ("alternative to hubspot") for the highest-intent matches.

Use the leads responsibly

A lead is a person asking a question. Read the thread, then answer the question first. Follow each subreddit's self-promotion rules, say who you are if you mention your own product, and do not send unprompted DMs or post replies automatically. Reddit also has its own terms about using its data in commercial products, so read them for your use case before you build a business on it.


Cost

One run costs 9 requests: 3 subreddits times 3 phrases, at weight 1 each. SteadyAPI caches identical searches for about 15 minutes, so running more often than that returns the same results. A run every 6 hours is 36 requests a day, or about 1,080 a month, which fits the Starter plan ($14.99/mo, 10,000 requests). The Free plan's 500 requests a month covers about 55 runs. The standard rate limit is 10 requests per second per account, and only HTTP 200 responses count toward your quota.


Bonus: ask the question directly

If you use Claude Code, Cursor, VS Code, or any MCP client, you can connect it to https://api.steadyapi.com/mcp with your API key. Then you can ask for recent "alternative to" posts in a subreddit in plain English, before you build the script.


Conclusion

You searched three subreddits for buying phrases, filtered out fuzzy matches and promotional posts, scored the rest on four signals, and saved a ranked CSV to read each morning. Tune the phrases and topic words, and the same script works for any product.

Create a free account at steadyapi.com (no card required) and run it against the communities where your buyers ask for help. The API documentation lists every Reddit parameter with ready-made examples in cURL, JavaScript, PHP, and Python.