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
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
topic_id | string | Yes | - | Topic id from /topic/list (tx1_…). Names and slugs are not accepted. |
page_token | string | No | - | Opaque page token from a previous response’s next_page_token. Omit for the first page. |
per_page | integer | No | 25 | Rows per page, 1–100 (default 25). |
scope | string | No | featured | featured (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. |
q | string | No | - | Keep only communities whose name, title or description contains this text (case-insensitive). |
with_details | boolean | No | false | Adds 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 …).
| |
Response Fields
| Field | Type | Description |
|---|---|---|
status | boolean | true when the request succeeded |
request_id | string | Unique request identifier |
data | object | Topic communities page; null with error.code not_found (unknown topic, or a topic with no community list). |
data.topic | object | The topic read (its id; the name is in /topic/list). |
data.topic.topic_id | string | Topic id (tx1_…), the input of /topic/subreddits. |
data.topic.name | string | Topic display name, e.g. Technology. |
data.topic.emoji | string | Emoji Reddit shows next to the topic (a character, not an image). |
data.topic.is_sensitive | boolean | Reddit marks the topic as sensitive (adult or mature themes). |
data.items | array of objects | Communities 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[].name | string | Subreddit name without r/. |
data.items[].subreddit_id | string | Subreddit id (t5_…). |
data.items[].title | string | Display 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[].description | string | Public description. Left out on /subreddit/rising (without with_details), the /subreddit/related same_topic rows and /answers. |
data.items[].subscribers_count | integer | Subscribers (members). Left out on /subreddit/most-visited, /subreddit/directory without with_stats and /answers. |
data.items[].weekly_visitors | integer | Weekly visitors (Reddit’s periodic count, not live). Left out on /user/subreddits, /subreddit/posting-guide, /subreddit/rule-check and /answers. |
data.items[].type | string / null | public, 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_url | string | Community icon URL. Left out on /subreddit/rising (without with_details), /subreddit/posting-guide and /subreddit/rule-check. |
data.items[].position | integer | Rank in the topic list, 1-based across pages. |
data.items[].sub_topic | object | Sub-topic this community is listed under (null when the topic itself is a sub-topic). |
data.items[].sub_topic.topic_id | string | Topic id (tx1_…), the input of /topic/subreddits. |
data.items[].sub_topic.name | string | Topic display name, e.g. Technology. |
data.items[].sub_topic.emoji | string | Emoji Reddit shows next to the topic (a character, not an image). |
data.items[].sub_topic.is_sensitive | boolean | Reddit marks the topic as sensitive (adult or mature themes). |
data.items[].generated_description | string / null | Reddit’s one-line summary of the community. |
data.total | integer | Communities 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_page | boolean | More communities available. |
data.next_page_token | string / null | Token for the next page; null at the end. |
data.resolved_filters | object | Scope and text filter as applied. |
data.resolved_filters.scope | object | featured or all as applied. |
data.resolved_filters.scope.input | string / null | What the caller sent. |
data.resolved_filters.scope.resolved | string | What was applied on Reddit (null when not applied). |
data.resolved_filters.scope.source | string | param (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.q | object / null | Text filter as applied; null when none. |
data.computed_at | string | When this answer was computed (RFC 3339, UTC). Older than the request when it was served from the cache. |
data.billed_requests | integer | Requests billed for this call (also sent as Requests in the X-RapidAPI-Billing header when it is not RapidAPI’s default of 1). |
request_params | object | Echo of the parameters you sent |
Error Responses
Invalid input returns HTTP 400, not billed. error is a plain string that names the parameter:
| |
| Status Code | Cause | Description |
|---|---|---|
| 400 | Invalid or missing parameter | Plain-English message per field. Not billed |
| 503 | Reddit temporarily unreachable | "error": "Service temporarily unavailable". Not billed, retry later |
200 with status: false | Bad page token | error.code is invalid_page_token: pass next_page_token from the previous answer unchanged |
Code Examples
| |
| |
| |
Related Endpoints
- Topic List : Reddit’s topic tree: every topic and sub-topic with its id