How to run a Reddit subreddit search
GET request to /v1/reddit/subreddit-search with your input. You get clean JSON back in seconds for 2 credits per call — no OAuth, scraping or platform SDKs. Search inside one subreddit — same sort/timeframe and post fields as site-wide Search. Flat 2 credits.How to run a Reddit subreddit search (step by step)
- 1
Get a free API key
Create a free Captapi account (100 credits, no card) and generate an API key from the dashboard.
- 2
Call the Reddit Subreddit Search API
Send an authenticated GET request to /v1/reddit/subreddit-search with your input. No OAuth, no scraping setup.
- 3
Read the JSON response
Parse the clean JSON response. Pass cache=true for a free 24h cache hit; default is always fresh.
Code example
curl "https://api.captapi.com/v1/reddit/subreddit-search?url=https%3A%2F%2Fwww.reddit.com%2Fr%2Ftechnology%2F&q=moon" \
-H "Authorization: Bearer capt_live_..."
# or: -H "x-api-key: capt_live_..."What the response looks like
{
"success": true,
"data": {
"subreddit": "space",
"query": "moon",
"sort": "new",
"timeframe": "month",
"totalReturned": 5,
"nextCursor": "t3_1vcuw1e",
"hasMore": true,
"results": [
{
"platform": "reddit",
"id": "1vdyhxe",
"name": "t3_1vdyhxe",
"url": "https://www.reddit.com/r/space/comments/1vdyhxe/defunct_part_of_spacex_falcon_9_rocket_will_slam/",
"title": "Defunct part of SpaceX Falcon 9 rocket will slam into the moon",
"text": null,
"subreddit": "space",
"author": "DoremusJessup",
"authorFullname": "t2_612zd",
"upvotes": 0,
"score": 0,
"downs": 0,
"upvoteRatio": 0.36,
"comments": 17,
"subscriberCount": 27939274,
"totalAwardsReceived": 0,
"isVideo": false,
"publishedAt": "2026-08-03T00:37:18.000Z",
"flair": null,
"nsfw": false,
"thumbnail": "https://external-preview.redd.it/H53j3-I3jiW5Qq6JAAR1ywvsYvBmTh5Qlvj2j8mj61E.jpeg?width=140&height=78&auto=webp&s=238c7b5582fe44c2bb3b46390d8e70d9fa3346f3"
},
{
"platform": "reddit",
"id": "1vdxtae",
"name": "t3_1vdxtae",
"url": "https://www.reddit.com/r/space/comments/1vdxtae/why_the_near_and_far_sides_of_the_moon_are_so/",
"title": "Why the near and far sides of the moon are so different",
"text": "I have never seen the explanations for this difference as believable past the obvious crust being thinner on the near side allowing eruptions of magma (the dark areas) that didn't happen on the far side.\n\nI asked questions of five different sites before DeepSeek gave me the key to understanding what happened. That key is degree-one mantle convection. \n\nAfter the impact of Theia with the young Earth that resulted in the creation of the Moon, both the Earth and the Moon were molten balls of magma, with the Moon in an eccentric orbit very close to the earth. \n\nTidal friction rapidly caused the Moon to be tidally locked to the Earth so that one side continually faced Earth. However the moon was still in an eccentric orbit, so as the Moon came closer and further from Earth it flexed, causing frictional heating keeping it molten longer. However the Earth, still being enormously hot, slightly heated the surface of the moon facing it by radiative heating. The moon was some twenty times closer to earth than it is now. \n\nThis radiative heating was just enough to keep the close side a little bi …",
"subreddit": "space",
"author": "grahamsuth",
"authorFullname": "t2_17edr0epez",
"upvotes": 0,
"score": 0,
"downs": 0,
"upvoteRatio": 0.26,
"comments": 5,
"subscriberCount": 27939274,
"totalAwardsReceived": 0,
"isVideo": false,
"publishedAt": "2026-08-03T00:06:35.000Z",
"flair": "Discussion",
"nsfw": false,
"thumbnail": null
}
]
}
}Billing metadata (credits charged, cache hit/miss) is returned in the X-Captapi-Credits and X-Captapi-Cache response headers.
Request parameters
| Name | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | Subreddit URL, r/name, or bare name, e.g. r/technology. The URL platform must match this endpoint's platform. Do not pass cross-platform URLs, e.g. YouTube to TikTok, Instagram to Facebook, LinkedIn to X/Twitter, or Pinterest to Rumble. |
| q | string | Yes | Keywords or search query (min 2 characters). |
| sort | string | No | relevance (default) | new | top | hot | comments (alias: comment_count). |
| timeframe | string | No | For sort=top or comments: hour | day | week | month | year | all (default all). |
| limit | integer | No | Max items to return (default 25, max 200). Flat 2 credits per call. |
| cursor | string | No | Pagination cursor. Leave empty for the first page; then pass the nextCursor value returned in the previous response. |
| cache | boolean | No | Set true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh. Envelope includes cached + cachedAt on hits. |
Frequently asked questions
What does the Reddit Subreddit Search API do?
The Reddit Subreddit Search API lets you search and return matching results from a public Reddit query using one GET request to /v1/reddit/subreddit-search. It returns clean JSON — no OAuth or infrastructure setup required.
How many credits does the Reddit Subreddit Search API cost?
Each successful call costs 2 credits. Pass cache=true to serve from the 24h cache (0 credits on hit); default is always fresh. Hits include cached + cachedAt. Selected profile endpoints also accept cacheMaxAge=1d|3d|7d|14d|30d. Failed or empty results are never charged.
Do I need a Reddit API key or OAuth?
No. A single Captapi key works across every platform Captapi supports — YouTube, TikTok, Instagram, Facebook, Twitter/X, Reddit, Threads, Bluesky, Pinterest, LinkedIn, Rumble, Spotify, Kwai, and more. We handle proxies, rate limits, retries, and authentication for you.
Why can score be 0 when upvoteRatio is 0.36?
score is Reddit's own score field — Captapi does not compute ups−downs (public JSON almost always sends downs: 0). New posts often have hide_score: score/upvotes stay 0 while upvoteRatio is still filled. Check scoreHidden; do not treat a zero score as worthless until the hide window ends.
Can I search comments, not just posts?
Not on this endpoint — results are posts only (kind=t3). For discussion text under a known post, use Post Comments. Site-wide comment search (ScrapeCreators-style comments[]) is a separate surface on the backlog.
Is the Reddit Subreddit Search API suitable for production use?
Yes. It is a stable REST endpoint with predictable JSON and automatic retries. Pass cache=true to serve from the 24h cache (0 credits on hit); default is always fresh. Hits include cached + cachedAt. Selected profile endpoints also accept cacheMaxAge=1d|3d|7d|14d|30d. Use it for analytics, monitoring, and content automation.
Ready to run a Reddit subreddit search?
Start free with 100 credits — no credit card required.
Get your free API key