TikTok search API
TikTok videos for a keyword, 16 a page, from TikTok’s public keyword pages, each a full video object.
GET /v1/tiktok/search/videos1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/tiktok/search/videos?q=easy+dinner+recipes",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 1 credit{ "itemList": [ { "id": "7709170894416940301", "desc": "This dinner is as easy as 1, 2, 3! 🎉 The formula is simple: a veg + a meat + a s…", "createTime": 1794931229, "author": { "id": "6745140220566815750", "uniqueId": "allrecipes", "nickname": "Allrecipes", "secUid": "MS4wLjABAAAAP7uNEk3SpknQe60x8XD2P6l74tH3enBUG6Z4jhCNcPw7dL0r7nCQaAXFK1L-nxSL", "signature": "We like food, hbu?", "verified": true, "privateAccount": false, "avatarLarger": "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/733709305062096…", "avatarThumb": "https://p19-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/733709305062096…", "avatarMedium": "https://p19-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/733709305062096…", "…": "8 more fields" }, "authorStats": { "followerCount": 2100000, "followingCount": 354, "heartCount": 29600000, "heart": 29600000, "videoCount": 2383, "diggCount": 4828 }, "stats": { "playCount": 271200, "diggCount": 12200, "commentCount": 107, "shareCount": 3411, "collectCount": 8794 }, "video": { "duration": 25, "cover": "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-p-85c255-tx/oQnQAIaIGQcQrT9…", "playAddr": "https://v16-webapp-prime.us.tiktok.com/video/tos/useast5/tos-useast5-v-85c255-tx…", "subtitleInfos": [ "…" ], "bitrate": 1769513, "bitrateInfo": [ "…" ], "codecType": "h264", "definition": "720p", "dynamicCover": "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-p-85c255-tx/oQQdbGFrXe4eQLe…", "encodeUserTag": "", "…": "9 more fields" }, "music": { "id": "7709170919171689230", "title": "original sound", "authorName": "Allrecipes", "original": false, "duration": 25, "playUrl": "https://v16m.tiktokcdn-us.com/1321b6f975b6ec6f5e8f6e6cff6aeaac/6b067624/video/to…", "coverLarge": "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/733709305062096…", "coverMedium": "https://p19-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/733709305062096…", "coverThumb": "https://p19-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/733709305062096…" }, "challenges": [ { "…": "9 fields" }, "… 3 more" ], "textExtra": [ { "…": "10 fields" }, "… 4 more" ], "…": "14 more fields" }, "… 1 more" ], "cursor": "3", "hasMore": true}Parameters
| Name | Type | Description |
|---|---|---|
qquery · required | string | Keyword or phrase. Example: easy dinner recipes. |
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
Questions
Can I filter by date or sort?
TikTok’s in-app search filters need a logged-in session, so they are not offered.
TikTok is a trademark of ByteDance Ltd. We are not affiliated with or endorsed by TikTok or ByteDance.