TikTok-Api errors (EmptyResponseException, 200 empty body, Captcha, statusCode): how do I fix them?
David Teather's Python TikTok-Api library fails mainly from TikTok's signature upgrades and headless-browser checks: api.user().videos() returns HTTP 200 with an empty body because TikTok now requires X-Gnarly instead of X-Bogus (issue #1311, Jul 2026), EmptyResponseException fires when headless Playwright or an IP is flagged (issues #1090, #1179), and captcha pages interrupt older flows (issues #627, #787). Use the diagnostic and statusCode tables below—or read TikTok over plain HTTP with XTikAPI at $0.002 a call.
Updated 2026-11-25
Why TikTok-Api returns empty responses or captchas
HTTP 200 with empty body on user().videos() or hashtag().videos() (issue #1311, Jul 2026)
Cause in GitHub issues: /api/post/item_list/ now checks X-Gnarly while library still sends X-Bogus (trending.videos() still works with ms_token)
Workarounds users tried: Test PR #1310 (let TikTok's own JS inject signatures), or intercept /api/post/item_list/ via Playwright page.on("response")
EmptyResponseException: TikTok returned an empty response (issues #1090, #1179, #1213)
Cause in GitHub issues: Headless browser, session, or IP flagged by bot detection; user.videos checked harder than user.info
Workarounds users tried: Try headless=False, fresh ms_token, residential proxy, and new session
"TikTok blocks this request displaying a Captcha" (issues #627, #787)
Cause in GitHub issues: Page or signature drift; proxies and custom verifyFp fail intermittently
Workarounds users tried: Upgrade library when patched; fixes typically last until TikTok's next signature change
TikTok web statusCode reference (from issue #403)
0
Name in TikTok's JS: OK
Meaning: Success
10000
Name in TikTok's JS: VERIFY_CODE
Meaning: Captcha challenge
10102
Name in TikTok's JS: USER_NOT_LOGIN
Meaning: Requires logged-in session
10113 / 10114
Name in TikTok's JS: SHARK_SLIDE / SHARK_BLOCK
Meaning: Slider check / risk-control block
10201
Name in TikTok's JS: (captcha script)
Meaning: Often invalid params (e.g. count > 50)
10202 / 10204
Name in TikTok's JS: USER_NOT_EXIST / VIDEO_NOT_EXIST
Meaning: Account or video not found
10216 / 10221 / 10222
Name in TikTok's JS: VIDEO_PRIVATE / USER_BAN / USER_PRIVATE
Meaning: Private video, banned account, or private account
10231
Name in TikTok's JS: VIDEO_GEOFENCE_BLOCK
Meaning: Region-restricted video
10404
Name in TikTok's JS: FYP_VIDEO_LIST_LIMIT
Meaning: For You feed limit
Note: later comments in issue #403 report TikTok returning HTTP 200 even for banned or non-existent users, so always inspect the response body.
Reading TikTok without Playwright or signatures
- Profile:
tiktok.accounts.detailwithuniqueId(@handle) orsecUid. - User & hashtag videos:
tiktok.videos.list(unique_idorid,cursor,sort) andtiktok.hashtag_videos.list(ch_id). - Video details & comments:
tiktok.videos.detailandtiktok.comments.list(id).
Cost check: 100 accounts (profile + 3 pages of videos each) = 400 calls × $0.002 = $0.80; failed calls return charged: false and cost nothing.
Why XTikAPI
- XTikAPI reads TikTok with 24 endpoints from $0.002 a call, and a failed call is not charged.
- Fewer tokens for AI: across 14 recorded live TikTok calls (2026-11-18), raw platform JSON is ~1.21M tokens vs ~35k via XTikAPI REST (97.1% fewer) and ~35k via MCP (97.1% fewer).
- See before you pay: 192 of 229 endpoints show a recorded real response on their page (22 of 24 for TikTok).
- Spending you control: a failed call or a timeout is not charged (charged: false), X-Max-Price caps one call, and the same Idempotency-Key within 24 hours is never billed twice.
- Free trial: a verified account gets $0.50, no card.
Endpoints
Each with its price; the endpoint page has parameters, fields and a recorded response.
- TikTok video list API$0.002 a callVideos posted by one TikTok account.
- TikTok account details API$0.002 a callA TikTok account profile.
- TikTok video details API$0.002 a callOne TikTok video by ID: caption, author, plays, likes, comments and shares.
- TikTok comments API$0.002 a callA page of comments on one TikTok video.
- TikTok hashtag videos API$0.002 a callTikTok videos under a hashtag ID.
How to do it
Sources
What this page says about other products comes from their own pages and docs, read on 2026-11-25.
- TikTok-Api issue #1311 (200 empty body, X-Gnarly)
- TikTok-Api pull request #1310 (let TikTok inject signatures)
- TikTok-Api issue #1179 (EmptyResponseException on user.videos)
- TikTok-Api issue #1090 (EmptyResponseException on all examples)
- TikTok-Api issue #627 (TikTok blocks request with Captcha)
- TikTok-Api issue #403 (TikTok statusCode reference)
More about TikTok
- TikTok API
- f2 TikTok user posts return status 200 with an empty response: why?
- yt-dlp fails on a TikTok user profile with "[tiktok:user] Failed to parse JSON": how do I fix it?
- Can I use the TikTok Research API for commercial work?
- The TikTok comments endpoint in Douyin_TikTok_Download_API stopped working: what now?
- Why does the Douyin video URL I parsed return 403 Forbidden?
Questions
Is a 200 empty body on `user().videos()` caused by an expired `ms_token`?
Usually no: in issue #1311 `trending.videos()` kept working with the exact same `ms_token`; the break was `X-Gnarly` replacing `X-Bogus` on user/hashtag feeds.
Does TikTok publish its web `statusCode` list?
No. The table above was extracted from TikTok's web JavaScript by contributors in issue #403.
One key. Start now.
19 platforms, 229 endpoints, from $0.002 a call. Errors and timeouts are free.
Start free