Quickstart
Read a Reddit post and its comments with one HTTPS request, as JSON or as Markdown for a model.
threadapi reads public Reddit for programs and AI agents. One request returns a post with its comment tree, as JSON or as one Markdown document, with a digest of what the thread agrees and argues about. There are also subreddit listings and search, a remote MCP server, and nothing to run on your side: no Reddit app, no OAuth with Reddit, no proxies.
Base URL
https://api.threadapi.dev/v1
Get a key
Sign in at threadapi.dev with Google, GitHub or an email code. New accounts get 200 free credits. Create a key under API keys; it starts with tapi_.
Read a thread
curl "https://api.threadapi.dev/v1/reddit/post?format=md&url=https://www.reddit.com/r/programming/comments/1x144ok/" \
-H "Authorization: Bearer $THREADAPI_API_KEY"import os, requests
r = requests.get(
"https://api.threadapi.dev/v1/reddit/post",
params={"url": "https://www.reddit.com/r/programming/comments/1x144ok/"},
headers={"Authorization": f"Bearer {os.environ['THREADAPI_API_KEY']}"},
)
r.raise_for_status()
thread = r.json()
print(thread["post"]["title"], thread["meta"]["comments_returned"])const params = new URLSearchParams({
url: "https://www.reddit.com/r/programming/comments/1x144ok/",
format: "md",
});
const res = await fetch(`https://api.threadapi.dev/v1/reddit/post?${params}`, {
headers: { Authorization: `Bearer ${process.env.THREADAPI_API_KEY}` },
});
console.log(await res.text());Check what it cost
Every successful response has an X-Credits-Used header. A post with up to 500 comments costs 1 credit; max_comments defaults to 200. See pricing.
Endpoints
Post
A post, its comments nested as on Reddit, and a discussion digest.
Subreddit
Hot, new, top or rising posts in a subreddit.
Search
Posts matching a query, across Reddit or in one subreddit.
MCP server
The same three, as tools for Claude, Cursor, VS Code and Codex.
For language models
- llms.txt and llms-full.txt describe the API in plain text.
- The OpenAPI spec is at threadapi.dev/openapi.json.
- Append
.mdxto any docs URL for the raw page.