Reddit’s popular communities (about 250, sort=popular) in Reddit’s order with a 1-based position: name, id, description, weekly visitors, icon; with_stats=true adds the counts and 18+ flag, with_details=true the /subreddit/details fields (at most 20 per page). Billed 1 request per page, +1 with with_stats=true, +3 per community detailed. For smaller communities use /subreddit/search or /topic/subreddits.
HTTP Request
GET /subreddit/directory
Cost (in requests): 1 per page; +1 with_stats; +3 per detailed. Every successful answer reports its cost in data.billed_requests.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
sort | string | No | popular | popular (default and only value): Reddit’s ranked list of its most-visited communities (about 250). The new list is no longer available (400): use /subreddit/search or /topic/subreddits. |
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 | Communities per page, 1–100 (default 25; at most 25 with with_stats). |
include_nsfw | boolean | No | true | Default true: adult content included; pass false to exclude it (18+ communities are dropped from the page, so a page can hold fewer rows; their positions stay Reddit’s; is_nsfw is then shown). |
with_stats | boolean | No | false | Adds subscribers_count, weekly_contributions and is_nsfw, and exact weekly_visitors, per community (at most 25 communities per page). |
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 /subreddit/directory (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 | Directory page. |
data.items | array of objects | Communities in Reddit’s order, one page. |
data.items[].name | string | Subreddit name without r/. |
data.items[].subreddit_id | string | Subreddit id (t5_…). |
data.items[].description | string | Public description. Left out on /subreddit/rising (without with_details), the /subreddit/related same_topic rows 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[].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 list, 1-based across pages. |
data.total | integer | Size of the whole list (about 250). |
data.has_next_page | boolean | More communities available. |
data.next_page_token | string | Token for the next page; null at the end. |
data.resolved_filters | object | Filters as applied (directory only). |
data.resolved_filters.sort | object | Directory order as applied (popular); null on the most-visited list. |
data.resolved_filters.sort.input | string / null | What the caller sent. |
data.resolved_filters.sort.resolved | string | What was applied on Reddit (null when not applied). |
data.resolved_filters.sort.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.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 |
200 with status: false | Item not available | error.code is not_found, banned, private, quarantined. data is null. Billed 1 request |
| 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
- Subreddit Stats History : Daily history of members and weekly visitors for up to 25 communities
- Most Visited Subreddits : Reddit’s most-visited communities
- Subreddit Rising : Fastest-growing communities over 7 or 30 days, optionally within one topic