TikTok top videos API
TikTok’s own top-videos board for a market: videos created in the last 7 or 30 days, by views, engagement or completion.
GET /v1/tiktok/trending/videos1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/tiktok/trending/videos?country=US&period=7",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 1 credit{ "entityInfos": [ { "itemInfo": { "itemID": "7691731357294152974", "authorID": "7532541110103867406", "contentType": 1, "coverURL": "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-p-0068-tx/oogoQFgR5EB6M0TqAyC2QhQefQE…", "coverURLList": [ { "…": "2 fields" }, { "…": "2 fields" } ], "createTime": "1790870796", "creatorID": "6992810747127628805", "title": "AD sparkling through the city, as part of #thediamondcollective @The Diamond Collective ", "videoURL": "https://v16m-default.tiktokcdn-us.com/bc115036eff2290f90ca4abccb5c97e0/6b067eb5/video/tos/…" }, "itemAuthorInfo": { "avatarURI": "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/5a124cccf2dadf0c7e34d0f4a…", "bio": "NYC\nArtist--multicurious lover\n⭐️subscribe to my youtube⭐️\nsebin@dulcedo.com", "handlerName": "deathstatequilibrium", "nickName": "sebin🌟" }, "itemMetrics": { "engagementRate": 0.0004565897757430412, "engagementRateLifeTime": 0.0007131562268624228, "organicVideoViews": "5017483", "organicVideoViewsLifeTime": "31217086", "sixSecondsVTR": 0.009636825498597203, "sixSecondsVTRLifeTime": 0.011701371964817882, "videoViews": "51878078", "videoViewsLifeTime": "234968151" }, "itemAuthorMetrics": { "followers": "117256" } }, { "itemInfo": { "itemID": "7678479724896587038", "authorID": "7070293872819044358", "contentType": 1, "coverURL": "https://p16-common-sign.tiktokcdn-us.com/tos-useast8-p-0068-tx2/ocK3E0iPwBkRoAA5XXAPvCEAiB…", "coverURLList": [ { "…": "2 fields" }, { "…": "2 fields" } ], "createTime": "1787785387", "creatorID": "6880574638150697990", "title": "Five years ago, I started my small business with no idea what it would grow into. From wor…", "videoURL": "https://v16m-default.tiktokcdn-us.com/37a23ad1f71c39e1dfd697f1ad694d53/6b067ec4/video/tos/…" }, "itemAuthorInfo": { "avatarURI": "https://p16-common-sign.tiktokcdn-us.com/tos-useast8-avt-0068-tx2/7d6ee80f6e94a044a88786ee…", "bio": "your favorite hand-drawn crewnecks & tees\n🧸🤍🎨\nentrepreneur & nurse\nShop Below ◡̈", "handlerName": "megannco", "nickName": "Meg Ann Co." }, "itemMetrics": { "engagementRate": 0.0013633322396169325, "engagementRateLifeTime": 0.0016093465367882222, "organicVideoViews": "5187904", "organicVideoViewsLifeTime": "19207771", "sixSecondsVTR": 0.030609222943414737, "sixSecondsVTRLifeTime": 0.03216759125618045, "videoViews": "42046244", "videoViewsLifeTime": "195686257" }, "itemAuthorMetrics": { "followers": "271347" } } ], "periodEndTimestamp": "1795392000", "page": 1, "hasMore": false}Parameters
| Name | Type | Description |
|---|---|---|
countryquery | string | Market (default US). |
periodquery | "7" | "30" | Days: 7 (default) or 30. One of 7, 30. |
orderquery | "views" | "engagement" | "completion" | views (default), engagement or completion. One of views, engagement, completion. |
pagequery | integer | Page, from 1. |
Response fields
200 with a TikTokPopularVideosResponse, in TikTok’s own web JSON (itemStruct, userInfo, comments).
| Field | Type | Description |
|---|---|---|
entityInfos | object[] | |
periodEndTimestamp | string | |
page | number | |
hasMore | boolean |
Status codes
| Status | Meaning |
|---|---|
200 | The video board. |
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
Which markets?
TikTok publishes this board for the US, Japan, Vietnam, Thailand and Indonesia.
TikTok is a trademark of ByteDance Ltd. We are not affiliated with or endorsed by TikTok or ByteDance.