Listings & Search
Get a Subreddit's Top Posts by Timeframe
Get the top posts in any subreddit for a timeframe — day, week, month, year, or all-time. Alias for /api/reddit/posts with sort=top, with cursor pagination.
GET
/api/reddit/sub/:name/top$0.002 / callTop posts in a subreddit by timeframe. Alias for /api/reddit/posts?sort=top.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Subreddit name (no r/ prefix) |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
t | string | No | day | week (default) | month | year | all |
limit | number | No | Number of posts to return, 1-100 (default 25) |
after | string | No | Pagination cursor |
Example
curl -H "Authorization: Bearer $TOKEN" \
"https://api.redditapis.com/api/reddit/sub/ClaudeCode/top?t=week"const response = await fetch(
"https://api.redditapis.com/api/reddit/sub/ClaudeCode/top?t=week",
{ headers: { Authorization: "Bearer TOKEN" } }
);import requests
response = requests.get(
"https://api.redditapis.com/api/reddit/sub/ClaudeCode/top",
params={"t": "week"},
headers={"Authorization": "Bearer TOKEN"},
)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.
by ID
Fetch a single Reddit post plus its full raw comment tree by post id — all content, metadata, author info, and nested replies in one HTTP GET call.
