1. Incremental Buyer-Intent Polling Loop
Store a single Unix timestamp cursor in Redis or SQLite and poll /v1/posts/search every 5 minutes.
| New Matching Leads / Month | Empty Polls Cost | Matched Leads Cost | Total Monthly Cost |
|---|---|---|---|
| 150 high-intent posts | $0.00 (0 Credits) | 300 Credits ($0.03) | $0.03 / month |
| 1,500 high-intent posts | $0.00 (0 Credits) | 3,000 Credits ($0.30) | $0.30 / month |
| 15,000 high-intent posts | $0.00 (0 Credits) | 15,000 Credits ($1.50) | $1.50 / month |
5-Minute High-Intent Reddit Lead Monitor
Polls buyer-intent queries and forwards qualified leads to a Slack incoming webhook.
curl "https://api.forumdataapi.com/v1/posts/search?query=%22alternative+to%22+crm&sort=new&time_filter=day&limit=25" \
-H "x-api-key: rd_live_your_api_key"import time, requests
API_KEY = "rd_live_your_api_key"
SLACK_WEBHOOK = "https://hooks.slack.com/services/..."
last_utc = int(time.time()) - 3600
resp = requests.get(
"https://api.forumdataapi.com/v1/posts/search",
params={"query": '"alternative to" OR "switching from" datadog', "sort": "new", "time_filter": "day", "since": last_utc, "limit": 25},
headers={"x-api-key": API_KEY},
).json()
for post in resp["data"]["items"]:
last_utc = max(last_utc, post["created_utc"] or last_utc)
requests.post(SLACK_WEBHOOK, json={"text": f"[{post['subreddit_name_prefixed']}] {post['title']} — {post['permalink']}"})const since = Math.floor(Date.now() / 1000) - 3600;
const q = encodeURIComponent('"alternative to" OR "looking for" status page');
const res = await fetch(
`https://api.forumdataapi.com/v1/posts/search?query=${q}&sort=new&time_filter=day&since=${since}&limit=25`,
{ headers: { "x-api-key": process.env.REDDIT_API_KEY } },
);
const { data, meta } = await res.json();
console.log({ matched: data.count, creditsUsed: meta.credits_used });{
"code": 0,
"provider": "https://forumdataapi.com",
"status": "ok",
"data": {
"items": [],
"count": 0,
"next_cursor": null,
"has_more": false
},
"meta": {
"endpoint": "/v1/posts/search",
"credits_used": 0,
"cache_hit": false,
"latency_ms": 164
}
}Interactive Engineering Workbench · GET /v1/posts/search
Verify real-time latency, pagination math & JSON schema
Frequently Asked Questions
- Does polling every 5 minutes burn through my credits if nobody posts?
- No. Whenever /v1/posts/search returns 0 matching posts, ForumData API charges 0 Credits.