Similar Subreddits API
Find subreddits similar to a given community, with names, descriptions, member counts, and icons. JSON, $0.01 per call.
/v1/reddit/similar-subredditsReturns communities related to a subreddit — useful for audience research and for expanding a list of subreddits to monitor. Combine with Subreddit Posts to pull content from each one.
Usage
const res = await fetch('https://api.yepapi.com/v1/reddit/similar-subreddits', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({"subreddit": "python"}),
});
const { data } = await res.json();
console.log(data);curl -X POST https://api.yepapi.com/v1/reddit/similar-subreddits \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"subreddit": "python"}'import requests
res = requests.post(
"https://api.yepapi.com/v1/reddit/similar-subreddits",
headers={"x-api-key": "YOUR_API_KEY"},
json={"subreddit": "python"},
)
print(res.json()["data"])Request Body
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
subreddit | string | Yes | Subreddit name — python, r/python, or a reddit.com/r/python URL (2–21 characters) | — |
cursor | string | No | cursor from the previous response, to fetch the next page | — |
Response
{
"ok": true,
"data": {
"cursor": "eyJjYW5kaWRhdGVzX3JldHVybmVkIjoie1wic2VjdGlvbl8xX3BpcGVsaW5lXzBfZ2xvYmFsX21vZGlmaWVyc1wiOlwiMVwiLFwic2VjdGlvbl8xX3BpcGVsaW5lXzFfbG9jYWxfbW9kaWZpZXJzXCI6XCIwXCIsXCJzZWN0aW9uXzJfcGlwZWxpbmVfMF9zdWJyZWRk…",
"subreddits": [
{
"active_users": null,
"banner": null,
"created_at": null,
"created_utc": null,
"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 Pyt…",
"icon": "https://styles.redditmedia.com/t5_2qh0y/styles/communityIcon_lctik80p96tg1.png?width=64&frame=1&auto=webp&s=92baaacc951d52b5071629852df033d53cafa5ec",
"id": null,
"lang": null,
"name": "Python",
"over_18": false,
"subscribers": null,
"title": null,
"type": null,
"url": "https://www.reddit.com/r/Python/"
},
{
"active_users": null,
"banner": null,
"created_at": null,
"created_utc": null,
"description": "A subreddit for helping Python programmers",
"icon": null,
"id": null,
"lang": null,
"name": "pythonhelp",
"over_18": false,
"subscribers": null,
"title": null,
"type": null,
"url": "https://www.reddit.com/r/pythonhelp/"
}
]
}
}Response Fields
| Field | Type | Description |
|---|---|---|
ok | boolean | Whether the request succeeded |
data.subreddits | object[] | Related subreddits |
data.subreddits[].id | string | null | Subreddit ID |
data.subreddits[].name | string | Subreddit name without r/ |
data.subreddits[].title | string | null | Subreddit title |
data.subreddits[].description | string | null | Public description |
data.subreddits[].subscribers | number | null | Member count |
data.subreddits[].active_users | number | null | Users online, when Reddit reports it |
data.subreddits[].created_utc | number | null | Unix timestamp (seconds) |
data.subreddits[].created_at | string | null | ISO 8601 timestamp |
data.subreddits[].over_18 | boolean | Marked NSFW |
data.subreddits[].type | string | null | public, restricted, private, … |
data.subreddits[].lang | string | null | Language code |
data.subreddits[].url | string | reddit.com URL of the subreddit |
data.subreddits[].icon | string | null | Community icon URL |
data.subreddits[].banner | string | null | Banner image URL |
data.cursor | string | null | Cursor 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
| Status | Code | When |
|---|---|---|
400 | VALIDATION_ERROR | subreddit is missing or not a valid subreddit name |
429 | RATE_LIMITED_UPSTREAM | Too many requests in a short burst — retry after a few seconds |
502 | UPSTREAM_ERROR | Temporary problem fetching data from Reddit — retry |
Failed calls are not charged.
Related Endpoints
- Search Subreddits — find communities by keyword
- Subreddit Info — full profile of any result
Subreddit Rules API
Get a subreddit's rules — title, full description, report reason, and whether each applies to posts or comments. JSON, $0.01 per call.
Reddit Post API
Reddit Post API — get one Reddit post by URL with title, body, author, score, upvote ratio, comment count, images, and video. JSON, $0.01 per call.