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. Pass back the after value from the previous response exactly as issued; it is opaque and carries your paging depth. See Pagination depth. |
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.).
When after comes back empty
An empty cursor means there is no next page to ask for. It does not always mean
you have every post: Reddit often stops serving a busy listing long before it
runs out. Paging r/all on 2026-08-14 stopped after 400 posts covering about a
minute of a feed that plainly holds more.
The response tells you which happened. When after is null it also carries
listing_status, which reads complete, truncated or unknown. Only
complete means you have everything; treat the other two as a partial answer
and widen your search rather than stopping. The full field list and what to do
about each answer is in Pagination depth.
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.
Subreddit Comment Stream
Stream the newest comments across an entire subreddit, not one post's thread. Poll it to catch comments as they are posted, with cursor pagination.
