TikTok collection videos API
The videos in a public TikTok collection, 30 a page.
GET /v1/tiktok/collections/{id}/videos1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/tiktok/collections/7394627756635573022/videos",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 1 credit{ "itemList": [ { "id": "7399631056783035690", "desc": "", "createTime": 1722860874, "author": { "id": "6791598551904076805", "uniqueId": "nojo18", "nickname": "Noah Lyles", "secUid": "MS4wLjABAAAAH10iXqncdQ9WqgUozawE5UFvRGS_WuS7bqXNwCmYyURFVweqtROjIPuZOB6ctng1", "signature": "Official TikTok of Noah Lyles \nOlympian, World Champion, Adidas athletes", "verified": true, "privateAccount": false, "avatarLarger": "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/16b25128fbffca0…", "avatarThumb": "https://p19-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/16b25128fbffca0…", "avatarMedium": "https://p19-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/16b25128fbffca0…", "…": "11 more fields" }, "authorStats": { "followerCount": 439400, "followingCount": 279, "heartCount": 4500000, "heart": 4500000, "videoCount": 63, "diggCount": 44800, "friendCount": 0 }, "stats": { "playCount": 3400000, "diggCount": 500900, "commentCount": 3164, "shareCount": 22600, "collectCount": 39000 }, "statsV2": { "collectCount": "39038", "commentCount": "3164", "diggCount": "500900", "playCount": "3400000", "repostCount": "0", "shareCount": "22600" }, "video": { "duration": 48, "cover": "https://p19-common-sign.tiktokcdn-us.com/tos-useast5-p-0068-tx/oYQIDWNuYCYeHwMTg…", "playAddr": "https://v16-webapp-prime.us.tiktok.com/video/tos/useast5/tos-useast5-pve-0068-tx…", "subtitleInfos": [ "…" ], "PlayAddrStruct": { "…": "8 fields" }, "VQScore": "44.44", "bitrate": 1179662, "bitrateInfo": [ "…" ], "claInfo": { "…": "5 fields" }, "codecType": "h264", "…": "16 more fields" }, "music": { "id": "7399631020024285998", "title": "original sound", "authorName": "Noah Lyles", "original": true, "duration": 48, "playUrl": "https://v16m.tiktokcdn-us.com/b50f83bcd23be6e2afd22c94a7e53ea3/6b068791/video/to…", "coverLarge": "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/16b25128fbffca0…", "coverMedium": "https://p19-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/16b25128fbffca0…", "coverThumb": "https://p19-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/16b25128fbffca0…", "isCopyrighted": true, "…": "5 more fields" }, "AIGCDescription": "", "…": "27 more fields" }, "… 1 more" ], "cursor": "30", "hasMore": true}Parameters
| Name | Type | Description |
|---|---|---|
idpath · required | string | Collection id, or its tiktok.com/@user/collection/… URL. |
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 the collection’s 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
What if the collection is private?
Private or missing collections answer 404 target_not_found and are never charged.
TikTok is a trademark of ByteDance Ltd. We are not affiliated with or endorsed by TikTok or ByteDance.