RedditapisRedditapis
Search by Type

Search Subreddits and Communities by Topic

Search subreddits by name or topic — the Communities tab on reddit.com. Verified to match Reddit's UI rank order for SFW and NSFW queries, with pagination.

GET/api/reddit/search/communities$0.002 / call

Search subreddits. Mirrors the "Communities" tab on reddit.com search with the same rank order.

Query Parameters

ParameterTypeRequiredDescription
qstringYesSearch query
nsfwbooleanNotrue to include NSFW communities
limitnumberNoNumber of communities to return, 1-100 (default 25)
afterstringNoPagination cursor

Example

curl -H "Authorization: Bearer $TOKEN" \
  "https://api.redditapis.com/api/reddit/search/communities?q=twitter"
const response = await fetch(
  "https://api.redditapis.com/api/reddit/search/communities?q=twitter",
  { headers: { Authorization: "Bearer TOKEN" } }
);
import requests

response = requests.get(
    "https://api.redditapis.com/api/reddit/search/communities",
    params={"q": "twitter"},
    headers={"Authorization": "Bearer TOKEN"},
)

Response Shape

{
  "communities": [
    {
      "name": "Twitter",
      "display_name_prefixed": "r/Twitter",
      "id": "2qh53",
      "fullname": "t5_2qh53",
      "title": "Twitter",
      "public_description": "An unofficial Twitter subreddit...",
      "description": "Full sidebar markdown here, or null.",
      "subscribers": 1394851,
      "url": "https://reddit.com/r/Twitter/",
      "icon": "https://styles.redditmedia.com/t5_.../communityIcon_....jpg",
      "banner_img": "https://styles.redditmedia.com/t5_.../bannerBackgroundImage_....png",
      "subreddit_type": "public",
      "lang": "en",
      "quarantine": false,
      "over_18": false,
      "created_utc": 1205497696,
      "created": "2008-03-14T12:34:56.000Z"
    }
  ],
  "after": "t5_xyz"
}

Response Fields

FieldTypeNotes
namestringSubreddit name (no r/ prefix)
display_name_prefixedstringe.g. r/Twitter
idstringSubreddit id without prefix
fullnamestringt5_ prefixed id
titlestringDisplay title
public_descriptionstring | nullShort one-line community blurb (shown in search results)
descriptionstring | nullLong-form sidebar markdown. null if the sub didn't set one.
subscribersnumberMember count
urlstringFull reddit.com URL
iconstring | nullCommunity icon URL
banner_imgstring | nullCommunity banner background image URL
subreddit_typestring"public", "private", "restricted", etc.
langstring | nullTwo-letter language code
quarantinebooleanTrue if Reddit has quarantined the sub
over_18booleanNSFW flag
created_utcnumberUnix epoch seconds
createdstringISO-8601 of created_utc

Independent third-party API for developers and researchers. Not affiliated with, endorsed by, or sponsored by Reddit, Inc.

On this page