twscrape errors (404, No account available, XClIdParseError, ct0, bans): how do I fix them?

Most twscrape failures fall into four buckets: X changing its x-client-transaction-id scripts (404 on SearchTimeline, XClIdParseError, or Failed to parse scripts locking every account), login flow blocks (ct0 not in cookies), account suspension waves (empty 404s on GraphQL while UserByScreenName still returns 200), or pagination caps (followers stopping early and tweet_replies capped at ~10). Upgrade to the latest release and check your accounts in a real browser before debugging code; if you want to stop maintaining cookie pools, XTikAPI reads public X data with no X accounts at $0.002 a call.

Updated 2026-11-25

Diagnostic table: match your error to the cause

No account available for queue SearchTimeline + Failed to parse scripts

Cause reported in issues: Every account locked for 15 min after X changed web scripts (issues #298, #49)

What actually helps: Upgrade twscrape, then run twscrape reset_locks

Unhandled API response code: 404 on SearchTimeline or UserTweetsAndReplies

Cause reported in issues: Missing/stale x-client-transaction-id header (issues #248, #245, #322)

What actually helps: Upgrade to v0.17.0+ (or latest after each JS bundle change)

XClIdParseError: X web scripts not found

Cause reported in issues: X lengthened script chunk hashes from 7 to 16 hex chars in Aug 2026 (issue #330)

What actually helps: Upgrade to v0.20.1+ (confirmed fixing 87-account pools)

Empty 404 on GraphQL + AbortReqError: Failed to get XClIdGen + 401 code 32 on verify_credentials.json

Cause reported in issues: Account suspended for "inauthentic behavior" even on first run (issue #384, Nov 2026)

What actually helps: Open the account in a real browser; replace suspended accounts

ct0 not in cookies (most likely ip ban)

Cause reported in issues: X login flow finished without setting CSRF cookie ct0 (issue #214)

What actually helps: Log in manually in a browser, wait ~15 min, delete and re-add the account with browser cookies

api.followers() / api.following() stops early

Cause reported in issues: Older versions exited on empty pages that still carried a cursor (issues #265, #247); X also caps following lists

What actually helps: Upgrade to v0.18.0+; compare count against profile followers

api.tweet_replies(twid, limit=-1) returns ~8–10 replies

Cause reported in issues: twscrape follows only Bottom cursor, skipping ShowMoreThreads / ShowMoreThreadsPrompt (issue #215, still open)

What actually helps: Patch cursor handling locally, or use an API that follows all reply cursors

Troubleshooting steps if you keep running twscrape

  1. Always check one failing account in a normal browser first. Since November 2026 (issue #384), suspended accounts return empty 404s on SearchTimeline while UserByScreenName still returns 200, causing twscrape to retry XClIdGen and misreport a script error.
  2. Avoid running twscrape's automated login flow. Export cookies from a real browser session (twscrape del_accounts <name>, re-add with cookies) so you avoid ct0 not in cookies (issue #214).
  3. Keep twscrape updated whenever X ships a new web bundle (v0.17.0 added x-client-transaction-id, v0.18.0 fixed early follower termination, v0.20.1 fixed 16-char script chunk hashes).
  4. To rebuild nested reply trees regardless of client, group replies using inReplyToTweetId and conversationId (issue #114).

Reading X without cookie accounts or transaction IDs

When account pools become consumable and JS bundle updates break your jobs every few months, switching to a hosted read API removes login flows, x-client-transaction-id parsing, and lock queues:

  1. Search posts: x.posts.search with keyword (supports X operators like from: and since:), search_type, and cursor.
  2. User timeline & profile: x.posts.list and x.accounts.detail by screen_name.
  3. Full replies & followers: x.comments.list by post id, and x.accounts.followers / x.accounts.following by screen_name with cursor.

Cost check: monitoring 20 keywords × 10 pages daily for 30 days = 6,000 calls × $0.002 = $12; paging 20,000 followers (~20 per page) = ~1,000 calls = $2. Failed calls are never billed.

Why XTikAPI

  • XTikAPI reads X with 16 endpoints from $0.002 a call, and a failed call is not charged.
  • Fewer tokens for AI: across 10 recorded live X calls (2026-11-18), raw platform JSON is ~63k tokens vs ~21k via XTikAPI REST (66.7% fewer) and ~23k via MCP (63.7% fewer).
  • See before you pay: 192 of 229 endpoints show a recorded real response on their page (10 of 16 for X).
  • 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 X

Questions

Does `twscrape reset_locks` fix "No account available"?

Only if the accounts are healthy and the lock came from a transient error. If X broke script parsing or suspended the accounts, locks return immediately.

Is a 404 on SearchTimeline a rate limit?

No. Rate limits return HTTP 429. GraphQL 404s in twscrape mean either a rejected `x-client-transaction-id` header or a suspended cookie account.

Why does `limit=-1` on `tweet_replies` still stop around 10?

`limit=-1` only removes twscrape's own item limit; pagination still stops early because twscrape does not follow X's `ShowMoreThreads` cursor types (issue #215).

One key. Start now.

19 platforms, 229 endpoints, from $0.002 a call. Errors and timeouts are free.

Start free