Engagement for many post links at once
Up to 100 post links → current engagement each; failed links not charged. Metered.
POST /v1/prism/post-statsBeta500 credits per callRefunded on failureimport os, requests
res = requests.post(
"https://api.groundsocial.dev/v1/prism/post-stats",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
json={"urls":["https://www.youtube.com/watch?v=dQw4w9WgXcQ","https://news.ycombinator.com/item?id=8863"]},
)
res.raise_for_status()
data = res.json()Response
200 · 500 credits{ "count": 2, "ok": 2, "results": [ { "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ", "ok": true, "platform": "youtube", "id": "dQw4w9WgXcQ", "views": 1840617441, "likes": 19517793, "comments": 2462543, "shares": null, "created_at": "2009-10-25T06:57:33.000Z" }, { "url": "https://news.ycombinator.com/item?id=8863", "ok": true, "platform": "hackernews", "id": "8863", "views": null, "likes": 104, "comments": null, "shares": null, "created_at": "2007-04-04T19:16:40.000Z" } ], "credits_used": 2}Status codes
| Status | Meaning |
|---|---|
200 | One row per URL. |
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.