Reddit
Subreddit Top Posts
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/topTop 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 |
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.
Search Communities
Search subreddits by name or topic — the Communities tab on reddit.com. Verified to match Reddit's UI rank order for SFW and NSFW queries, with pagination.