TikTok hashtag API
A TikTok hashtag: its id, description and video and view counts.
GET /v1/tiktok/hashtags/{name}1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/tiktok/hashtags/cooking",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 1 credit{ "challengeInfo": { "challenge": { "id": "18973", "title": "cooking", "desc": "", "isCommerce": false, "coverLarger": "", "coverMedium": "", "coverThumb": "", "profileLarger": "https://p19-common-sign.tiktokcdn-us.com/musically-maliva-obj/bbbcb935f04337b7e6bdb05ee1b9f5e5.jpeg~tplv-tiktokx-origin.…", "profileMedium": "https://p19-common-sign.tiktokcdn-us.com/musically-maliva-obj/bbbcb935f04337b7e6bdb05ee1b9f5e5.jpeg~tplv-tiktokx-origin.…", "profileThumb": "https://p19-common-sign.tiktokcdn-us.com/musically-maliva-obj/bbbcb935f04337b7e6bdb05ee1b9f5e5.jpeg~tplv-tiktokx-origin.…", "splitTitle": "cooking", "stats": { "videoCount": 0, "viewCount": 567400000000 } }, "stats": { "videoCount": 0, "viewCount": 567400000000 }, "statsV2": { "videoCount": "19592701", "viewCount": "567377075701" }, "challengeAnnouncement": { "body": "", "title": "" } }}Parameters
| Name | Type | Description |
|---|---|---|
namepath · required | string | Hashtag, with or without the #, or its URL. Example: cooking. |
Response fields
200 with a TikTokHashtagResponse, in TikTok’s own web JSON (itemStruct, userInfo, comments).
| Field | Type | Description |
|---|---|---|
challengeInfo | object |
Status codes
| Status | Meaning |
|---|---|
200 | The hashtag (challengeInfo). |
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 account, video, comment, hashtag or sound does not exist on TikTok, or was removed. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | TikTok is temporarily unavailable. Retryable; nothing was charged. |
Every error has code, message, hint and retryable. All error codes
TikTok is a trademark of ByteDance Ltd. We are not affiliated with or endorsed by TikTok or ByteDance.