TikTok following API
Accounts a public TikTok account follows, 30 a page, when the account shows the list.
GET /v1/tiktok/users/{handle}/following1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/tiktok/users/nasa/following",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 1 credit{ "userList": [ { "user": { "id": "7566352102659064887", "uniqueId": "freedom250", "nickname": "Freedom 250", "secUid": "MS4wLjABAAAA927o3zHxfudDnim6_JtQO_vF1GB-xC39hrvp-FoDJp-vuypAjyURRyogMfKKsJY0", "signature": "Freedom 250 is a non-partisan organization delivering presidential-level celebrations for our nation’s 250th birthday.", "verified": true, "privateAccount": false, "avatarLarger": "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/28b18382a9c579899470a2244b802d39~tplv-tiktokx-cropcente…", "avatarThumb": "https://p19-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/28b18382a9c579899470a2244b802d39~tplv-tiktokx-cropcente…", "UserStoryStatus": 0, "avatarMedium": "https://p19-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/28b18382a9c579899470a2244b802d39~tplv-tiktokx-cropcente…", "commentSetting": 0, "downloadSetting": 0, "duetSetting": 0, "ftc": false, "isADVirtual": false, "openFavorite": false, "relation": 0, "secret": false, "shortDramaCreator": {}, "stitchSetting": 0, "ttSeller": false }, "stats": { "followerCount": 121900, "followingCount": 73, "heartCount": 1300000, "heart": 1300000, "videoCount": 206, "diggCount": 96, "friendCount": 0 }, "statsV2": { "diggCount": "96", "followerCount": "121879", "followingCount": "73", "friendCount": "0", "heart": "1286340", "heartCount": "1286340", "videoCount": "206" } }, { "user": { "id": "6664606052599234566", "uniqueId": "snoopy", "nickname": "Snoopy", "secUid": "MS4wLjABAAAA_koFVCM4NeoOqAdo46YE-YwasHf8k6peh1lA9Unpsu5_ruMz1dQwk3_4LfQ4RvUm", "signature": "The official account for Snoopy and the Peanuts gang!", "verified": true, "privateAccount": false, "avatarLarger": "https://p19-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/c48b9de0b3fdb3b7d60ab958ecf11381~tplv-tiktokx-cropcente…", "avatarThumb": "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/c48b9de0b3fdb3b7d60ab958ecf11381~tplv-tiktokx-cropcente…", "UserStoryStatus": 0, "avatarMedium": "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/c48b9de0b3fdb3b7d60ab958ecf11381~tplv-tiktokx-cropcente…", "commentSetting": 0, "downloadSetting": 3, "duetSetting": 0, "ftc": false, "isADVirtual": false, "openFavorite": true, "relation": 0, "secret": false, "shortDramaCreator": {}, "stitchSetting": 0, "ttSeller": false }, "stats": { "followerCount": 4100000, "followingCount": 3, "heartCount": 58900000, "heart": 58900000, "videoCount": 489, "diggCount": 255, "friendCount": 0 }, "statsV2": { "diggCount": "255", "followerCount": "4086268", "followingCount": "3", "friendCount": "0", "heart": "58875507", "heartCount": "58875507", "videoCount": "489" } }, "… 21 more" ], "cursor": "1784664162", "hasMore": false, "total": 23}Parameters
| Name | Type | Description |
|---|---|---|
handlepath · required | string | Handle, with or without the @, or a profile URL. Example: nasa. |
cursorquery | string | The previous page’s cursor, for the next page. Omit for the first. |
Response fields
200 with a TikTokUserListResponse, in TikTok’s own web JSON (itemStruct, userInfo, comments).
| Field | Type | Description |
|---|---|---|
userList | object[] | |
cursor | string | Pass as cursor for the next page (TikTok’s minCursor). |
hasMore | boolean | |
total | number |
Status codes
| Status | Meaning |
|---|---|
200 | A page of followed accounts. |
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
Why is it private for big accounts?
TikTok lets accounts hide the list, and many large creators do. Those answer 403 target_private, never charged.
TikTok is a trademark of ByteDance Ltd. We are not affiliated with or endorsed by TikTok or ByteDance.