Keep the question with its answers
Store the post title and body in the same chunk as the comments that respond to it.
Reddit is where people write down what actually happened when they tried something. To use it for grounding, retrieve whole threads, not isolated comments. One request returns a post with up to 200 comments.
$0.50 free credit · Google sign-in · No card required
| Live lookup | Prebuilt index | |
|---|---|---|
| How | Search Reddit when the question arrives, then fetch the best threads | Collect threads ahead of time, embed them, query your own vector store |
| Freshness | Current to the minute | As fresh as your last sync |
| Latency | Adds the API round trips | Fast, all local |
| Cost shape | Per question | Per sync, then free to query |
| Best for | Open-ended assistants and agents | A product focused on a few communities |
def reddit_context(question, threads=3):
hits = get("/search", q=question, sort="relevance", timeRange="year", limit=10)
docs = []
for post in hits["data"]["posts"][:threads]:
thread = get(f"/posts/{post['id']}", commentLimit=30)["data"]
docs.append(thread) # post + its top comments, one chunk
return docs
That is 1 search and 3 thread requests per question. get is the small client from the Python guide. An agent can do the same through the MCP server with no code.
for sub in ["LocalLLaMA", "MachineLearning", "rust"]:
for post in get(f"/r/{sub}/top", limit=100)["data"]["posts"]:
thread = get(f"/posts/{post['id']}", commentLimit=100)["data"]
vector_store.upsert(id=post["id"], text=render(thread), metadata={"sub": sub})
| Workload | Requests per month | Cost per month |
|---|---|---|
| Live lookup, 1,000 questions | 4,000 | $2.80 |
| Live lookup, 50,000 questions | 200,000 | $140 |
| Index sync: top 100 threads from 10 subreddits, daily | 33,000 | $23 |
| Index sync: top 100 threads from 10 subreddits, weekly | 4,400 | $3.08 |
Thread size does not change the price. A post with 200 comments is one request, the same as a post with none. Listing 100 threads to sync costs ten requests, and each thread read is one more.
Store the post title and body in the same chunk as the comments that respond to it.
Highly upvoted comments are usually worth more, but do not drop a detailed low-score reply.
Keep the post id so the assistant can link the source and users can check it.
It holds first-hand experience that formal sources lack: what broke, what people switched to and why. That is the material users ask assistants about.
A post together with its top comments. A comment without its question is hard to interpret, and a question without answers is not useful.
Fetch live when freshness matters and the topic is unpredictable. Build an index when you serve the same domain repeatedly and want lower latency and cost per answer.
A search plus the three best threads is 4 requests, which costs $0.00 per question.
Retrieval and training are different uses. Reddit's terms restrict training models on its content without permission, so check before you do that.
You start with $0.50 of free credit.
$0.50 free credit · Google sign-in · No card required