The questions your audience asks
The questions a topic’s audience asks on Reddit, YouTube, Hacker News and Stack Overflow. Metered.
GET /v1/prism/audience-questionsBeta30 credits per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/prism/audience-questions?topic=sourdough%20starter",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 30 credits{ "topic": "sourdough starter", "count": 50, "questions": [ { "question": "does she do this with every leavener?", "platform": "reddit", "url": "https://www.reddit.com/r/ididnthaveeggs/comments/1ftnq1r/please_dont_eat_raw_sourdough_starter/", "weight": 3258, "from": "comment" }, { "question": "Why wont any bakers give me some starter?", "platform": "reddit", "url": "https://www.reddit.com/r/Sourdough/comments/1tdy9hs/why_wont_any_bakers_give_me_some_starter/", "weight": 768, "from": "post" }, "… 48 more" ], "threads_read": 8, "legs": [ { "key": "reddit#0", "platform": "reddit", "endpoint": "reddit.search.posts", "status": "ok", "credits": 2, "ms": 3337, "error": null }, { "key": "youtube#0", "platform": "youtube", "endpoint": "youtube.search.videos", "status": "ok", "credits": 1, "ms": 1460, "error": null }, "… 10 more" ], "credits_used": 21, "failed": []}Parameters
| Name | Type | Description |
|---|---|---|
topicquery · required | string | The topic. Example: sourdough starter. |
platformsquery | string | string[] | Default reddit, youtube, hackernews, stackoverflow. |
max_questionsquery | integer | Default 50. |
threads_per_sourcequery | integer | null | Threads opened per platform (default 2). |
timeframequery | "week" | "month" | "year" | "all" | Default all. One of week, month, year, all. |
includequery | string | Not used. |
Status codes
| Status | Meaning |
|---|---|
200 | Ranked questions with sources. |
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 was found for that input on any platform. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | Prism composites 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.