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

  1. Profile: tiktok.accounts.detail with uniqueId (@handle) or secUid.
  2. User & hashtag videos: tiktok.videos.list (unique_id or id, cursor, sort) and tiktok.hashtag_videos.list (ch_id).
  3. Video details & comments: tiktok.videos.detail and tiktok.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.

How to do it

Sources

What this page says about other products comes from their own pages and docs, read on 2026-11-25.

More about TikTok

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