YepAPI
Reddit API

Popular Subreddits API

List Reddit's most popular subreddits or the newest communities, with member counts, descriptions, and icons. JSON, $0.01 per call.

POST/v1/reddit/popular-subreddits
$0.01/call

Returns Reddit's directory of popular communities, or newly created ones with type: "new". Each result has the same fields as Search Subreddits; call Subreddit Info for the full profile.

Usage

const res = await fetch('https://api.yepapi.com/v1/reddit/popular-subreddits', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"type": "popular"}),
});
const { data } = await res.json();
console.log(data);
curl -X POST https://api.yepapi.com/v1/reddit/popular-subreddits \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type": "popular"}'
import requests

res = requests.post(
    "https://api.yepapi.com/v1/reddit/popular-subreddits",
    headers={"x-api-key": "YOUR_API_KEY"},
    json={"type": "popular"},
)
print(res.json()["data"])

Request Body

ParameterTypeRequiredDescriptionDefault
typestringNoOne of: popular, newpopular
cursorstringNocursor from the previous response, to fetch the next page—

Response

{
  "ok": true,
  "data": {
    "cursor": "t5_2cneq",
    "subreddits": [
      {
        "active_users": null,
        "banner": null,
        "created_at": "2009-01-25T02:25:57+00:00",
        "created_utc": 1232850357,
        "description": null,
        "icon": null,
        "id": "2qs0k",
        "lang": "en",
        "name": "Home",
        "over_18": false,
        "subscribers": 435022,
        "title": "Home",
        "type": "public",
        "url": "https://www.reddit.com/r/Home/"
      },
      {
        "active_users": null,
        "banner": "https://styles.redditmedia.com/t5_2qh1i/styles/bannerBackgroundImage_fs33xogq946f1.png?width=4000&s=460f7387ea96fb4707fad8acaa81643df40f19a9",
        "created_at": "2008-01-25T03:52:15+00:00",
        "created_utc": 1201233135,
        "description": "r/AskReddit is the place to ask and answer thought-provoking questions.",
        "icon": "https://styles.redditmedia.com/t5_2qh1i/styles/communityIcon_p6kb2m6b185b1.png?width=256&s=c28b9f038c305e139b62739f2133d7b776582696",
        "id": "2qh1i",
        "lang": "es",
        "name": "AskReddit",
        "over_18": false,
        "subscribers": 60021127,
        "title": "Ask Reddit...",
        "type": "public",
        "url": "https://www.reddit.com/r/AskReddit/"
      }
    ]
  }
}

Response Fields

FieldTypeDescription
okbooleanWhether the request succeeded
data.subredditsobject[]Subreddits
data.subreddits[].idstring | nullSubreddit ID
data.subreddits[].namestringSubreddit name without r/
data.subreddits[].titlestring | nullSubreddit title
data.subreddits[].descriptionstring | nullPublic description
data.subreddits[].subscribersnumber | nullMember count
data.subreddits[].active_usersnumber | nullUsers online, when Reddit reports it
data.subreddits[].created_utcnumber | nullUnix timestamp (seconds)
data.subreddits[].created_atstring | nullISO 8601 timestamp
data.subreddits[].over_18booleanMarked NSFW
data.subreddits[].typestring | nullpublic, restricted, private, …
data.subreddits[].langstring | nullLanguage code
data.subreddits[].urlstringreddit.com URL of the subreddit
data.subreddits[].iconstring | nullCommunity icon URL
data.subreddits[].bannerstring | nullBanner image URL
data.cursorstring | nullCursor for the next page

Pagination

Each response includes a cursor. Send the same request again with that value in cursor to get the next page. When cursor is null, there are no more results. A query with no matches returns 200 with an empty list and cursor: null. Every page is a separate $0.01 call.

Caching

Responses are cached for 1 hour.

Errors

StatusCodeWhen
400VALIDATION_ERRORtype is not popular or new
429RATE_LIMITED_UPSTREAMToo many requests in a short burst — retry after a few seconds
502UPSTREAM_ERRORTemporary problem fetching data from Reddit — retry

Failed calls are not charged.

On this page