Reddit closes its public API in March 2027. New accounts here start with $0.50 free.See the timeline ↗

Reddit data for retrieval-augmented generation

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

Two designs

Live lookupPrebuilt index
HowSearch Reddit when the question arrives, then fetch the best threadsCollect threads ahead of time, embed them, query your own vector store
FreshnessCurrent to the minuteAs fresh as your last sync
LatencyAdds the API round tripsFast, all local
Cost shapePer questionPer sync, then free to query
Best forOpen-ended assistants and agentsA product focused on a few communities

Live lookup in one function

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.

Syncing an index

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})

What it costs

WorkloadRequests per monthCost per month
Live lookup, 1,000 questions4,000$2.80
Live lookup, 50,000 questions200,000$140
Index sync: top 100 threads from 10 subreddits, daily33,000$23
Index sync: top 100 threads from 10 subreddits, weekly4,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.

Three things that improve answers

Keep the question with its answers

Store the post title and body in the same chunk as the comments that respond to it.

Use score as a weak signal

Highly upvoted comments are usually worth more, but do not drop a detailed low-score reply.

Cite the thread

Keep the post id so the assistant can link the source and users can check it.

RAG questions

Why use Reddit for retrieval?

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.

What should one chunk be?

A post together with its top comments. A comment without its question is hard to interpret, and a question without answers is not useful.

Should I fetch live or build an index?

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.

How much does a live lookup cost?

A search plus the three best threads is 4 requests, which costs $0.00 per question.

Can I train a model on this data?

Retrieval and training are different uses. Reddit's terms restrict training models on its content without permission, so check before you do that.

Ground your next answer in a real thread

You start with $0.50 of free credit.

$0.50 free credit · Google sign-in · No card required