100 free credits. No credit card required. Get a key

TikTok user videos API

An account’s videos, about 35 a page, latest, most popular or oldest first, each a full TikTok itemStruct with stats, music, hashtags and caption tracks.

GET /v1/tiktok/users/{handle}/videos1 credit per callRefunded on failure
import os, requests

res = requests.get(
    "https://api.groundsocial.dev/v1/tiktok/users/nasa/videos?sort=popular",
    headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()
Response
200 · 1 credit
{
"itemList": [
{
"id": "7665358680627399966",
"desc": "Not a sunrise. Not a sunset.  An Earthset, captured from lunar flyby on Artemis …",
"createTime": 1784730423,
"author": {
"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/e5143212a59c09a…",
"avatarThumb": "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/e5143212a59c09a…",
"UserStoryStatus": 0,
"…": "12 more fields"
},
"authorStats": {
"followerCount": 2200000,
"followingCount": 23,
"heartCount": 11900000,
"heart": 11900000,
"videoCount": 70,
"diggCount": 370,
"friendCount": 0
},
"stats": {
"playCount": 21200000,
"diggCount": 2700000,
"commentCount": 25800,
"shareCount": 98800,
"collectCount": 161700
},
"statsV2": {
"collectCount": "161736",
"commentCount": "25800",
"diggCount": "2700000",
"playCount": "21200000",
"repostCount": "0",
"shareCount": "98800"
},
"video": {
"duration": 53,
"cover": "https://p19-common-sign.tiktokcdn-us.com/tos-useast8-p-0068-tx2/o0VBAiagACEKKK7Y…",
"playAddr": "https://v16-webapp-prime.us.tiktok.com/video/tos/useast8/tos-useast8-ve-0068c004…",
"subtitleInfos": [
"…"
],
"PlayAddrStruct": {
"…": "8 fields"
},
"VQScore": "54.68",
"bitrate": 427955,
"bitrateInfo": [
"…"
],
"claInfo": {
"…": "5 fields"
},
"codecType": "h264",
"…": "16 more fields"
},
"music": {
"id": "7665358675728550686",
"title": "original sound",
"authorName": "NASA",
"original": true,
"duration": 52,
"playUrl": "https://v16m.tiktokcdn-us.com/e9f07f4333ef8be77d230357f05afd4f/6b06761d/video/to…",
"coverLarge": "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/e5143212a59c09a…",
"coverMedium": "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/e5143212a59c09a…",
"coverThumb": "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/e5143212a59c09a…",
"isCopyrighted": true,
"…": "5 more fields"
},
"AIGCDescription": "",
"…": "27 more fields"
},
"… 1 more"
],
"cursor": "31276",
"hasMore": true
}

Parameters

NameTypeDescription
handlepath · requiredstringHandle, with or without the @, or a profile URL. Example: nasa.
sortquery"latest" | "popular" | "oldest"latest (default), popular or oldest. One of latest, popular, oldest.
cursorquerystringThe 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).

FieldTypeDescription
itemListTikTokItem[]
cursorstringPass as cursor for the next page. Its meaning is the list’s own (a time or an offset).
hasMoreboolean
Status codes
StatusMeaning
200A page of videos, with the cursor for the next.
400Invalid input. Nothing was charged.
401Missing or invalid API key.
402Not enough credits, a spend cap was reached, or payment is required.
403The target is private, or the account is suspended.
404The account, video, comment, hashtag or sound does not exist on TikTok, or was removed.
429Too many requests. Wait for Retry-After seconds.
503TikTok is temporarily unavailable. Retryable; nothing was charged.

Every error has code, message, hint and retryable. All error codes

Questions

What about private accounts?

They answer 403 target_private and are never charged.

TikTok is a trademark of ByteDance Ltd. We are not affiliated with or endorsed by TikTok or ByteDance.