GET /subreddit/search

Subreddit Search

Search communities (subreddits) by name or topic. Reddit Scraper API endpoint /subreddit/search: parameters, JSON response fields and code examples.

Communities matching q, best matches first, 25 per page with subscribers, weekly visitors and weekly contributions; continue with next_page_token. include_nsfw=true adds 18+ communities. with_details=true adds the /subreddit/details fields (rules, widgets, flair settings, banner, type) to the first 20 communities. Billed 1 request per page, +3 per community detailed.

HTTP Request

GET /subreddit/search

Cost (in requests): 1 per page; +3 per community detailed. Every successful answer reports its cost in data.billed_requests.

Parameters

ParameterTypeRequiredDefaultDescription
qstringYes-Search query (community name or topic).
page_tokenstringNo-Opaque page token from a previous response’s next_page_token. Omit for the first page. Tokens issued before 2026-11-22 are rejected with invalid_page_token: start again from the first page.
include_nsfwbooleanNofalseDefault false. true also includes 18+ communities.
with_detailsbooleanNofalseAdds the /subreddit/details fields (rules, sidebar widgets, menu links, flair settings, banner, colours, created time, type, topics, apps; with the counts the list lacks) to the first 20 communities of the page (the others keep the compact fields): banner_url, primary_color, key_color, background_color, created_at, state, topics, related_subreddits, flair_settings, is_chat_enabled, rules, widgets, menu_links, devvit_apps (left out without it). Billed +3 per community detailed.

Response

Real response to GET /subreddit/search?q=python (arrays trimmed to 2 items, long texts cut with …).

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{
  "status": true,
  "request_id": "5204b64f-961d-da64-7e13-44b6991b",
  "data": {
    "results": [
      {
        "name": "Python",
        "subreddit_id": "t5_2qh0y",
        "description": "The largest Python community for Reddit! Stay up to date with the latest news, packages, and meta information relating to the Python programming language. --- If you have questions or are new to Python use r/LearnPython",
        "subscribers_count": 1524295,
        "weekly_visitors": 89865,
        "weekly_contributions": 568,
        "is_nsfw": false,
        "is_quarantined": false,
        "icon_url": "https://styles.redditmedia.com/t5_2qh0y/styles/communityIcon_lctik80p96tg1.png?width=64&frame=1&auto=webp&s=92baaacc951d52b5071629852df033d53cafa5ec"
      },
      {
        "name": "learnpython",
        "subreddit_id": "t5_2r8ot",
        "description": "Subreddit for posting questions and asking for general advice about all topics related to learning python.",
        "subscribers_count": 1065192,
        "weekly_visitors": 167224,
        "weekly_contributions": 1151,
        "is_nsfw": false,
        "is_quarantined": false,
        "icon_url": "https://styles.redditmedia.com/t5_2r8ot/styles/communityIcon_jwr5s7l5ici61.png?width=64&frame=1&auto=webp&s=5e8a6c0fb811bb5d907cb7227e0dd9a116e7a0fb"
      }
    ],
    "has_next_page": true,
    "next_page_token": "eyJ2IjoxLCJraW5kIjoic3VicmVkZGl0X3NlYXJjaCIsImZwIjoiODgyMmYwNzUyMSIsInRzIjoxNzk1NTUzNzkyLCJ1IjoiZXlKallXNWthV1JoZEdWelgzSmxkSFZ5Ym1Wa0lqb2llMXdpYzJWamRHbHZibDh4WDNCcGNHVnNhVzVsWHpCZloyeHZZbUZzWDIxdlpHbG1hV1Z5YzF3aU9sd2lNVndpTEZ3aWMyVmpkR2x2…",
    "resolved_filters": {
      "include_nsfw": {
        "input": null,
        "resolved": "false",
        "source": "default"
      }
    },
    "billed_requests": 1
  },
  "request_params": {
    "q": "python"
  }
}

Response Fields

FieldTypeDescription
statusbooleantrue when the request succeeded
request_idstringUnique request identifier
dataobjectSearch page.
data.resultsarray of objectsMatching communities.
data.results[].namestringSubreddit name without r/.
data.results[].subreddit_idstringSubreddit id (t5_…).
data.results[].descriptionstringPublic description. Left out on /subreddit/rising (without with_details), the /subreddit/related same_topic rows and /answers.
data.results[].subscribers_countintegerSubscribers (members). Left out on /subreddit/most-visited, /subreddit/directory without with_stats and /answers.
data.results[].weekly_visitorsintegerWeekly visitors (Reddit’s periodic count, not live). Left out on /user/subreddits, /subreddit/posting-guide, /subreddit/rule-check and /answers.
data.results[].weekly_contributionsintegerWeekly posts + comments (Reddit’s periodic count, not live). Left out on the /subreddit/related same_topic rows, /subreddit/most-visited, /subreddit/directory without with_stats, /topic/subreddits, /user/subreddits, /subreddit/posting-guide, /subreddit/rule-check and /answers.
data.results[].is_nsfwbooleanMarked 18+. Left out on /subreddit/rising (without with_details), the /subreddit/related same_topic rows, /subreddit/most-visited, /subreddit/directory without with_stats (or include_nsfw=false), /topic/subreddits and /answers.
data.results[].is_quarantinedbooleanQuarantined by Reddit. Left out on /subreddit/rising (without with_details), /subreddit/stats-history, /subreddit/related (the community asked about and same_topic), /subreddit/insights, /subreddit/most-visited, /subreddit/directory, /topic/subreddits, /user/subreddits and /answers.
data.results[].icon_urlstringCommunity icon URL. Left out on /subreddit/rising (without with_details), /subreddit/posting-guide and /subreddit/rule-check.
data.has_next_pagebooleanMore results available.
data.next_page_tokenstringToken for deeper results; null at the end.
data.resolved_filtersobjectinclude_nsfw as applied.
data.resolved_filters.include_nsfwobjecttrue when 18+ communities were included.
data.resolved_filters.include_nsfw.inputstring / nullWhat the caller sent.
data.resolved_filters.include_nsfw.resolvedstringWhat was applied on Reddit (null when not applied).
data.resolved_filters.include_nsfw.sourcestringparam (applied as given), default, not_found (the value does not exist on Reddit), private / banned / quarantined (a community in the scope that cannot be read: skipped), or not_available (translate_to only: Reddit had no translated listing, the rows are served in their original language).
data.billed_requestsintegerRequests billed for this call (also sent as Requests in the X-RapidAPI-Billing header when it is not RapidAPI’s default of 1).
request_paramsobjectEcho of the parameters you sent

Error Responses

Invalid input returns HTTP 400, not billed. error is a plain string that names the parameter:

1
{ "status": false, "request_id": "99a1e6cd-2e57-9e8f-4e44-2dea7f6d", "error": "Invalid parameter 'post_id': must be a post id such as z1c9z or t3_z1c9z", "request_params": { "post_id": "!!" } }
Status CodeCauseDescription
400Invalid or missing parameterPlain-English message per field. Not billed
200 with status: falseItem not availableerror.code is not_found, banned, private, quarantined. data is null. Billed 1 request
503Reddit temporarily unreachable"error": "Service temporarily unavailable". Not billed, retry later
200 with status: falseBad page tokenerror.code is invalid_page_token: pass next_page_token from the previous answer unchanged

Code Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
import requests

url = "https://reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com/subreddit/search"

params = {
    "q": "python",
}

headers = {
    "X-RapidAPI-Key": "YOUR_API_KEY",
    "X-RapidAPI-Host": "reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com"
}

response = requests.get(url, headers=headers, params=params)
data = response.json()["data"]

for item in data["results"]:
    print(item["name"])
print("Billed requests:", data["billed_requests"])
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
const url = "https://reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com/subreddit/search";

const params = new URLSearchParams({
  q: "python",
});

const response = await fetch(`${url}?${params}`, {
  headers: {
    "X-RapidAPI-Key": "YOUR_API_KEY",
    "X-RapidAPI-Host": "reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com"
  }
});

const { data } = await response.json();
data.results.forEach((item) => console.log(item.name));
1
2
3
4
curl -G "https://reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com/subreddit/search" \
  --data-urlencode "q=python" \
  -H "X-RapidAPI-Key: YOUR_API_KEY" \
  -H "X-RapidAPI-Host: reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com"
Start building today

Get your API key and make your first request in under a minute.

Get Your API Key on RapidAPI