Listings & Search
Fetch Posts From Any Subreddit by Sort
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/posts$0.002 / callPosts 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 |
limit | number | No | Number of posts to return, 1-100 (default 25) |
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
Simple HTTP API for Reddit. Fetch posts, search communities, scrape comments, log in, comment, vote, and send DMs. Bearer auth, JSON, no OAuth.
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.
