Reddit keyword sweep API (posts, top comments, communities)
One call for what Reddit says about a keyword: a page of matching posts, the top comments of the first threads, and which communities the results come from.
GET /v1/reddit/search/omni5 credits per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/reddit/search/omni?q=standing%20desk&threads=5",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 5 credits{ "query": "standing desk", "results": { "kind": "Listing", "data": { "after": "t3_1vy645v", "before": null, "dist": 25, "modhash": null, "geo_filter": "", "children": [ { "kind": "t3", "data": { "…": "33 fields" } }, { "kind": "t3", "data": { "…": "33 fields" } }, "… 23 more" ] } }, "threads": [ { "post": { "kind": "t3", "data": { "id": "1ntedtv", "name": "t3_1ntedtv", "title": "Do standing desks actually help or are they overrated?", "author": null, "author_fullname": null, "subreddit": "BuyItForLife", "subreddit_name_prefixed": "r/BuyItForLife", "subreddit_id": "t5_2ss1q", "permalink": "/r/BuyItForLife/comments/1ntedtv/do_standing_desks_actually_help_or_are_they/", "url": "https://www.reddit.com/r/BuyItForLife/comments/1ntedtv/do_standing_desks_actually_help_or_…", "domain": "self.BuyItForLife", "created_utc": 1759141570, "score": 173, "upvote_ratio": 0.8844444444444445, "…": "19 more fields" } }, "top_comments": [ { "kind": "t1", "data": { "…": "21 fields" } }, { "kind": "t1", "data": { "…": "21 fields" } }, "… 1 more" ] }, { "post": { "kind": "t3", "data": { "id": "1q9v2ks", "name": "t3_1q9v2ks", "title": "Best standing desks in 2026 so far?", "author": "n4hcallme", "author_fullname": null, "subreddit": "StandingDesks", "subreddit_name_prefixed": "r/StandingDesks", "subreddit_id": "t5_2tf0s", "permalink": "/r/StandingDesks/comments/1q9v2ks/best_standing_desks_in_2026_so_far/", "url": "https://www.reddit.com/r/StandingDesks/comments/1q9v2ks/best_standing_desks_in_2026_so_far…", "domain": "self.StandingDesks", "created_utc": 1768123491, "score": 12, "upvote_ratio": 0.875, "…": "19 more fields" } }, "top_comments": [ { "kind": "t1", "data": { "…": "21 fields" } }, { "kind": "t1", "data": { "…": "21 fields" } }, "… 2 more" ] }, "… 3 more" ], "subreddits": [ { "name": "StandingDesk", "thread_count": 11, "total_score": 180, "total_comments": 329 }, { "name": "StandingDesks", "thread_count": 3, "total_score": 27, "total_comments": 82 }, "… 9 more" ]}Parameters
| Name | Type | Description |
|---|---|---|
qquery · required | string | Search query. Example: standing desk. |
threadsquery | integer | Threads to read, 1 to 8. Default 5. |
commentsquery | integer | Top comments per thread, 1 to 15. Default 10. |
subredditquery | string | Only this subreddit. Example: typescript. |
sortquery | "relevance" | "new" | "top" | "comments" | Search order. Default relevance. One of relevance, new, top, comments. |
tquery | "hour" | "day" | "week" | "month" | "year" | "all" | Time window for top and controversial. Default day. One of hour, day, week, month, year, all. |
afterquery | string | Cursor: the previous page's data.after. Omit for the first page. |
Response fields
200 with a OmniSearch, in Reddit’s own Things and Listings.
| Field | Type | Description |
|---|---|---|
query | string | |
results | LinkListing | |
threads | object[] | |
subreddits | object[] |
Status codes
| Status | Meaning |
|---|---|
200 | Posts, threads with top comments, and communities. |
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.