GET /subreddit/recommendations

Subreddit Recommendations

Communities Reddit recommends next to a community. Reddit Scraper API endpoint /subreddit/recommendations: parameters, JSON response fields and code examples.

The communities Reddit’s own recommender lists next to a community (up to about 8, in Reddit’s order), as visitors who are not signed in see them (not personalised): title, description, subscribers, weekly visitors and contributions, 18+ flag and icon, plus the recommender’s model_version. Give the name or the t5_ id. Billed 1 request per call.

HTTP Request

GET /subreddit/recommendations

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.
include_nsfwbooleanNotrueDefault true: adult (18+) communities included; pass false to drop them from the list.

Response

Real response to GET /subreddit/recommendations?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
{
  "status": true,
  "request_id": "7c4082fe-63b9-cb60-f1d4-22cefe37",
  "data": {
    "subreddit": {
      "subreddit_id": "t5_2qh0y",
      "name": "Python"
    },
    "model_version": "related_community_recommendations_v2",
    "items": [
      {
        "position": 1,
        "subreddit_id": "t5_2r8ot",
        "name": "learnpython",
        "title": "Python Education",
        "description": "Subreddit for posting questions and asking for general advice about all topics related to learning python.",
        "subscribers_count": 1065192,
        "weekly_visitors": 167224,
        "weekly_contributions": 1151,
        "is_nsfw": false,
        "icon_url": "https://styles.redditmedia.com/t5_2r8ot/styles/communityIcon_jwr5s7l5ici61.png?width=64&frame=1&auto=webp&s=5e8a6c0fb811bb5d907cb7227e0dd9a116e7a0fb"
      },
      {
        "position": 2,
        "subreddit_id": "t5_2x3ey",
        "name": "IPython",
        "title": "IPython: A place to ask questions and discuss all things IPython and Jupyter related.",
        "description": "If you have a question about IPython, (now Jupyter) the programming language written by scientists for scientists with an eye towards presentation, we want you here.  If you have tips, Notebooks you want to share, or you want feedback we wa…",
        "subscribers_count": 10881,
        "weekly_visitors": 423,
        "weekly_contributions": 0,
        "is_nsfw": false,
        "icon_url": "https://styles.redditmedia.com/t5_2x3ey/styles/communityIcon_cczemy1ikor41.png?width=64&frame=1&auto=webp&s=4711bf25d1ab17483647ebb0e67eb2ec49554016"
      }
    ],
    "billed_requests": 1
  },
  "request_params": {
    "subreddit": "python"
  }
}

Response Fields

FieldTypeDescription
statusbooleantrue when the request succeeded
request_idstringUnique request identifier
dataobjectRecommendations; null with error.code = not_found.
data.subredditobjectThe community asked about.
data.subreddit.subreddit_idstringId (t5_…) of the community asked about.
data.subreddit.namestringName of the community asked about, as Reddit writes it.
data.model_versionstringName of the Reddit recommender that made the list (e.g. related_community_recommendations_v2), for reference.
data.itemsarray of objectsCommunities Reddit recommends next to this one, in Reddit’s order (up to about 8); empty when Reddit has none (18+, quarantined and private communities get none).
data.items[].positionintegerRank in Reddit’s list, 1-based.
data.items[].subreddit_idstringSubreddit id (t5_…).
data.items[].namestringSubreddit name without r/.
data.items[].titlestringDisplay title.
data.items[].descriptionstringPublic description.
data.items[].subscribers_countintegerSubscribers (members).
data.items[].weekly_visitorsintegerWeekly visitors (Reddit’s periodic count, not live); null when it could not be read.
data.items[].weekly_contributionsintegerWeekly posts + comments (Reddit’s periodic count, not live); null when it could not be read.
data.items[].is_nsfwbooleanMarked 18+; null when it could not be read.
data.items[].icon_urlstringCommunity icon URL.
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).
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/recommendations"

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"]

for item in data["items"]:
    print(item["title"], item["name"])
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/recommendations";

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();
data.items.forEach((item) => console.log(item.title, item.name));
1
2
3
4
curl -G "https://reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com/subreddit/recommendations" \
  --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"
  • Subreddit Insights : When to post and what works in a community: timing, flairs, post kinds, engagement
  • Subreddit Related : Related communities: moderator picks, name matches, same topic and shared audience
  • Subreddit Batch : Look up to 50 communities in one request
Start building today

Get your API key and make your first request in under a minute.

Get Your API Key on RapidAPI