Reddit
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.
GET
/api/reddit/search/communitiesSearch subreddits. Mirrors the "Communities" tab on reddit.com search with the same rank order.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | Yes | Search query |
nsfw | boolean | No | true to include NSFW communities |
after | string | No | Pagination cursor |
Example
curl -H "Authorization: Bearer $TOKEN" \
"https://api.redditapis.com/api/reddit/search/communities?q=twitter"const response = await fetch(
"https://api.redditapis.com/api/reddit/search/communities?q=twitter",
{ headers: { Authorization: "Bearer TOKEN" } }
);import requests
response = requests.get(
"https://api.redditapis.com/api/reddit/search/communities",
params={"q": "twitter"},
headers={"Authorization": "Bearer TOKEN"},
)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.
Post by ID
Fetch a single Reddit post plus its full raw comment tree by post id — all content, metadata, author info, and nested replies in one HTTP GET call.