Skip to content
scrapeatlas.Dashboard

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.

17 endpointsx-api-key

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

Base URL · local workerhttp://localhost:3038Public API: https://api.scrapeatlas.com.
Authenticationx-api-keyCustomer key from your account. See Authentication.

Endpoints

GET/v1/tiktok/profile

Get 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
GET/v1/tiktok/profile/videos

List a TikTok profile's videos

List a creator's public TikTok videos newest first, with cursor pagination.

Reference
GET/v1/tiktok/video

Get 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
GET/v1/tiktok/video/transcript

Get 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
GET/v1/tiktok/video/comments

List 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
GET/v1/tiktok/video/comment/replies

List 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
GET/v1/tiktok/user/followers

List a TikTok user's followers

List accounts following a TikTok user, with profile statistics and cursor pagination.

Reference
GET/v1/tiktok/user/following

List 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
GET/v1/tiktok/user/live

Get 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
GET/v1/tiktok/search/users

Search 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
GET/v1/tiktok/search/keyword

Search TikTok videos by keyword

Search videos through TikTok's web video search (cursor paged, optional date and sort filters) as web item records.

Reference
GET/v1/tiktok/search/top

Get 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
GET/v1/tiktok/search/hashtag

List TikTok videos for a hashtag

Retrieve a TikTok hashtag and its video records, with cursor pagination.

Reference
GET/v1/tiktok/hashtag

Get TikTok hashtag details

Read a hashtag's record (id, title, description, covers, view and video counts) from TikTok's web challenge feed.

Reference
GET/v1/tiktok/song

Get 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
GET/v1/tiktok/song/videos

List 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
GET/v1/tiktok/trending

Get the TikTok trending feed

Retrieve a batch of trending TikTok video records.

Reference

Quick start

Create an API key on your account page, then call the public API. Values below are placeholders.

Terminal
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.
Error codes
14
HTTPfailure.codeMeaning
400invalid_requestMissing, duplicate, ambiguous or unsupported parameters, unsupported URL forms, handles, cursors, regions, sorts or languages.
401unauthorizedInvalid API key.
403restricted_pageTikTok restricts the account or post (private video, private account, region block, or a redirect to its login page).
404not_foundUnknown or removed account, post, hashtag or sound, a post without captions, or a TikTok status code naming a missing resource.
429upstream_rate_limitedTikTok rate limited the request.
502upstream_challengedTikTok 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).
502unsafe_redirectTikTok redirected outside the requested resource.
502unsupported_pageLayout, identity or feed-envelope checks failed, or a non-JSON feed answer was served.
502response_too_largeThe upstream response exceeded 4 MiB (512 KiB for caption files).
502payload_too_complexThe embedded JSON exceeded parsing limits.
502request_limitThe upstream call budget was exhausted.
502upstream_errorNetwork failure, a stalled exit, an unexpected upstream status after one retry, or an unexpected TikTok status code.
503busyAll retrieval slots are occupied.
504timeoutThe 90-second deadline elapsed.