Loading…
100 free credits. No credit card required. Get a key
Find communities by name or topic, as a Listing of t5 Things with member counts.
GET /v1/reddit/search/subreddits1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/reddit/search/subreddits?q=homelab",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()No bundled sample for this call. The response is a SubredditListing; its fields are listed below.
| Name | Type | Description |
|---|---|---|
qquery · required | string | Name or topic. Example: typescript. |
limitquery | integer | Items per page, 1 to 100. Default 25. |
afterquery | string | Cursor: the previous page's data.after. Omit for the first page. |
200 with a SubredditListing, in Reddit’s own shape.
| Field | Type | Description |
|---|---|---|
kind | "Listing" | |
data | object |
| Status | Meaning |
|---|---|
200 | Matching 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
About this endpoint. Reddit is a trademark of Reddit, Inc. We are not affiliated with or endorsed by Reddit.
They are returned with over18: true, so you can filter them out.