Search Reddit, Hacker News and Stack Overflow together
Forum threads from Reddit, Hacker News and Stack Overflow in one list, with the top comments of the most discussed threads inline.
GET /v1/search/forumsBeta10 credits per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/search/forums?query=postgres%20vs%20mysql",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 10 credits{ "query": "postgres vs mysql", "sources": [ "reddit", "hackernews", "… 1 more" ], "window": { "since": null }, "count": 85, "results": [ { "platform": "reddit", "id": "1xqycil", "url": "https://www.reddit.com/r/SQL/comments/1xqycil/noob_here_mysql_or_postgresql_which_is_better/", "title": "Noob here: mysql or postgresql? Which is better (?)", "text": null, "author": "jdkapaoskd", "author_name": null, "author_id": null, "created_at": "2026-11-08T13:24:26.000Z", "likes": 3, "comments": 40, "shares": null, "views": null, "followers": null, "links": [ "https://www.reddit.com/r/SQL/comments/1xqycil/noob_here_mysql_or_postgresql_which_is_better/" ], "top_comments": null }, { "platform": "hackernews", "id": "17014098", "url": "https://di.nmfay.com/postgres-vs-mysql", "title": "The ultimate postgres vs. mysql blog post", "text": null, "author": "adamnemecek", "author_name": null, "author_id": null, "created_at": "2018-05-07T16:33:41.000Z", "likes": 35, "comments": 1, "shares": null, "views": null, "followers": null, "links": [ "https://di.nmfay.com/postgres-vs-mysql" ], "top_comments": null }, "… 83 more" ], "legs": [ { "key": "reddit", "platform": "reddit", "endpoint": "reddit.search.posts", "status": "ok", "credits": 2, "ms": 2852, "error": null }, { "key": "hackernews", "platform": "hackernews", "endpoint": "hackernews.search.stories", "status": "ok", "credits": 1, "ms": 308, "error": null }, "… 4 more" ], "credits_used": 7, "failed": []}Parameters
| Name | Type | Description |
|---|---|---|
queryquery · required | string | Search words. Example: postgres vs mysql. |
sourcesquery | string | string[] | Any of reddit, hackernews, stackoverflow (default all). |
excludequery | string | string[] | Sources to leave out. |
commentsquery | integer | null | Threads to open for top comments (default 3). |
timeframequery | "day" | "week" | "month" | "year" | "all" | Window, from now. One of day, week, month, year, all. |
lookback_daysquery | integer | Window in days, from now. |
sortquery | "relevance" | "date" | "engagement" | relevance (default, each platform’s own ranking), date (newest first) or engagement. One of relevance, date, engagement. |
Status codes
| Status | Meaning |
|---|---|
200 | Forum threads, with top comments on the hero threads. |
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 | Nothing matched on any platform. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | Cross-platform search is temporarily unavailable. Retryable; nothing was charged. |
Every error has code, message, hint and retryable. All error codes
Questions
How is it charged?
Per platform that answers, at that platform’s own price, up to the ceiling shown. A platform that fails is listed in legs and not charged; if none answers, nothing is.
Reddit, X and every other platform named here are trademarks of their owners. We are not affiliated with or endorsed by any of them.