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
- Always check one failing account in a normal browser first. Since November 2026 (issue #384), suspended accounts return empty 404s on
SearchTimelinewhileUserByScreenNamestill returns 200, causing twscrape to retryXClIdGenand misreport a script error. - Avoid running twscrape's automated login flow. Export cookies from a real browser session (
twscrape del_accounts <name>, re-add with cookies) so you avoidct0 not in cookies(issue #214). - Keep twscrape updated whenever X ships a new web bundle (
v0.17.0addedx-client-transaction-id,v0.18.0fixed early follower termination,v0.20.1fixed 16-char script chunk hashes). - To rebuild nested reply trees regardless of client, group replies using
inReplyToTweetIdandconversationId(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:
- Search posts:
x.posts.searchwithkeyword(supports X operators likefrom:andsince:),search_type, andcursor. - User timeline & profile:
x.posts.listandx.accounts.detailbyscreen_name. - Full replies & followers:
x.comments.listby postid, andx.accounts.followers/x.accounts.followingbyscreen_namewithcursor.
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.
- X post search API$0.002 a callOne page of X posts for a search query.
- X post list API$0.002 a callAn X account's posts, newest first.
- X account details API$0.002 a callAn X (Twitter) account profile.
- X comments API$0.002 a callReplies to one X (Twitter) post.
- X account followers API$0.002 a callA page of an X account's followers.
- X account following API$0.002 a callA page of the accounts an X user follows.
How to do it
Sources
What this page says about other products comes from their own pages and docs, read on 2026-11-25.
- twscrape issue #384 (accounts suspended for inauthentic behavior)
- twscrape issue #330 (XClIdParseError: X web scripts not found)
- twscrape issue #298 (No account available for queue SearchTimeline)
- twscrape issue #248 (SearchTimeline 404)
- twscrape issue #214 (ct0 not in cookies)
- twscrape issue #265 (followers stops too early)
- twscrape issue #215 (tweet_replies only up to 10)
- X API rate limits
More about X
- X API
- twikit errors (Cloudflare 403, KEY_BYTE, login 399, rate limits, bans): how do I fix them?
- How much does the X (Twitter) API cost to read posts in 2026, and is there a cheaper way?
- Agent Reach Twitter/X channel stopped working: what changed?
- How do I get an X (Twitter) account's follower list, and what is the rate limit?
- Is it legal to collect public social media data?
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