GET /subreddit/details

Subreddit Details

Subreddit details by name or id. Reddit Scraper API endpoint /subreddit/details: parameters, JSON response fields and code examples.

A community’s profile: title, description, created time, type, NSFW flag, subscribers, weekly visitors and contributions, icon, banner, colours, structured rules, sidebar widgets, menu links, apps installed in the community (Reddit’s developer platform, Devvit) and flair settings. Give the name or the t5_ id. Billed 1 request per call.

HTTP Request

GET /subreddit/details

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

Parameters

ParameterTypeRequiredDefaultDescription
subredditstringYes-Subreddit name (case-insensitive, with or without r/) or its t5_ id.
with_sidebarbooleanNofalseDeprecated: no effect. The sidebar content is always included (description, rules, widgets, menu_links, related_subreddits); the old long sidebar HTML is no longer available.
include_htmlbooleanNofalseAdds body_html (the rendered HTML) to the sidebar widgets. Default: left out; body_markdown carries the same text.

Response

Real response to GET /subreddit/details?subreddit=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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
{
  "status": true,
  "request_id": "9fdef237-7b08-9dd1-ce05-1522b43e",
  "data": {
    "name": "Python",
    "subreddit_id": "t5_2qh0y",
    "title": "Python",
    "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. \n---\n\nIf you have questions or are new to Python use r/LearnPython",
    "subscribers_count": 1524295,
    "weekly_visitors": 89865,
    "weekly_contributions": 568,
    "type": "public",
    "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",
    "banner_url": "https://styles.redditmedia.com/t5_2qh0y/styles/bannerBackgroundImage_cd73kiu1502d1.png?frame=1&auto=webp&s=cb043cb4ba040265a97554d8debbeb2ed419db16",
    "primary_color": "#FFCC00",
    "key_color": "#FFCC00",
    "background_color": "#4685B9",
    "created_at": "2008-01-25T03:14:39.134000+00:00",
    "state": "active",
    "topics": [],
    "related_subreddits": [
      "madeinpython",
      "learnpython"
    ],
    "flair_settings": {
      "is_enabled": true,
      "is_self_assignable": true
    },
    "is_chat_enabled": false,
    "rules": [
      {
        "rule_id": "e3f4ccd9-897b-42ec-aef9-1b75f5411429",
        "name": "No showcase posts",
        "priority": 0,
        "description_html": "<p>Due to an increase of showcases featuring AI content such as working with multiple AI models or wrappers around APIs, this is no longer allowed. Please post your showcases in the appropriate monthly showcase post or a daily thread instea…",
        "description_text": "Due to an increase of showcases featuring AI content such as working with multiple AI models or wrappers around APIs, this is no longer allowed. Please post your showcases in the appropriate monthly showcase post or a daily thread instead."
      },
      {
        "rule_id": "07756577-7643-42f6-9671-80d0a62e770a",
        "name": "\"How do I\", Help, or similar questions belong in r/LearnPython",
        "priority": 1,
        "description_html": "<p>If you are about to ask a question about how to do something in python, please check out <a href=\"https://www.reddit.com/r/LearnPython/\">r/LearnPython</a>.</p><p>It is a very helpful community that is focused on helping people get answer…",
        "description_text": "If you are about to ask a question about how to do something in python, please check out r/LearnPython.\n\nIt is a very helpful community that is focused on helping people get answers that they understand."
      }
    ],
    "widgets": [
      {
        "type": "rules",
        "name": "Subreddit Rules"
      },
      {
        "type": "post_flair",
        "name": "Search by Flair",
        "flairs": [
          {
            "text": "Discussion",
            "background_color": "#F50057",
            "text_color": "light"
          },
          {
            "text": "Resource",
            "background_color": "#DDBD37",
            "text_color": "light"
          }
        ]
      }
    ],
    "billed_requests": 1,
    "menu_links": [
      {
        "text": "Python.org",
        "url": null,
        "children": [
          {
            "text": "Python.org",
            "url": "https://www.python.org/",
            "children": []
          },
          {
            "text": "About the PSF",
            "url": "https://www.python.org/psf-landing/",
            "children": []
          }
        ]
      },
      {
        "text": "Daily megathreads",
        "url": "https://www.reddit.com/r/Python/?f=flair_name%3A\"Daily%20Thread\"",
        "children": []
      }
    ],
    "devvit_apps": []
  },
  "request_params": {
    "subreddit": "python"
  }
}

Response Fields

FieldTypeDescription
statusbooleantrue when the request succeeded
request_idstringUnique request identifier
dataobjectThe community; null with error.code banned / quarantined / private / not_found.
data.namestringSubreddit name without r/.
data.subreddit_idstringSubreddit id (t5_…).
data.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.descriptionstringPublic description. Left out on /subreddit/rising (without with_details), the /subreddit/related same_topic rows and /answers.
data.subscribers_countintegerSubscribers (members). Left out on /subreddit/most-visited, /subreddit/directory without with_stats and /answers.
data.weekly_visitorsintegerWeekly visitors (Reddit’s periodic count, not live). Left out on /user/subreddits, /subreddit/posting-guide, /subreddit/rule-check and /answers.
data.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.typestringpublic, 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.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.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.icon_urlstringCommunity icon URL. Left out on /subreddit/rising (without with_details), /subreddit/posting-guide and /subreddit/rule-check.
data.banner_urlstringBanner image URL.
data.primary_colorstringCommunity primary colour (hex).
data.key_colorstringCommunity key / highlight colour (hex).
data.background_colorstringCommunity page background colour (hex); null when the community keeps the default.
data.created_atstringISO-8601 UTC creation time.
data.statestringactive, banned, quarantined, private, not_found.
data.topicsarrayTopic tags set by the moderators (text only). For topic ids, use /subreddit/related.
data.related_subredditsarray of stringCurated related communities (sidebar / menu); empty is valid.
data.flair_settingsobjectAuthor-flair settings of the community.
data.flair_settings.is_enabledbooleanMembers can show a user flair in this community; null when unknown.
data.flair_settings.is_self_assignablebooleanMembers can pick their own user flair; null when unknown.
data.is_chat_enabledbooleanThe community has chat channels turned on; null when unknown.
data.rulesarray of objectsStructured rules in priority order.
data.rules[].rule_idstringRule id (uuid). For reference; not an input of this API.
data.rules[].namestringRule title.
data.rules[].priorityinteger0-based display order.
data.rules[].description_htmlstringRule body rendered as HTML.
data.rules[].description_textstringRule body as plain text.
data.widgetsarray of objectsSidebar widgets in sidebar order, each with its own content (the moderator list is not public and is left out).
data.widgets[].typestringWidget kind: id_card, rules (the rules themselves are on /subreddit/rules), text_area, button, post_flair, calendar, image, community_list, menu…
data.widgets[].namestringWidget title shown in the sidebar.
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).
data.menu_linksarray of objectsTop-bar menu links (bookmarks, related subreddits menus).
data.menu_links[].textstringLink label.
data.menu_links[].urlstring / nullLink target.
data.menu_links[].childrenarray of objectsSubmenu entries.
data.menu_links[].children[].textstringLink label.
data.menu_links[].children[].urlstringLink target.
data.menu_links[].children[].childrenarraySubmenu entries.
data.devvit_appsarrayApps installed in the community (Reddit’s developer platform, Devvit).
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

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/details"

params = {
    "subreddit": "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"]

print(data["name"])
print(data["subreddit_id"])
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/details";

const params = new URLSearchParams({
  subreddit: "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();
console.log(data.name, data.subreddit_id);
1
2
3
4
curl -G "https://reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com/subreddit/details" \
  --data-urlencode "subreddit=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