Official scripts
Explore our curated collection of scripts
Like a TikTok video
Like a TikTok video (as the logged-in account) by URL or id. Safe to repeat: it does nothing if you already liked it.
Follow a TikTok user
Follow a TikTok user (as the logged-in account) by @username. Safe to repeat: it does nothing if you already follow them.
Search TikTok videos
Search TikTok videos by keyword, newest-relevance order, up to `count`.
Unlike a TikTok video
Remove your like from a TikTok video (as the logged-in account) by URL or id. Safe to repeat: it does nothing if you haven't liked it.
Search TikTok users
Search TikTok accounts by keyword. Returns the top ~10 matches (TikTok web caps user search; not deeply paginable).
Get TikTok profile
Get a TikTok user's profile (bio, stats, verified, secUid) by @username.
Get TikTok video
Get a TikTok video's caption, stats, author, music, hashtags and metadata by URL or video id.
Get TikTok video comments
List the top-level comments on a TikTok video, given its URL or id, in newest-relevance order.
Get TikTok related videos
Get the “you may like” related-video recommendations shown next to a TikTok video (a single ~12-item snapshot, not a paginable list).
Unfollow a TikTok user
Unfollow a TikTok user (as the logged-in account) by @username. Safe to repeat: it does nothing if you don't follow them.
Get TikTok search suggestions
Get TikTok's search autocomplete suggestions for a query (the dropdown TikTok shows as you type). Some suggestions are hashtags (marked isHashtag) — pipe those into get_hashtag_info for stats. TikTok web has no hashtag-search results page, so this autocomplete is the only keyword-to-hashtag discovery surface.
Get TikTok user videos
List a TikTok user's videos (newest first) by @username, up to `count`.
Get TikTok user reposts
List the videos a TikTok user has reposted (from their Reposts tab), by @username, up to `count`.
Get TikTok sound/music videos
List videos that use a given TikTok sound, by music id, up to `count`.
Download TikTok video (mp4)
Download a TikTok video's mp4 bytes by URL or id, returned as base64 (caller decodes to a file). Pick a quality to control size.
Get TikTok comment replies
List the replies to a TikTok comment, given the parent comment id and the video id.
Get TikTok music info
Get a TikTok sound's metadata by music id: title, author, duration, video count, original/commercial flags, cover and play URL. Complements get_music_videos (which lists the videos using the sound).
Get TikTok hashtag info
Get a TikTok hashtag/challenge's stats (exact video & view counts), id, title and description by name (with or without a leading #). TikTok removed the web hashtag video feed, so only the hashtag's metadata is available — to list videos, use search_videos by keyword.
Get TikTok following
List who a TikTok user follows, by @username. Accounts that keep their following list hidden, and private accounts, are reported with a clear reason instead of an empty or partial list; a handle nobody owns is reported as such. For third-party accounts, TikTok caps the list and pads short ones with suggested accounts, so check `total` and `truncated`; results are only fully reliable for accounts you can see in full, such as your own.
Get TikTok notifications
List the logged-in account's activity notifications (the Activité inbox): likes, follows, comments and mentions received, newest first. Each notification carries who triggered it, the target video/comment, and read state.
Get TikTok trending videos
Get a sample of TikTok's Explore (trending) feed. The feed is re-ranked on every request (no stable cursor), so the script accumulates distinct videos across several calls up to `count` — a fresh trending snapshot, not a deterministic paginated list.
Get TikTok user liked videos
List the videos a TikTok user has liked (their Liked tab), by @username. Returns [] unless the account has set Liked videos to public (private by default).
Get TikTok user favorites
List the videos a TikTok user has added to their Favorites (their Favoris tab), by @username. Returns [] unless the account has set Favorites to public (private by default).
Delete your own TikTok comment
Remove a comment you posted on a TikTok video, given the comment's id. Pass the video as well and the script re-reads that video's comments afterwards to confirm the comment is really gone rather than trusting the response. You can only delete comments published from your own account, and deletion cannot be undone.
Get TikTok followers
List a TikTok user's followers by @username, paginated. A handle nobody owns is reported as no such account rather than a vague lookup failure, and an account that will not disclose its followers (private accounts show them only to approved followers) is reported with the reason instead of a bare API code. Note that an account hiding who it follows still discloses its followers normally. Returns total, hasMore, truncated, and users (id, uniqueId, secUid, nickname, signature, verified, privateAccount, followerCount).
