Access Reddit data without OAuth, API keys, or registration. Get posts, comments, subreddit stats, and search results using Reddit's public JSON endpoints.
Reddit's official API requires:
- Create a Reddit app
- Get OAuth credentials
- Handle token refresh
- Deal with rate limits
This client skips all of that. It uses Reddit's public .json endpoints — the same ones that power old.reddit.com.
git clone https://github.com/spinov001-art/python-reddit-api.git
cd python-reddit-api
python reddit_api.pyNo dependencies. No API key. Just Python 3.6+.
from reddit_api import RedditClient
client = RedditClient()
posts = client.get_subreddit_posts("python", sort="top", limit=10, time_filter="week")
for post in posts:
print(f"[{post['score']}] {post['title']}")results = client.search("web scraping python", sort="relevance", limit=20)
for r in results:
print(f"r/{r['subreddit']}: {r['title']} ({r['score']} pts)")comments = client.get_comments("python", "abc123", limit=50)
for c in comments:
print(f"u/{c['author']} ({c['score']} pts): {c['body'][:100]}")info = client.get_subreddit_info("datascience")
print(f"Subscribers: {info['subscribers']:,}")
print(f"Active now: {info['active_users']:,}")| Field | Type | Description |
|---|---|---|
id |
str | Post ID |
title |
str | Post title |
author |
str | Username |
score |
int | Net upvotes |
upvote_ratio |
float | % upvoted |
num_comments |
int | Comment count |
url |
str | Link URL |
selftext |
str | Post body (text posts) |
subreddit |
str | Subreddit name |
permalink |
str | Full Reddit URL |
flair |
str | Post flair |
- Market research: What do people say about your product?
- Content ideas: What questions get the most upvotes?
- Sentiment analysis: Track brand mentions across subreddits
- Trend detection: Monitor emerging topics in any niche
- Dataset building: Collect training data for NLP models
- Public endpoints only (no private subreddits)
- ~60 requests/minute rate limit
- Max 100 posts per request (use pagination for more)
- Some subreddits may block non-authenticated requests
- awesome-no-auth-apis — 50+ APIs that work without keys
- awesome-python-api-clients — Python wrappers for free APIs
- Reddit Scraper Pro — Production-grade Reddit scraper on Apify
MIT