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.
/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"},
)Response Shape
Same shape as /api/reddit/posts — posts: [...] + after cursor. See that page for the per-post field reference (upvotes, comments, link_url, is_crosspost, crosspost_origin, etc.).
Independent third-party API for developers and researchers. Not affiliated with, endorsed by, or sponsored by Reddit, Inc.
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 by post id — all content, metadata, author info, vote counts, and crosspost origin in one HTTP GET call.
