Subreddit Info API
Get a subreddit's profile — subscribers, description, sidebar, creation date, icon, banner, and posting settings — as JSON for $0.01 per call.
/v1/reddit/subredditReturns the full profile of a subreddit: member count, public description, the sidebar text, creation date, icon and banner, plus posting settings (allowed post types, images, videos, polls, wiki, quarantine). Pair it with the Subreddit Posts API to pull the community's content and Subreddit Rules for its rules.
Usage
const res = await fetch('https://api.yepapi.com/v1/reddit/subreddit', {
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/subreddit \
-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/subreddit",
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) | — |
Response
{
"ok": true,
"data": {
"active_users": null,
"advertiser_category": "Technology",
"allow_images": false,
"allow_polls": false,
"allow_videos": false,
"banner": "https://styles.redditmedia.com/t5_2qh0y/styles/bannerBackgroundImage_cd73kiu1502d1.png?width=4000&s=adab92e03af7e628f0df484bb7aab107176435b7",
"created_at": "2008-01-25T03:14:39+00:00",
"created_utc": 1201230879,
"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=256&s=6d91fcc92d9f08c5ba30096d43a555ddd0edbc7d",
"id": "2qh0y",
"lang": "en",
"name": "Python",
"over_18": false,
"quarantine": false,
"sidebar": "####[The Python Discord](https://discord.gg/python)\n\nNews about the dynamic, interpreted, interactive, object-oriented, extensible programming language Python\n\n# Upcoming Events\n[Full Events Calendar]…",
"submission_type": "self",
"subscribers": 1520338,
"title": "Python",
"type": "public",
"url": "https://www.reddit.com/r/Python/",
"wiki_enabled": true
}
}Response Fields
| Field | Type | Description |
|---|---|---|
ok | boolean | Whether the request succeeded |
data.id | string | null | Subreddit ID |
data.name | string | Subreddit name without r/ |
data.title | string | null | Subreddit title |
data.description | string | null | Public description |
data.subscribers | number | null | Member count |
data.active_users | number | null | Users online, when Reddit reports it |
data.created_utc | number | null | Unix timestamp (seconds) |
data.created_at | string | null | ISO 8601 timestamp |
data.over_18 | boolean | Marked NSFW |
data.type | string | null | public, restricted, private, … |
data.lang | string | null | Language code |
data.url | string | reddit.com URL of the subreddit |
data.icon | string | null | Community icon URL |
data.banner | string | null | Banner image URL |
data.sidebar | string | null | Sidebar text in Markdown |
data.submission_type | string | null | Allowed posts: any, link, or self |
data.advertiser_category | string | null | Reddit's advertiser category |
data.allow_images | boolean | Image posts allowed |
data.allow_videos | boolean | Video posts allowed |
data.allow_polls | boolean | Polls allowed |
data.wiki_enabled | boolean | Subreddit wiki enabled |
data.quarantine | boolean | Subreddit is quarantined |
Caching
Responses are cached for 1 hour.
Errors
| Status | Code | When |
|---|---|---|
400 | VALIDATION_ERROR | subreddit is missing or not a valid subreddit name |
404 | NOT_FOUND | Subreddit not found, banned, or private |
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
- Subreddit Posts API — hot, new, top, and controversial posts
- Subreddit Rules — the community's posting rules
- Similar Subreddits — related communities
Reddit User Search API
Search Reddit accounts by name. Returns usernames, karma, avatars, and profile URLs as JSON for $0.01 per call.
Subreddit Posts API
Subreddit Posts API and subreddit scraper — list a subreddit's hot, new, top, or controversial posts with scores, comment counts, and media as JSON. $0.01 per call.