TikTok hashtag videos API
Videos tagged with a hashtag, as TikTok’s hashtag page ranks them, about 30 a page.
GET /v1/tiktok/hashtags/{name}/videos1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/tiktok/hashtags/cooking/videos",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 1 credit{ "itemList": [ { "id": "7707446852798549279", "desc": "30-Minute Garlic Butter Steak Bites & Potatoes 🥩🥔🧄 If you need a quick and easy …", "createTime": 1794529821, "author": { "id": "6984625953838629894", "uniqueId": "tastewithnicki", "nickname": "Nicki Mejia", "secUid": "MS4wLjABAAAAu9rP1LyAuFo7sMDNeuwiLyblG8x_L8K_JNU95rzJRIG_ykvSurNwtKrUoMZTd3LI", "signature": "• Food • Recipes • Local Spots •\n📍Cleveland Foodie, Blogger, & Mom 👩🏽🍳✨", "verified": false, "privateAccount": false, "avatarLarger": "https://p16-common-sign.tiktokcdn-us.com/tos-useast8-avt-0068-tx2/38b3cdddae3bde…", "avatarThumb": "https://p16-common-sign.tiktokcdn-us.com/tos-useast8-avt-0068-tx2/38b3cdddae3bde…", "avatarMedium": "https://p19-common-sign.tiktokcdn-us.com/tos-useast8-avt-0068-tx2/38b3cdddae3bde…", "…": "11 more fields" }, "authorStats": { "followerCount": 76700, "followingCount": 1241, "heartCount": 6400000, "heart": 6400000, "videoCount": 560, "diggCount": 30800, "friendCount": 0 }, "stats": { "playCount": 6600000, "diggCount": 628800, "commentCount": 937, "shareCount": 104700, "collectCount": 298100 }, "statsV2": { "collectCount": "298128", "commentCount": "937", "diggCount": "628800", "playCount": "6600000", "repostCount": "0", "shareCount": "104700" }, "video": { "duration": 61, "cover": "https://p16-common-sign.tiktokcdn-us.com/tos-useast8-p-0068-tx2/o0aDBAv3Z5B0iiQI…", "playAddr": "https://v16-webapp-prime.us.tiktok.com/video/tos/useast8/tos-useast8-ve-0068c001…", "subtitleInfos": [ "…" ], "PlayAddrStruct": { "…": "8 fields" }, "VQScore": "72", "bitrate": 1946036, "bitrateInfo": [ "…" ], "claInfo": { "…": "5 fields" }, "codecType": "h264", "…": "16 more fields" }, "music": { "id": "7024767431834863618", "title": "There Is Something On Your Mind", "authorName": "Big Jay McNeely", "original": false, "duration": 223, "playUrl": "https://sf19.tiktokcdn-us.com/obj/tos-alisg-ve-2774/4510db0484ef4f0fa3c30c69d757…", "coverLarge": "https://p19-common.tiktokcdn-us.com/tos-alisg-v-2774/o0AAnIAPUzoCIre5kZE1BFytZBx…", "album": "Lowrider Oldies Vol.7", "coverMedium": "https://p16-common.tiktokcdn-us.com/tos-alisg-v-2774/o0AAnIAPUzoCIre5kZE1BFytZBx…", "coverThumb": "https://p16-common.tiktokcdn-us.com/tos-alisg-v-2774/o0AAnIAPUzoCIre5kZE1BFytZBx…", "…": "6 more fields" }, "challenges": [ { "…": "9 fields" }, "… 4 more" ], "…": "29 more fields" }, "… 1 more" ], "cursor": "30", "hasMore": true}Parameters
| Name | Type | Description |
|---|---|---|
namepath · required | string | Hashtag, with or without the #. Example: cooking. |
cursorquery | string | The previous page’s cursor, for the next page. Omit for the first. |
Response fields
200 with a TikTokItemListResponse, in TikTok’s own web JSON (itemStruct, userInfo, comments).
| Field | Type | Description |
|---|---|---|
itemList | TikTokItem[] | |
cursor | string | Pass as cursor for the next page. Its meaning is the list’s own (a time or an offset). |
hasMore | boolean |
Status codes
| Status | Meaning |
|---|---|
200 | A page of videos. |
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.