Reddit Keyword Alerts: Catch Buying Threads in Slack
Build Reddit keyword alerts that watch subreddits, poll new posts and comments, flag recommendation asks and complaints, and post them to Slack within rules.

Reddit keyword alerts are worth building when a thread titled "any recommendations for a proxy provider?" gets its best replies in the first hour, and you find it three days later. This guide builds the whole monitor in Python: a watchlist of subreddits and terms, polling of new posts and new comments through Reddit's Data API, a request budget driven by Reddit's own rate-limit headers, intent filters that separate buying questions and complaints from noise, and Slack messages your team will actually click. It also covers the access rules that changed in 2025 and 2026, because the anonymous .json trick most tutorials start with no longer works from a server, and Reddit's terms now say why.
The pipeline in one picture
The monitor is a loop with five stages. Each stage hands a small, well-defined object to the next, which makes it easy to test the filters offline against saved text before you ever post to Slack.
watchlist.toml ──► poll (r/a+b+c/new, r/a+b+c/comments) ──► dedupe (SQLite "seen")
│ │
└──── terms, intent rules ──► match + classify ◄──────────┘
│
instant ──► Slack webhook digest ──► daily summary
│
optional: fetch linked pages for context (Scraping API)
| Stage | Input | Output | Fails how |
|---|---|---|---|
| Poll | subreddit group, OAuth token | up to 100 newest items per listing | 401 expired token, 429, 5xx |
| Dedupe | Reddit fullname (`t3_…`, `t1_…`) | only unseen items | gap when you poll too slowly |
| Match | title, selftext, body, link domains | matched term list | false hits on common words |
| Classify | matched text | intent label and route | over-eager regexes |
| Alert | hit record | Slack message | `invalid_payload`, 429 |
Keep the stages separate in code too. When marketing asks why a thread didn't alert, you want to answer "it matched, but the intent rule scored it digest-only" from a database row, not by re-reading a 400-line script.
Settle access before you write code
We tested the usual starting points from a cloud server on 31 October 2026, with an honest, descriptive User-Agent. The results explain why this guide uses the authenticated Data API and not the public listing pages.
| Request | What came back |
|---|---|
| `GET https://www.reddit.com/r/SaaS/new.json?limit=5` | `HTTP/1.1 403 Blocked`, an HTML page reading "You've been blocked by network security." |
| `GET https://old.reddit.com/r/SaaS/new.json` | `302` to `/login/?reason=lor2` |
| `GET https://oauth.reddit.com/r/SaaS/new` with no token | `403` |
| `POST https://www.reddit.com/api/v1/access_token` with no credentials | `401` and `{"message": "Unauthorized", "error": 401}` |
| `GET https://www.reddit.com/robots.txt` | `User-agent: *` followed by `Disallow: /` |
The policy side lines up with those responses. Reddit's User Agreement (effective 1 July 2026) says it conditionally grants "permission to crawl the Services in accordance with the parameters set forth in our robots.txt file, but scraping the Services without Reddit's prior written consent is prohibited." The robots file disallows everything for generic agents. The Data API Terms (last revised 20 July 2026) say you "will not misrepresent or mask either the user agent or OAuth identity", and that "commercial purposes, research in excess of rate limits" need "a separate agreement with Reddit."
Three practical conclusions follow:
- Use OAuth against
oauth.reddit.com. It returns the sameListingJSON as the old.jsonsuffix, so nothing downstream changes. - A lead-generation monitor run by a company is commercial use. Read the Data API Terms with whoever signs your contracts and get the agreement or approval that matches your volume and purpose.
- Rotating IPs to get past the 403 is out. That is exactly the masking and circumvention the terms prohibit, and it would fail the "stays within Reddit rules" test this monitor is built around. Proxies still have a job in this pipeline, just not on Reddit itself (see where SparkProxy fits).
One more access change to plan around. In November 2025 Reddit announced a Responsible Builder Policy in r/redditdev, and multiple reports describe new OAuth apps now needing approval rather than self-service creation. Reddit's help center returned 403 to our fetches, so we could not read the policy text itself; treat the approval step as unverified and check the current flow at reddit.com/prefs/apps before you budget a launch date. If you want the general mechanics of listings, fields and pagination, our guide on how to scrape Reddit data covers them; the rest of this post assumes you have an approved client ID and secret.
Scraping at scale? Skip the blocks.
Fast, unblockable datacentre proxies with unlimited bandwidth.
Write the watchlist as config, not code
The people who know which words matter are rarely the people who deploy the script. Put every term in a TOML file that a marketer can edit in a pull request, and keep the code generic.
# watchlist.toml: our own brand as the example; CompetitorA/B are placeholders
[reddit]
user_agent = "linux:sparkproxy-keyword-monitor:0.3 (by /u/your_username)"
poll_seconds = 90
groups = [
["webscraping", "SaaS", "startups"],
["Python", "dataengineering", "selfhosted"],
]
[terms]
brand = ["sparkproxy", "spark proxy"]
brand_domains = ["sparkproxy.io"]
competitors = ["competitora", "competitorb"]
category = ["proxy provider", "rotating proxies", "datacenter proxies", "scraping api"]
exclude = ["[hiring]", "[for hire]", "job posting"]
[routing]
instant = ["brand", "competitor+complaint", "competitor+switching", "category+recommendation"]
digest = ["category", "competitor"]
Three decisions are baked into that file. Subreddits are grouped, because Reddit accepts several names joined with + in one path (PRAW's documentation shows reddit.subreddit("redditdev+learnpython")), so one request covers three communities. Brand domains are listed separately from brand words, since someone pasting sparkproxy.io/scraping-api/ never types the brand as a word. And routing is declarative: the classifier emits labels, and the config decides which label combinations interrupt a human.
The User-Agent follows the format in Reddit's archived API wiki, , which also carries the line "NEVER lie about your user-agent." Keep it stable and truthful; it is part of your OAuth identity.
Polling new posts and comments with OAuth
A monitor needs two listings per subreddit group: /r/ for submissions and /r/ for the newest comments across those subreddits. The second one matters more than people expect. Plenty of buying signals arrive as a reply in an older thread ("we dropped CompetitorA last month, anyone tried something else?").
Application-only OAuth (grant_type=client_credentials) is enough for read-only listings. Reddit's OAuth2 wiki states that "All bearer tokens expire after 1 hour" and that API calls with a bearer token go to https://oauth.reddit.com, not www.reddit.com.
import os
import time
import tomllib
import requests
with open("watchlist.toml", "rb") as fh:
CFG = tomllib.load(fh)
UA = CFG["reddit"]["user_agent"]
class RedditAuth:
"""Application-only token, refreshed a minute before it expires."""
def __init__(self) -> None:
self.token: str | None = None
self.expires_at = 0.0
def get(self) -> str:
if self.token and time.time() < self.expires_at - 60:
return self.token
r = requests.post(
"https://www.reddit.com/api/v1/access_token",
auth=(os.environ["REDDIT_CLIENT_ID"], os.environ["REDDIT_CLIENT_SECRET"]),
data={"grant_type": "client_credentials"},
headers={"User-Agent": UA},
timeout=20,
)
r.raise_for_status()
body = r.json()
self.token = body["access_token"]
self.expires_at = time.time() + float(body.get("expires_in", 3600))
return self.token
Each poll asks for the newest 100 items and keeps only the ones the database has not seen. The interesting part is gap detection. If every single item in a full page of 100 is new, and this is not the first run, you were too slow: older unseen items have already scrolled past the window. The code walks one or two extra pages with after and logs the gap so you can shorten the interval or split the group.
def poll_listing(group, kind, store, auth, budget, seed=False, max_pages=3):
"""Return unseen posts ('new') or comments ('comments') for a subreddit group."""
path = f"/r/{'+'.join(group)}/{kind}"
fresh, after = [], None
for page in range(max_pages):
params = {"limit": 100}
if after:
params["after"] = after
listing = reddit_get(path, params, auth, budget)["data"]
children = [c["data"] for c in listing["children"]]
unseen = [d for d in children if not store.seen(d["name"])]
fresh.extend(unseen)
if len(unseen) < len(children) or not listing.get("after"):
break # reached items we already know: no gap
if seed:
break # first run: seed, don't backfill
after = listing["after"]
print(f"gap warning: {path} page {page + 1} was 100% unseen")
return fresh
On the first run the monitor should seed the seen table silently and alert on nothing, otherwise Slack gets 200 stale messages at once. The seed flag above handles the backfill half of that; the main loop handles the alert half.
If you would rather not manage tokens and pagination yourself, PRAW 8.0.3 (released 12 August 2026) wraps the same endpoints. Its SubredditStream.comments() docs say "Up to 100 historical comments will initially be returned" and warn that high-volume streams "may drop some comments." The raw approach above gives you the gap warning that a stream hides.
Spend the rate limit by reading the headers
Hard-coding a sleep is the most common mistake in Reddit monitors. The ceiling has changed before: Reddit's archived wiki says 60 requests per minute for OAuth clients, while the current Data API wiki is widely quoted at 100 queries per minute per OAuth client ID averaged over 10 minutes. We could not load the current wiki page today (403), so treat both numbers as history and let the server tell you. Every OAuth response carries X-Ratelimit-Used, X-Ratelimit-Remaining and X-Ratelimit-Reset.
class Budget:
"""Spend the per-client allowance the server reports, never a guessed one."""
def __init__(self, floor: float = 5) -> None:
self.remaining: float | None = None
self.reset_at = 0.0
self.floor = floor
def wait(self) -> None:
if self.remaining is not None and self.remaining <= self.floor:
time.sleep(max(0.0, self.reset_at - time.time()) + 1)
def update(self, headers) -> None:
try:
self.remaining = float(headers["X-Ratelimit-Remaining"])
self.reset_at = time.time() + float(headers["X-Ratelimit-Reset"])
except (KeyError, ValueError):
pass
def reddit_get(path, params, auth, budget, tries=4):
for attempt in range(tries):
budget.wait()
r = requests.get(
f"https://oauth.reddit.com{path}",
params={**params, "raw_json": 1},
headers={"Authorization": f"bearer {auth.get()}", "User-Agent": UA},
timeout=20,
)
budget.update(r.headers)
if r.status_code == 401:
auth.token = None # expired or revoked: fetch a new one
continue
if r.status_code == 429:
time.sleep(float(r.headers.get("Retry-After", 5 * 2 ** attempt)))
continue
if r.status_code >= 500:
time.sleep(5 * 2 ** attempt)
continue
r.raise_for_status()
return r.json()
raise RuntimeError(f"giving up on {path} after {tries} tries")
raw_json=1 asks Reddit for unescaped text, so a title arrives as Q&A instead of Q&A; prawcore sets the same parameter on every request. The budget math for this watchlist is small: two groups times two listings is four requests per cycle, and a 90-second cycle averages under three requests a minute. Grouping is what keeps it small. Six subreddits polled separately would be twelve requests per cycle for the same coverage.
There is no IP rotation in this function on purpose. Reddit's limit is counted per OAuth client, so a different exit IP buys nothing, and the terms forbid masking the identity anyway. If you need more headroom than your client gets, the fix is a slower interval, fewer groups or a conversation with Reddit.
Keyword matching that survives real Reddit text
Reddit text is Markdown with links, quotes, code and the occasional all-caps rant. A naive "spark proxy" in text.lower() misses "Spark-Proxy", fires on "sparkproxyhub" and never sees a pasted URL. The matcher below strips quoted lines (a reply quoting someone else's brand mention is not a new mention), keeps link text, collects link domains separately, and compiles each term into a boundary-aware pattern where spaces also match hyphens.
import html
import re
from urllib.parse import urlparse
LINK = re.compile(r"\[([^\]]*)\]\((https?://[^)\s]+)\)")
BARE_URL = re.compile(r"https?://[^\s)\]]+")
def prepare(item: dict) -> tuple[str, list[str]]:
raw = "\n".join(filter(None, [item.get("title"), item.get("selftext"), item.get("body")]))
raw = html.unescape(raw)
urls = [m.group(2) for m in LINK.finditer(raw)] + BARE_URL.findall(raw)
text = LINK.sub(r"\1", raw)
text = "\n".join(line for line in text.splitlines() if not line.lstrip().startswith(">"))
domains = sorted({urlparse(u).netloc.lower().removeprefix("www.") for u in urls})
return text, domains
def compile_terms(terms: list[str]) -> list[re.Pattern]:
pats = []
for term in terms:
body = r"[\s\-]+".join(re.escape(part) for part in term.split())
pats.append(re.compile(rf"(?<![\w-]){body}(?![\w-])", re.IGNORECASE))
return pats
def find_terms(text: str, pats: list[re.Pattern]) -> list[str]:
return [m.group(0) for p in pats if (m := p.search(text))]
We ran these functions against hand-written samples before trusting them. "Spark-Proxy keeps timing out" matched spark proxy; "sparkproxyhub.net is a different site" did not match sparkproxy; and a reply whose only mention sat on a > quoted line produced no hit. Your brand will have its own traps. A product called "Notion" or "Linear" collides with English, and for those the only reliable gate is requiring a second signal, such as a category word in the same item.
Exclusions run before anything else. A post tagged [Hiring] that mentions rotating proxies is a job ad, and forwarding it to sales teaches the channel to ignore the bot.
Intent filters: recommendation asks, complaints, switching
A keyword hit tells you a topic came up. Intent tells you whether someone is about to spend money. Three intents cover most of the value for a SaaS team, and each has a recognisable phrasing pattern.
| Intent | Typical phrasing | Why it matters |
|---|---|---|
| recommendation | "any recommendations for", "looking for a", "what do you all use for", "alternative to" | Active buyer, comparison stage |
| complaint | "frustrated with", "doesn't work", "price increase", "cancelling my subscription" | Churn risk if it's you, opening if it's a rival |
| switching | "switching from", "moving off", "migrating away from" | Decision already half made |
INTENT_RULES = {
"recommendation": [
r"\b(any|can (you|anyone)|could (you|anyone))\s+recommend",
r"\blooking for (a|an|some)\b",
r"\bwhat (do|does) (you( all| guys)?|y'?all|everyone|people) use\b",
r"\balternatives? (to|for)\b",
r"\b(suggestions?|recs)\b[^.?!]{0,60}\?",
],
"complaint": [
r"\b(frustrat(ed|ing)|fed up|annoyed)\b",
r"\b(doesn'?t|does not|won'?t|stopped) work(ing)?\b",
r"\bprice (hike|increase)\b",
r"\bcancel(l?ing|l?ed)? (my|our) (subscription|plan|account)\b",
],
"switching": [
r"\b(switch(ing)?|mov(e|ing)|migrat(e|ing))\s+(away\s+)?(from|off)\b",
],
}
COMPILED = {k: [re.compile(p, re.IGNORECASE) for p in v] for k, v in INTENT_RULES.items()}
def classify(text: str) -> set[str]:
return {name for name, pats in COMPILED.items() if any(p.search(text) for p in pats)}
def route(hit_types: set[str], intents: set[str], rules: dict) -> str | None:
labels = set(hit_types)
labels |= {f"{h}+{i}" for h in hit_types for i in intents}
if labels & set(rules["instant"]):
return "instant"
if labels & set(rules["digest"]):
return "digest"
return None
On our test set, "Can anyone recommend a proxy provider for a 3-person scraping team?" came out as category+recommendation and routed instant. "CompetitorA raised prices again, we're switching from them next month" came out as competitor+switching, also instant. "Wrote a blog post about how rotating proxies work" matched the category but no intent, so it went to the digest. The run also caught a bug in our first draft: "what do you all use for rotating proxies?" slipped through as digest-only, because the pattern allowed "you" or "y'all" but not "you all". Test your rules against real phrasing from the subreddits you watch, not the sentences you imagined while writing them. That three-way split (instant, digest, drop) matters more than squeezing the regexes. Most teams tolerate a noisy daily digest; very few tolerate a noisy real-time channel for more than a week.
Regexes miss sarcasm and indirect asks. If precision matters more than cost, add a second-pass classifier on the small set of keyword hits only, never on the raw firehose. Keep the regex labels in the stored row either way, so you can measure what the second pass changed.
Slack messages people act on
An incoming webhook is the simplest delivery path: one URL per channel, a JSON POST, and a plain-text ok on success. Slack's documentation is blunt about the URL itself: "Your webhook URL contains a secret," and "Slack actively searches out and revokes leaked secrets." Keep it in an environment variable, never in watchlist.toml.
Two Slack rules shape the sender. Slack's rate-limit page lists incoming webhooks at "1 per second" with "Short bursts >1 allowed," and returns HTTP 429 with a Retry-After header when you exceed it. And Slack treats &, < and > as control characters, so Reddit text has to be converted to &, < and > or a title like "CompetitorA <3" breaks the message.
SLACK_NO_RETRY = {"invalid_payload", "no_text", "channel_is_archived", "action_prohibited",
"channel_not_found", "no_service", "invalid_token"}
def slack_escape(s: str) -> str:
return s.replace("&", "&").replace("<", "<").replace(">", ">")
def send_slack(hit: dict, webhook: str) -> bool:
link = f"https://www.reddit.com{hit['permalink']}"
excerpt = slack_escape(hit["text"][:300])
labels = ", ".join(sorted(hit["labels"]))
payload = {
"text": f"Reddit {labels}: r/{hit['subreddit']}", # fallback for notifications
"blocks": [
{"type": "section", "text": {"type": "mrkdwn",
"text": f"*<{link}|{slack_escape(hit['title'] or 'comment')}>*\n{excerpt}"}},
{"type": "context", "elements": [{"type": "mrkdwn",
"text": f"r/{hit['subreddit']} · {labels} · terms: {slack_escape(', '.join(hit['terms']))}"}]},
],
}
for attempt in range(3):
r = requests.post(webhook, json=payload, timeout=10)
if r.status_code == 200:
time.sleep(1.1) # stay under one message per second per channel
return True
if r.status_code == 429:
time.sleep(float(r.headers.get("Retry-After", 2)))
continue
if r.text.strip() in SLACK_NO_RETRY:
print(f"slack rejected alert permanently: {r.status_code} {r.text}")
return False
time.sleep(2 ** attempt)
return False
The no-retry set comes straight from Slack's webhook error list: invalid_payload means the request is malformed, channel_is_archived means the channel stopped accepting messages, and action_prohibited usually means an admin restricted the webhook. Retrying any of those just repeats the failure.
Put the labels in the context line. When someone in sales sees "competitor+switching" before reading the excerpt, they know whether to open it now or after lunch. Send the digest route as a single message at a fixed time, grouped by subreddit, so the 1-per-second limit never comes into play there.
Storage, deletions and scheduling
SQLite is enough for one team's watchlist. Two tables carry the state: seen for dedupe, hits for anything that matched.
import sqlite3
class Store:
def __init__(self, path: str = "monitor.db") -> None:
self.db = sqlite3.connect(path)
self.db.executescript("""
CREATE TABLE IF NOT EXISTS seen (fullname TEXT PRIMARY KEY, first_seen REAL);
CREATE TABLE IF NOT EXISTS hits (
fullname TEXT PRIMARY KEY, subreddit TEXT, route TEXT, labels TEXT,
terms TEXT, permalink TEXT, created_utc REAL, alerted INTEGER DEFAULT 0);
""")
def is_empty(self) -> bool:
return self.db.execute("SELECT 1 FROM seen LIMIT 1").fetchone() is None
def seen(self, fullname: str) -> bool:
return self.db.execute("SELECT 1 FROM seen WHERE fullname = ?", (fullname,)).fetchone() is not None
def mark(self, fullnames: list[str]) -> None:
now = time.time()
self.db.executemany("INSERT OR IGNORE INTO seen VALUES (?, ?)", [(f, now) for f in fullnames])
self.db.commit()
def prune(self, days: int = 7) -> None:
self.db.execute("DELETE FROM seen WHERE first_seen < ?", (time.time() - days * 86400,))
self.db.commit()
Store the fullname, permalink and labels, not the full text. Reddit's Data API Terms tell you not to "use or retain any User Content … beyond your approved use case" and to "immediately delete any data not required for it." A daily job can re-check stored hits through /api/info (PRAW batches that call in groups of 100 fullnames) and drop rows whose author has become [deleted] or whose body reads [removed].
def purge_deleted(store, auth, budget):
names = [r[0] for r in store.db.execute("SELECT fullname FROM hits")]
for i in range(0, len(names), 100):
batch = names[i:i + 100]
data = reddit_get("/api/info", {"id": ",".join(batch)}, auth, budget)
for child in data["data"]["children"]:
d = child["data"]
if d.get("author") == "[deleted]" or d.get("body") == "[removed]" or d.get("selftext") == "[removed]":
store.db.execute("DELETE FROM hits WHERE fullname = ?", (d["name"],))
store.db.commit()
The main loop ties it together, including the silent first run:
def run_cycle(store, auth, budget, pats, webhook):
first_run = store.is_empty()
terms, rules = CFG["terms"], CFG["routing"]
excl = compile_terms(terms["exclude"])
for group in CFG["reddit"]["groups"]:
for kind in ("new", "comments"):
items = poll_listing(group, kind, store, auth, budget, seed=first_run)
store.mark([d["name"] for d in items])
if first_run:
continue
for d in items:
text, domains = prepare(d)
if find_terms(text, excl):
continue
found = {k: find_terms(text, p) for k, p in pats.items()}
hit_types = {k for k, v in found.items() if v}
if set(domains) & set(terms["brand_domains"]):
hit_types.add("brand")
where = route(hit_types, classify(text), rules)
if where is None:
continue
hit = {"permalink": d["permalink"], "subreddit": d["subreddit"],
"title": d.get("title") or d.get("link_title"), "text": text,
"labels": hit_types | classify(text), "terms": sum(found.values(), [])}
store.db.execute("INSERT OR IGNORE INTO hits VALUES (?,?,?,?,?,?,?,0)",
(d["name"], d["subreddit"], where, ",".join(sorted(hit["labels"])),
",".join(hit["terms"]), d["permalink"], d["created_utc"]))
if where == "instant":
send_slack(hit, webhook)
store.db.commit()
pats is built once at start-up as {"brand": compile_terms(...), "competitor": ..., "category": ...}. For scheduling, a long-running process with time.sleep(CFG["reddit"]["poll_seconds"]) between cycles under systemd is simpler than cron, because the token, budget and compiled patterns stay in memory:
# /etc/systemd/system/reddit-alerts.service
[Service]
EnvironmentFile=/etc/reddit-alerts.env
WorkingDirectory=/opt/reddit-alerts
ExecStart=/usr/bin/python3 monitor.py
Restart=always
RestartSec=30
Run the digest and the deletion purge as a separate daily timer so a slow purge never delays an instant alert.
Where SparkProxy fits, and where it does not
Be clear about this before buying anything. Proxies do not belong between this monitor and Reddit. The limit is per OAuth client, the terms prohibit masking identity, and the anonymous endpoints are closed to servers anyway.
Where a proxy or the Scraping API earns its place is on the far side of the alert: the links people paste into the threads you caught. A "which proxy provider?" thread often contains links to three competitors' pricing pages, a review site and the poster's own company. Fetching those pages turns a bare alert into context ("poster runs a 12-person agency, linked CompetitorA's team plan"). That is ordinary public-web fetching, not Reddit access, and the code below refuses any reddit.com or redd.it URL.
import base64
BLOCKED_HOSTS = ("reddit.com", "redd.it")
def enrich_links(urls: list[str]) -> dict[str, str | None]:
"""Fetch page titles for links found in a hit. One batch call = 1 credit."""
urls = [u for u in urls
if "," not in u # the url parameter is comma-separated
and not urlparse(u).netloc.lower().endswith(BLOCKED_HOSTS)][:10]
if not urls:
return {}
r = requests.get(
"https://scrape.sparkproxy.io/api/v1",
headers={"X-API-Key": os.environ["SPARKPROXY_API_KEY"]},
params={"url": ",".join(urls), "render_js": "false"}, # batch requires render_js=false
timeout=60,
)
r.raise_for_status()
titles = {}
for res in r.json()["results"]:
body = res.get("body") or ""
if res.get("success") and "<" not in body[:200]:
try:
body = base64.b64decode(body).decode("utf-8", "replace")
except ValueError:
pass
m = re.search(r"<title[^>]*>(.*?)</title>", body, re.IGNORECASE | re.DOTALL)
titles[res["url"]] = html.unescape(m.group(1).strip()) if m else None
return titles
The SparkProxy docs say batch mode "only works with render_js=false" and that "The whole batch costs 1 credit regardless of URL count." The docs show a body field in each result without stating its encoding, so the function checks for HTML before trying base64 rather than assuming. Leave render_js out and you get the default, which is true (5 credits) and rejects batches with "Batch scraping (multiple URLs) requires render_js=false." Add country_code (+5 credits) only when a pricing page varies by region, for example to see a competitor's US price list.
If you would rather fetch links with your own requests code, route it through the proxy gateway instead:
proxies = {
"http": f"http://{os.environ['SP_USER']}:{os.environ['SP_PASS']}@gateway.sparkproxy.io:11000",
"https": f"http://{os.environ['SP_USER']}:{os.environ['SP_PASS']}@gateway.sparkproxy.io:11000",
}
page = requests.get("https://www.sparkproxy.io/scraping-api/", proxies=proxies, timeout=20)
Random Rotation (port 11000) gives each request a fresh IP and suits one-off title fetches. Sticky Sessions hold one IP for 5 minutes, which you only need when a linked site sets a cookie on one page and checks it on the next; the port is shown in your dashboard, and what is a sticky session proxy explains the mechanics. Put the country in the username (the homepage example is user-country-us). Concurrency of 2 is plenty for an alert stream. The same split between monitoring and enrichment shows up on other platforms too, which our post on using proxies for social media monitoring covers across networks, and review sites have their own quirks covered in review monitoring and sentiment analysis.
Failure modes and monthly cost
| Symptom | Cause | Fix | Proxy helps? |
|---|---|---|---|
| `403 Blocked`, "You've been blocked by network security." | Anonymous `.json` request from a server | Use OAuth on `oauth.reddit.com` | No, and rotating around it breaks the terms |
| `302` to `/login/?reason=lor2` | Anonymous request to old.reddit | Same | No |
| `{"message": "Unauthorized", "error": 401}` | Missing or wrong client ID/secret | Check env vars, app type, approval status | No |
| `401` mid-run | Token past its 1-hour life | Refresh on 401 (handled above) | No |
| `429` from Reddit | Budget spent | Honor `Retry-After`, slow the cycle, merge groups | No, the limit is per client |
| "gap warning" in logs | Interval too long for the group's traffic | Shorten interval or split the group | No |
| Slack `invalid_payload` | Malformed blocks, often unescaped `<` | `slack_escape()` every Reddit string | No |
| Slack `429` | More than one message per second | Sleep between sends, move volume to the digest | No |
| Linked page returns 403 or a challenge | Site blocks your server's IP range | Scraping API or Random Rotation | Yes |
| Batch call returns 422 | `render_js` left at default `true` | Pass `render_js=false` | n/a |
The cost picture, with prices read from SparkProxy's site on 31 October 2026 in US dollars:
| Item | What it costs | Notes |
|---|---|---|
| Reddit Data API | Depends on your agreement | Commercial use needs a separate agreement per the Data API Terms; we can't quote a figure |
| Slack incoming webhook | No per-message price in Slack's webhook docs | Check your own workspace plan |
| Hosting | One small always-on Linux box | The loop is idle most of the time |
| Link enrichment, Scraping API | 1,000 free credits, then Starter at $49/month for 250K credits | One batch of up to 10 links is 1 credit, so a few hundred alerts a month fits in the free credits |
| Link enrichment, proxy plan | Starting from $75/month, unlimited bandwidth | Billed by plan and threads, not traffic; only worth it if you also run other scraping jobs |
For a single SaaS team, the realistic setup is the Scraping API's free credits for enrichment and no proxy plan at all. The proxy plan makes sense when the same team already scrapes pricing pages or SERPs and the alert enrichment simply shares those threads. Teams building a wider prospecting stack around signals like these may also want our notes on proxies for lead generation.
Frequently asked questions
FAQ
Register an OAuth app with Reddit, put your subreddits and terms in a config file, poll /r/ and /r/ with an application-only token, and post matches to a Slack incoming webhook. The code in this guide runs on Python 3.11 or newer with only requests installed, though commercial use still needs whatever agreement Reddit requires for your purpose.
Not from a server, in our test. On 31 October 2026 www.reddit.com/r/SaaS/new.json returned 403 Blocked with "You've been blocked by network security," and the old.reddit version redirected to a login page. Reddit's User Agreement also prohibits scraping without prior written consent, so use the authenticated Data API.
Every 60 to 120 seconds works for most subreddit groups, and the right number is the one that stops the gap warning from firing. If a full page of 100 items comes back entirely unseen, you missed some, so shorten the interval or split the group into smaller ones.
No. Reddit counts its rate limit per OAuth client, so extra IPs add nothing, and its terms forbid masking your identity. Proxies or the SparkProxy Scraping API are useful one step later, for fetching the external pages people link in the threads you catch.
Combine a category keyword list with intent patterns such as "any recommendations for", "looking for a", "what do you all use" and "alternative to". Route category plus recommendation matches to an instant Slack alert and category-only matches to a daily digest, so the real-time channel stays quiet enough that people keep reading it.
Include comments. Many switching and complaint signals arrive as replies in older threads, and the /r/ listing returns the newest comments across every subreddit in the group in a single request, so it costs one extra call per cycle.
Get 20% off your first month
Premium datacentre proxies with unlimited bandwidth. Use the code at checkout.
Save up to 15% more on quarterly, half-yearly and yearly plans
Related articles

How to Bulk Check Google Index Status for Thousands of URLs
Bulk check Google index status past the 2,000-a-day URL Inspection API quota: impressions first, inspections next, proxied site: checks, and a reasons report.

Cloud Run Static Outbound IP for Proxy Whitelisting
Set a Cloud Run static outbound IP with Cloud NAT and whitelist it on your proxy, or skip NAT with user:pass auth. Commands, egress check, NAT ports and costs.

Crawl4AI Proxy Configuration, Rotation and Sticky Sessions
Set up a Crawl4AI proxy with authentication, rotate exits across runs, pin session_id crawls to Sticky Sessions, and catch blocks that return success=True.
