Reddit API
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/posts

Posts from a subreddit. Supports all Reddit sort tabs: New / Hot / Top / Rising / Controversial / Best.

Query Parameters

ParameterTypeRequiredDescription
subredditstringYesSubreddit name (no r/ prefix)
sortstringNonew (default) | hot | top | rising | controversial | best
tstringNoTimeframe for sort=top/controversial: hour | day | week | month | year | all
afterstringNoPagination 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"},
)

On this page