Skip to main content
GET
Subreddit search
Cost: 1 credit per successful request. Errors and cache hits (cache_max_age) are free.
Paste this into ChatGPT, Claude or your coding assistant to generate working code for this endpoint (use the copy button).
Prompt

Authorizations

x-api-key
string
header
required

Your API key. Send it in the x-api-key header (or Authorization: Bearer <key>). Create and manage keys from your dashboard.

Query Parameters

subreddit
string
required

The subreddit's name, with or without r/.

query
string

What to search for. Empty matches everything.

type
enum<string>
default:posts

posts (default), comments or media (image and video posts).

Available options:
posts,
comments,
media
sort
enum<string>
default:relevance

relevance (default), hot, top, new or comments (most commented). For type=comments only relevance, top or new.

Available options:
relevance,
hot,
top,
new,
comments
timeframe
enum<string>

Posts / media only: all (default), day, week, month or year.

Available options:
all,
day,
week,
month,
year
cursor
string

The cursor from the previous page (it keeps the type, sort and time range). Omit for the first page.

cache_max_age
enum<string>

Optional. Return a cached result if one this age or newer exists — served for 0 credits with meta.cached=true and meta.cachedAt. Otherwise a fresh scrape runs (1 credit) and refreshes the cache. Omit to always scrape fresh.

Available options:
1d,
3d,
7d,
14d,
30d

Response

One page of results (empty when nothing matches).

data
object
required
meta
object
required

requestId + credit/caching metadata (creditsCharged, creditsRemaining, cached, cachedAt).