Social networks
TikTok API
Retrieve public TikTok profiles, videos and photo posts, captions, comments, followers, searches, hashtags, sounds and the trending feed as the JSON records TikTok's own web app receives, without an account.
Retrieve TikTok profiles, videos, transcripts, comments, account connections and live rooms. Search accounts, videos and hashtags, explore songs and read trending videos.
API availability: Available
http://localhost:3038Public API: https://api.scrapeatlas.com.Endpoints
/v1/tiktok/profileGet a TikTok profile
Read a public profile from the server-rendered profile document: TikTok's user record, stats and statsV2. A numeric user_id is resolved through TikTok's own share redirect.
Reference/v1/tiktok/profile/videosList a TikTok profile's videos
List a creator's public TikTok videos newest first, with cursor pagination.
Reference/v1/tiktok/videoGet a TikTok video or photo post
Read one post by permalink or share link: the item record TikTok's web app receives (itemInfo.itemStruct) with author, stats, video addresses, caption tracks, music, hashtags and, for photo posts, imagePost.
Reference/v1/tiktok/video/transcriptGet a TikTok video transcript
Return the WebVTT caption file TikTok publishes for a video (TikTok's automatic captions or the creator's), in the requested language when TikTok has it.
Reference/v1/tiktok/video/commentsList TikTok video comments
List a post's comments through TikTok's web comment feed (50 per page, cursor paged): comment records with cid, text, create_time, digg_count, reply_comment_total, user and share_info.
Reference/v1/tiktok/video/comment/repliesList replies to a TikTok comment
List the replies to one comment through TikTok's web reply feed (50 per page, cursor paged); the same comment records as the comments route with reply_id, reply_to_userid and reply_to_username.
Reference/v1/tiktok/user/followersList a TikTok user's followers
List accounts following a TikTok user, with profile statistics and cursor pagination.
Reference/v1/tiktok/user/followingList the accounts a TikTok user follows
List the accounts a user follows through TikTok's web relation feed (30 per page, cursor paged) as web user records with stats.
Reference/v1/tiktok/user/liveGet a TikTok user's live room
Read a user's live page state: whether the account is live now, the streamer's user record with counters, and the room (title, cover, start time, status, viewer stats, stream and HEVC stream data with FLV, HLS and CMAF URLs per quality).
Reference/v1/tiktok/search/usersSearch TikTok users
Search accounts through TikTok's web user search (cursor paged): user_list records with user_info (uid, unique_id, nickname, signature, sec_uid, follower_count, total_favorited, custom_verify, avatar_thumb) plus TikTok's search envelope.
Reference/v1/tiktok/search/keywordSearch TikTok videos by keyword
Search videos through TikTok's web video search (cursor paged, optional date and sort filters) as web item records.
Reference/v1/tiktok/search/topGet TikTok top search results
Read TikTok's Top search tab (videos and photo carousels, cursor paged, optional date and sort filters) as the web app receives it: data rows with a type and the item record.
Reference/v1/tiktok/search/hashtagList TikTok videos for a hashtag
Retrieve a TikTok hashtag and its video records, with cursor pagination.
Reference/v1/tiktok/hashtagGet TikTok hashtag details
Read a hashtag's record (id, title, description, covers, view and video counts) from TikTok's web challenge feed.
Reference/v1/tiktok/songGet TikTok song details
Read a sound's record from TikTok's web music feed: title, artist, album, duration, original flag, covers, play URL and the number of videos using it.
Reference/v1/tiktok/song/videosList TikTok videos using a song
List the videos using a sound through TikTok's web music feed (30 per page, cursor paged) as web item records.
Reference/v1/tiktok/trendingGet the TikTok trending feed
Retrieve a batch of trending TikTok video records.
ReferenceQuick start
Create an API key on your account page, then call the public API. Values below are placeholders.
curl "https://api.scrapeatlas.com/v1/tiktok/profile?handle=example" \
-H "x-api-key: YOUR_API_KEY"Coverage & limits
- Independent worker on port 3038, TIKTOK_API_KEY in x-api-key. No TikTok account, login, cookie store, storage, media download or product dependency; a fresh headed Patchright Chromium per operation opens one www.tiktok.com document and issues the feed calls TikTok's web app signs; only www.tiktok.com documents, scripts and same-origin calls, TikTok's script bundles, the security SDK's token calls and a requested caption file may leave the process.
- Two concurrent operations, 90-second deadline, at most eighteen upstream calls per operation (per session: the document, one redirect hop, up to two feed calls and a caption file; up to five sessions through a proxy when an exit is throttled or stalls, two directly). Rate limits and 4xx answers are never retried.
- 4 MiB decoded bytes per operation, JSON depth 64 and 600,000 nodes, 512 KiB caption files; 30 videos, 50 comments and 30 users per page; 100 records per list with items_truncated.
- TikTok throttles its feeds per exit address (a throttled exit answers an empty body, reported as upstream_challenged) and blocks data-centre ranges; TIKTOK_PROXY_URL (falling back to TWITCH_PROXY_URL) routes each session through a fresh residential proxy session.
- Responses are TikTok's web records, with TikTok's web field names and types.
| HTTP | failure.code | Meaning |
|---|---|---|
| 400 | invalid_request | Missing, duplicate, ambiguous or unsupported parameters, unsupported URL forms, handles, cursors, regions, sorts or languages. |
| 401 | unauthorized | Invalid API key. |
| 403 | restricted_page | TikTok restricts the account or post (private video, private account, region block, or a redirect to its login page). |
| 404 | not_found | Unknown or removed account, post, hashtag or sound, a post without captions, or a TikTok status code naming a missing resource. |
| 429 | upstream_rate_limited | TikTok rate limited the request. |
| 502 | upstream_challenged | TikTok answered its verification page, an HTTP 401/403, a document without the app state, or refused a feed call with an empty body (status challenged). |
| 502 | unsafe_redirect | TikTok redirected outside the requested resource. |
| 502 | unsupported_page | Layout, identity or feed-envelope checks failed, or a non-JSON feed answer was served. |
| 502 | response_too_large | The upstream response exceeded 4 MiB (512 KiB for caption files). |
| 502 | payload_too_complex | The embedded JSON exceeded parsing limits. |
| 502 | request_limit | The upstream call budget was exhausted. |
| 502 | upstream_error | Network failure, a stalled exit, an unexpected upstream status after one retry, or an unexpected TikTok status code. |
| 503 | busy | All retrieval slots are occupied. |
| 504 | timeout | The 90-second deadline elapsed. |