TikTok profile API
A public TikTok profile by handle: nickname, bio and bio link, verification, private flag, avatar, secUid, and follower, following, like and video counts, as TikTok’s own userInfo.
GET /v1/tiktok/users/{handle}1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/tiktok/users/nasa",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 1 credit{ "userInfo": { "user": { "id": "7664638705177150477", "uniqueId": "nasa", "nickname": "NASA", "secUid": "MS4wLjABAAAAU9BRVzC8oCaegVnia8IbqWhPb_-dbU7s00Y3wS1_Nx8g5RUaYvyXrpejgjdxTwd6", "signature": "Making the seemingly impossible, possible.✨", "verified": true, "privateAccount": false, "avatarLarger": "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/e5143212a59c09a008bf50f487d54d1f~tplv-tiktokx-cropcente…", "avatarThumb": "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/e5143212a59c09a008bf50f487d54d1f~tplv-tiktokx-cropcente…", "createTime": 1784562949, "bioLink": { "link": "go.nasa.gov/3WyvlQi", "risk": 0 }, "shortId": "", "avatarMedium": "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/e5143212a59c09a008bf50f487d54d1f~tplv-tiktokx-cropcente…", "ftc": false, "relation": 0, "openFavorite": false, "commentSetting": 0, "commerceUserInfo": { "commerceUser": false }, "duetSetting": 0, "stitchSetting": 0, "secret": false, "isADVirtual": false, "roomId": "", "uniqueIdModifyTime": 0, "…": "16 more fields" }, "stats": { "followerCount": 2200000, "followingCount": 23, "heartCount": 11900000, "heart": 11900000, "videoCount": 70, "diggCount": 0, "friendCount": 17 }, "statsV2": { "followerCount": "2224722", "followingCount": "23", "heart": "11912686", "heartCount": "11912686", "videoCount": "70", "diggCount": "0", "friendCount": "17" } }, "shareMeta": { "title": "NASA on TikTok", "desc": "@nasa 2.2m Followers, 23 Following, 11.9m Likes - Watch awesome short videos created by NASA" }}Parameters
| Name | Type | Description |
|---|---|---|
handlepath · required | string | Handle, with or without the @, or a profile URL. Example: nasa. |
Response fields
200 with a TikTokUserResponse, in TikTok’s own web JSON (itemStruct, userInfo, comments).
| Field | Type | Description |
|---|---|---|
userInfo | object | |
shareMeta | object |
Status codes
| Status | Meaning |
|---|---|
200 | The profile (userInfo.user) and its counters (userInfo.stats). |
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.