Reddit Community Details API - Subreddit Info & Rules
Documentation menu
FetchLayer FetchLayer API

Subreddit metadata and rules — activity, description, rules, and branding

Get subreddit metadata including activity counts, description, creation time, icon, banner and NSFW status, plus the community's rules: each rule's number, title and explanation as text and HTML, in the community's own order. A subreddit that doesn't exist or is banned returns 404, and one that is private, quarantined or premium-only returns 403; both carry an error message and a blockReason such as subreddit_not_found or subreddit_private, and neither costs a credit. Only a 503 means every attempt failed and is worth retrying.

POST /community-details Community
https://api.fetchlayer.dev/reddit/community-details
OpenAPI JSON

Headers

Authorization string required

Bearer token — your FetchLayer API key.

Parameters

subreddit string required

Subreddit name (without r/).

Response Fields

community-details

Subreddit metadata and rules — activity, description, rules, and branding

blocked boolean

Whether Reddit returned a block or verification page.

blockReason string | null

Machine-readable block reason when blocked is true; otherwise omitted.

blockedBodyText string | null

Diagnostic block-page text when blocked is true; otherwise omitted.

pageTitle string

Title of the scraped Reddit page.

requestedUrl string

Reddit URL requested by the scraper.

fetchUrl string

Normalized Reddit URL fetched by the scraper.

finalUrl string

Final URL after redirects.

responseStatus number | null

HTTP status returned by Reddit, or null when unavailable.

subreddit string | null

Subreddit name without the r/ prefix.

subredditPrefixed string | null

Subreddit name with the r/ prefix.

notes string[]

Caveats about this result, for example that the member count is null because that lookup was too slow. Read it before treating a null as zero.

title string | null

Community display title.

descriptionText string

Plain-text community description.

descriptionHtml string | null

HTML community description when available.

memberCount number | null

Members of the community. Null when Reddit withholds the community record, as it does for some content-advisory communities.

memberCountText string | null

Member count as text, e.g. "6.9M members".

weeklyVisitors number | null

Unique visitors in the last week.

weeklyContributions number | null

Posts and comments contributed in the last week.

activeCount number | null

Deprecated — the same value as weeklyContributions, kept for existing integrations.

activeCountText string | null

Deprecated — weeklyContributions as text, labelled the way the community names its contributors.

createdAt string | null

ISO 8601 community creation timestamp.

nsfw boolean

Whether the community marks itself as 18+ (NSFW).

iconUrl string | null

Community icon URL.

bannerUrl string | null

Community banner URL.

url string | null

Absolute subreddit URL.

rules object[]

The community's rules in its own order. Empty when the community publishes none.

rules[].number number

Position in the community’s list, starting at 1.

rules[].title string

The rule as the community names it.

rules[].descriptionText string | null

The rule’s explanation as plain text. Paragraphs are separate lines and list items start with "- ". Null when the rule has no explanation.

rules[].descriptionHtml string | null

The same explanation as HTML with links, emphasis and lists kept. Links are absolute.

scrapedAt string

ISO 8601 timestamp for the scrape.

transport string

Reddit page transport used for extraction.

Request

curl -X POST "https://api.fetchlayer.dev/reddit/community-details" \
  -H "Authorization: Bearer ss-your-key" \
  -H "Content-Type: application/json" \
  -d '{"subreddit":"programming"}'

Response

{
  "blocked": false,
  "subreddit": "programming",
  "subredditPrefixed": "r/programming",
  "title": "Programming",
  "descriptionText": "Computer Programming",
  "memberCount": 6919460,
  "memberCountText": "6.9M members",
  "weeklyVisitors": 215398,
  "weeklyContributions": 2556,
  "activeCount": 2556,
  "activeCountText": "3K weekly contributions",
  "createdAt": "2008-01-25T00:00:00.000Z",
  "nsfw": false,
  "url": "https://www.reddit.com/r/programming/",
  "rules": [
    {
      "number": 1,
      "title": "No LLM-Written Content",
      "descriptionText": "If you don't want to write it, we don't want to read it. This includes the use of LLMs for translation or summarisation. Moderators reserve discretion in ambiguous cases.",
      "descriptionHtml": "<p> If you don't want to write it, we don't want to read it. This includes the use of LLMs for translation or summarisation. Moderators reserve discretion in ambiguous cases. </p>"
    },
    {
      "number": 2,
      "title": "AI-related posts must comply with the AI Policy",
      "descriptionText": "Content about LLMs and AI is generally considered off-topic unless they are deeply technical. Refer to our wiki for more details.",
      "descriptionHtml": "<p> Content about LLMs and AI is generally considered off-topic unless they are <em>deeply technical</em>. Refer to our <a href=\"https://www.reddit.com/r/programming/wiki/ai-policy/\">wiki</a> for more details. </p>"
    }
  ],
  "transport": "new-reddit-html"
}