Reddit
Get Subreddit Posts
Fetch posts from any subreddit via a simple HTTP GET. Supports all Reddit sort tabs — New, Hot, Top, Rising, Controversial, Best — plus timeframe, cursor.
GET
/api/reddit/postsPosts from a subreddit. Supports all Reddit sort tabs: New / Hot / Top / Rising / Controversial / Best.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
subreddit | string | Yes | Subreddit name (no r/ prefix) |
sort | string | No | new (default) | hot | top | rising | controversial | best |
t | string | No | Timeframe for sort=top/controversial: hour | day | week | month | year | all |
after | string | No | Pagination cursor (e.g. t3_xxx) |
Example
curl -H "Authorization: Bearer $TOKEN" \
"https://api.redditapis.com/api/reddit/posts?subreddit=ClaudeCode&sort=top&t=week"const response = await fetch(
"https://api.redditapis.com/api/reddit/posts?subreddit=ClaudeCode&sort=top&t=week",
{ headers: { Authorization: "Bearer TOKEN" } }
);
const data = await response.json();import requests
response = requests.get(
"https://api.redditapis.com/api/reddit/posts",
params={"subreddit": "ClaudeCode", "sort": "top", "t": "week"},
headers={"Authorization": "Bearer TOKEN"},
)Overview
A simple HTTP API for Reddit — fetch posts, search communities, scrape comment trees, log in, and post comments programmatically. Bearer auth, JSON out.
Search Posts
Search Reddit posts globally or restrict to a subreddit — mirrors the Posts tab on reddit.com search. Supports sort, timeframe, NSFW filter, and pagination.