Reddit popular and new subreddits API
Reddit’s community directories with no keyword: popular, new (most recently created) or default, up to 100 per call with an after cursor.
GET /v1/reddit/subreddit-directories/{where}1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/reddit/subreddit-directories/new?limit=100",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 1 credit{ "kind": "Listing", "data": { "after": null, "before": null, "dist": 2, "modhash": null, "geo_filter": "", "children": [ { "kind": "t5", "data": { "id": null, "name": null, "display_name": "typescript", "display_name_prefixed": "r/typescript", "title": "typescript", "public_description": "About r/typescript", "description": null, "subscribers": 180000, "active_user_count": null, "created_utc": null, "over18": false, "subreddit_type": "public", "url": "/r/typescript/", "icon_img": null, "banner_img": null } }, { "kind": "t5", "data": { "id": null, "name": null, "display_name": "webdev", "display_name_prefixed": "r/webdev", "title": "webdev", "public_description": "About r/webdev", "description": null, "subscribers": 2400000, "active_user_count": null, "created_utc": null, "over18": false, "subreddit_type": "public", "url": "/r/webdev/", "icon_img": null, "banner_img": null } } ] }}Parameters
| Name | Type | Description |
|---|---|---|
wherepath · required | "popular" | "new" | "default" | popular, new or default. One of popular, new, default. |
limitquery | integer | Items per page, 1 to 100. Default 25. |
afterquery | string | Cursor: the previous page's data.after. Omit for the first page. |
Response fields
200 with a SubredditListing, in Reddit’s own Things and Listings.
| Field | Type | Description |
|---|---|---|
kind | "Listing" | |
data | object |
Status codes
| Status | Meaning |
|---|---|
200 | A page of subreddits. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | The subreddit, post or user does not exist. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | Reddit is temporarily unavailable. Retryable; nothing was charged. |
Every error has code, message, hint and retryable. All error codes
Reddit is a trademark of Reddit, Inc. We are not affiliated with or endorsed by Reddit.