100 free credits. No credit card required. Get a key

What languages a creator’s audience writes in

Language mix of the comments on a creator’s recent posts. Metered.

GET /v1/prism/audience-languageBeta26 credits per callRefunded on failure
import os, requests

res = requests.get(
    "https://api.groundsocial.dev/v1/prism/audience-language?platform=tiktok&handle=khaby.lame",
    headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()
Response
200 · 26 credits
{
"platform": "tiktok",
"handle": "khaby.lame",
"comments": 65,
"posts": 5,
"languages": [
{
"language": "unknown",
"count": 30,
"share": 0.462
},
{
"language": "en",
"count": 16,
"share": 0.246
},
"… 8 more"
],
"method": "script and stopwords",
"legs": [
{
"key": "tiktok:posts",
"platform": "tiktok",
"endpoint": "tiktok.user.videos",
"status": "ok",
"credits": 1,
"ms": 4,
"error": null
},
{
"key": "0",
"platform": "tiktok",
"endpoint": "tiktok.video.comments",
"status": "ok",
"credits": 1,
"ms": 626,
"error": null
},
"… 4 more"
],
"credits_used": 6,
"failed": []
}

Parameters

NameTypeDescription
platformquery · requiredstringtiktok, instagram, youtube, x, threads, bluesky, reddit. Example: tiktok.
handlequery · requiredstringA handle (with or without @) or a profile link. Example: mkbhd.
postsqueryintegerPosts to read comments of (default 5).
Status codes
StatusMeaning
200Language shares of the comments.
400Invalid input. Nothing was charged.
401Missing or invalid API key.
402Not enough credits, a spend cap was reached, or payment is required.
403The target is private, or the account is suspended.
404Nothing was found for that input on any platform.
429Too many requests. Wait for Retry-After seconds.
503Prism 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.