GET /topic/subreddits

Topic Subreddits

Communities listed under a Reddit topic. Reddit Scraper API endpoint /topic/subreddits: parameters, JSON response fields and code examples.

Communities Reddit lists under one topic (topic_id from /topic/list), in Reddit’s order with a 1-based position: a curated selection, never every community. scope=featured (default) or scope=all; continue with next_page_token. with_details=true (at most 20 communities per page, the default then) adds the /subreddit/details fields per community. Billed 1 request per page, +3 per community detailed.

HTTP Request

GET /topic/subreddits

Cost (in requests): 1 per page. Every successful answer reports its cost in data.billed_requests.

Parameters

ParameterTypeRequiredDefaultDescription
topic_idstringYes-Topic id from /topic/list (tx1_…). Names and slugs are not accepted.
page_tokenstringNo-Opaque page token from a previous response’s next_page_token. Omit for the first page.
per_pageintegerNo25Rows per page, 1–100 (default 25).
scopestringNofeaturedfeatured (default): the 10 featured communities of each sub-topic of a top-level topic. all: every listed community of each sub-topic, about 20 per sub-topic, with counts; slower; the only scope that lists the communities of a sub-topic itself. Billed 1 request per page either way.
qstringNo-Keep only communities whose name, title or description contains this text (case-insensitive).
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 each community; per_page then defaults to 20 and can be at most 20: 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 /topic/subreddits?topic_id=tx1_2f40btm (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{
  "status": true,
  "request_id": "4dfe5e8b-7c50-fc01-dd50-de03b365",
  "data": {
    "topic": {
      "topic_id": "tx1_2f40btm",
      "name": "Education & Career",
      "emoji": "🧑‍🏫",
      "is_sensitive": false
    },
    "items": [
      {
        "name": "WeirdCareers",
        "subreddit_id": "t5_jadpv2",
        "title": "WeirdCareers",
        "description": "A community for the weirdest careers, unusual jobs, bizarre industries, and unconventional ways people make a living.",
        "subscribers_count": 56282,
        "weekly_visitors": 2466285,
        "type": null,
        "icon_url": "https://styles.redditmedia.com/t5_jadpv2/styles/communityIcon_d1fwq7jxsgih1.jpeg?width=96&height=96&frame=1&auto=webp&s=f2278580e23ad8a31dd3b41e8a20962158a6e1c1",
        "position": 1,
        "sub_topic": {
          "topic_id": "tx1_1vhdkr2",
          "name": "Career",
          "emoji": "👩‍💼",
          "is_sensitive": false
        },
        "generated_description": null
      },
      {
        "name": "WeirdSideHustles",
        "subreddit_id": "t5_iwx5ea",
        "title": "WeirdSideHustles",
        "description": "Discover the weirdest, most unusual, and surprisingly profitable side hustles. Share how people are making money in unexpected ways, ask questions, and find your next unconventional income idea.",
        "subscribers_count": 233136,
        "weekly_visitors": 1968902,
        "type": null,
        "icon_url": "https://styles.redditmedia.com/t5_iwx5ea/styles/communityIcon_k3yabz6t59ch1.png?width=96&height=96&frame=1&auto=webp&s=68ee6771db871edb3dfb53d2f873227160653ea7",
        "position": 2,
        "sub_topic": {
          "topic_id": "tx1_1vhdkr2",
          "name": "Career",
          "emoji": "👩‍💼",
          "is_sensitive": false
        },
        "generated_description": null
      }
    ],
    "total": 20,
    "has_next_page": false,
    "next_page_token": null,
    "resolved_filters": {
      "scope": {
        "input": null,
        "resolved": "featured",
        "source": "default"
      },
      "q": null
    },
    "computed_at": "2026-11-24T20:58:33.303310+00:00",
    "billed_requests": 1
  },
  "request_params": {
    "topic_id": "tx1_2f40btm"
  }
}

Response Fields

FieldTypeDescription
statusbooleantrue when the request succeeded
request_idstringUnique request identifier
dataobjectTopic communities page; null with error.code not_found (unknown topic, or a topic with no community list).
data.topicobjectThe topic read (its id; the name is in /topic/list).
data.topic.topic_idstringTopic id (tx1_…), the input of /topic/subreddits.
data.topic.namestringTopic display name, e.g. Technology.
data.topic.emojistringEmoji Reddit shows next to the topic (a character, not an image).
data.topic.is_sensitivebooleanReddit marks the topic as sensitive (adult or mature themes).
data.itemsarray of objectsCommunities of the topic in Reddit’s order, one page. With scope=all, communities Reddit does not feature have no title (left out on a sub-topic, where no row has one).
data.items[].namestringSubreddit name without r/.
data.items[].subreddit_idstringSubreddit id (t5_…).
data.items[].titlestringDisplay title. Left out on /subreddit/search, /subreddit/rising, /subreddit/most-visited, /subreddit/directory (these four without with_details), /user/moderated-subreddits, /subreddit/stats-history, /topic/subreddits with scope=all on a sub-topic, /subreddit/insights and /answers.
data.items[].descriptionstringPublic description. Left out on /subreddit/rising (without with_details), the /subreddit/related same_topic rows and /answers.
data.items[].subscribers_countintegerSubscribers (members). Left out on /subreddit/most-visited, /subreddit/directory without with_stats and /answers.
data.items[].weekly_visitorsintegerWeekly visitors (Reddit’s periodic count, not live). Left out on /user/subreddits, /subreddit/posting-guide, /subreddit/rule-check and /answers.
data.items[].typestring / nullpublic, restricted, private, archived… Left out where no source carries it: /subreddit/search, /subreddit/rising, /subreddit/most-visited, /subreddit/directory (these four without with_details), /subreddit/related, /subreddit/recommend, /subreddit/stats-history, /subreddit/insights and /answers.
data.items[].icon_urlstringCommunity icon URL. Left out on /subreddit/rising (without with_details), /subreddit/posting-guide and /subreddit/rule-check.
data.items[].positionintegerRank in the topic list, 1-based across pages.
data.items[].sub_topicobjectSub-topic this community is listed under (null when the topic itself is a sub-topic).
data.items[].sub_topic.topic_idstringTopic id (tx1_…), the input of /topic/subreddits.
data.items[].sub_topic.namestringTopic display name, e.g. Technology.
data.items[].sub_topic.emojistringEmoji Reddit shows next to the topic (a character, not an image).
data.items[].sub_topic.is_sensitivebooleanReddit marks the topic as sensitive (adult or mature themes).
data.items[].generated_descriptionstring / nullReddit’s one-line summary of the community.
data.totalintegerCommunities in the whole list after the q filter (the list is a curated snapshot: scope=all returns about 20 per sub-topic, never every community on Reddit).
data.has_next_pagebooleanMore communities available.
data.next_page_tokenstring / nullToken for the next page; null at the end.
data.resolved_filtersobjectScope and text filter as applied.
data.resolved_filters.scopeobjectfeatured or all as applied.
data.resolved_filters.scope.inputstring / nullWhat the caller sent.
data.resolved_filters.scope.resolvedstringWhat was applied on Reddit (null when not applied).
data.resolved_filters.scope.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.resolved_filters.qobject / nullText filter as applied; null when none.
data.computed_atstringWhen this answer was computed (RFC 3339, UTC). Older than the request when it was served from the cache.
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
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/topic/subreddits"

params = {
    "topic_id": "tx1_2f40btm",
}

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["items"]:
    print(item["title"], 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/topic/subreddits";

const params = new URLSearchParams({
  topic_id: "tx1_2f40btm",
});

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.items.forEach((item) => console.log(item.title, item.name));
1
2
3
4
curl -G "https://reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com/topic/subreddits" \
  --data-urlencode "topic_id=tx1_2f40btm" \
  -H "X-RapidAPI-Key: YOUR_API_KEY" \
  -H "X-RapidAPI-Host: reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com"
  • Topic List : Reddit’s topic tree: every topic and sub-topic with its id
Start building today

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

Get Your API Key on RapidAPI