Reddit API
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/top

Top posts in a subreddit by timeframe. Alias for /api/reddit/posts?sort=top.

Path Parameters

ParameterTypeRequiredDescription
namestringYesSubreddit name (no r/ prefix)

Query Parameters

ParameterTypeRequiredDescription
tstringNoday | week (default) | month | year | all
afterstringNoPagination 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"},
)

On this page