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.0015 / 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. |
Paging past Reddit's cap
Reddit closes a single listing near 1000 items and then stops issuing a
cursor, so listing_status: truncated is Reddit's limit rather than the end of
the data. Every distinct combination of parameters you send is a separate
listing with its own budget, so widen across listings rather than paging
deeper into one.
What you can vary here:
ttakesday,week,month,year,all, each its own listing.- Search is a different listing again:
/api/reddit/searchwith a query scoped to the subreddit reaches posts a listing will not.
Which of those actually widen, measured against the live API 2026-09-05, at limit=100:
- Each timeframe really is a separate listing:
t=weekandt=allshared 0 of 100 posts on both r/programming and r/AskReddit. - Adjacent windows overlap only partly, so they are worth walking rather than
picking one:
t=weekagainstt=monthshared 27 of 62 on r/programming and 18 of 100 on r/AskReddit. - Three timeframes returned 282 distinct posts out of 300 slots on r/AskReddit, against 100 from a single call.
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.
