Reddit
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.
GET
/api/reddit/searchSearch posts globally or restrict to a subreddit. Mirrors the "Posts" tab on reddit.com search.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | Yes | Search query |
subreddit | string | No | Restrict to a subreddit |
sort | string | No | relevance | new | hot | top | comments |
t | string | No | hour | day | week | month | year | all |
nsfw | boolean | No | true to include NSFW (Safe Search off) |
after | string | No | Pagination cursor |
Example
curl -H "Authorization: Bearer $TOKEN" \
"https://api.redditapis.com/api/reddit/search?q=twitter+api+alternative&sort=relevance&t=all"const response = await fetch(
"https://api.redditapis.com/api/reddit/search?q=twitter+api+alternative&sort=relevance&t=all",
{ headers: { Authorization: "Bearer TOKEN" } }
);import requests
response = requests.get(
"https://api.redditapis.com/api/reddit/search",
params={"q": "twitter api alternative", "sort": "relevance", "t": "all"},
headers={"Authorization": "Bearer TOKEN"},
)Subreddit Posts
Fetch posts from any subreddit via a simple HTTP GET. Supports all Reddit sort tabs — New, Hot, Top, Rising, Controversial, Best — plus timeframe, cursor.
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.