API Reference
Integrate buying intent signals from Reddit and Hacker News into your product.
1. Generate an API key from Settings.
2. Add the key to all requests:
Authorization: Bearer YOUR_API_KEY
3. Base URL:
https://threadleads-b445.vercel.app/api/v1
Scan Reddit and Hacker News for threads matching your keywords. Returns scored threads with buying intent analysis.
Request Body
Example Request
curl -X POST https://threadleads-b445.vercel.app/api/v1/scan \
-H "Authorization: Bearer tl_live_abc123..." \
-H "Content-Type: application/json" \
-d '{"keywords": ["AI customer support", "automate lead gen"], "days": 7}'Example Response
{
"threads": [
{
"title": "Ask HN: Best tool for automating lead generation?",
"url": "https://news.ycombinator.com/item?id=12345",
"source": "hn",
"subreddit": null,
"score": 87,
"urgency": "high",
"score_reason": "User actively seeking automation tool for lead generation.",
"created_at": "2026-03-27T10:00:00Z"
}
]
}Retrieve your scored threads with filtering and pagination.
Query Parameters
Example Request
curl "https://threadleads-b445.vercel.app/api/v1/threads?min_score=60&source=reddit&limit=10" \ -H "Authorization: Bearer tl_live_abc123..."
Example Response
{
"threads": [
{
"id": "uuid-here",
"title": "Looking for an AI tool to help with customer support",
"url": "https://www.reddit.com/r/SaaS/comments/...",
"source": "reddit",
"subreddit": "SaaS",
"score": 92,
"urgency": "high",
"score_reason": "Strong buying signal...",
"reply_generated": false,
"marked_done": false,
"created_at": "2026-03-27T08:30:00Z"
}
],
"total": 47,
"limit": 10,
"offset": 0
}Generate an expert AI reply for a forum thread.
Request Body
Example Request
curl -X POST https://threadleads-b445.vercel.app/api/v1/reply \
-H "Authorization: Bearer tl_live_abc123..." \
-H "Content-Type: application/json" \
-d '{"title": "Best way to automate forum lead gen?", "content": "I spend 2 hours daily...", "product_mention": "Acme (acme.com) - automates lead gen"}'Example Response
{
"reply": "I ran into this exact problem last year. What worked for me was focusing on specific pain-point phrases rather than broad keywords. Instead of searching for 'marketing tool' I searched for 'tired of manually finding leads' and the hit rate jumped from 2% to about 15%. The key is matching the language people actually use when they're frustrated, not industry jargon. What kind of product are you generating leads for?"
}JavaScript / Node.js
const res = await fetch("https://threadleads-b445.vercel.app/api/v1/scan", {
method: "POST",
headers: {
"Authorization": "Bearer tl_live_abc123...",
"Content-Type": "application/json",
},
body: JSON.stringify({
keywords: ["AI customer support", "automate outreach"],
days: 7,
}),
});
const { threads } = await res.json();
console.log(`Found ${threads.length} high-intent threads`);Python
import requests
res = requests.post(
"https://threadleads-b445.vercel.app/api/v1/scan",
headers={"Authorization": "Bearer tl_live_abc123..."},
json={"keywords": ["AI customer support"], "days": 7},
)
threads = res.json()["threads"]
for t in threads:
print(f"{t['score']}/100 — {t['title']}")