# 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

| Error or symptom | Cause reported in issues | What actually helps |
| --- | --- | --- |
| `No account available for queue SearchTimeline` + `Failed to parse scripts` | Every account locked for 15 min after X changed web scripts (issues #298, #49) | Upgrade twscrape, then run `twscrape reset_locks` |
| `Unhandled API response code: 404` on `SearchTimeline` or `UserTweetsAndReplies` | Missing/stale `x-client-transaction-id` header (issues #248, #245, #322) | Upgrade to v0.17.0+ (or latest after each JS bundle change) |
| `XClIdParseError: X web scripts not found` | X lengthened script chunk hashes from 7 to 16 hex chars in Aug 2026 (issue #330) | 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` | Account suspended for "inauthentic behavior" even on first run (issue #384, Nov 2026) | Open the account in a real browser; replace suspended accounts |
| `ct0 not in cookies (most likely ip ban)` | X login flow finished without setting CSRF cookie `ct0` (issue #214) | Log in manually in a browser, wait ~15 min, delete and re-add the account with browser cookies |
| `api.followers()` / `api.following()` stops early | Older versions exited on empty pages that still carried a cursor (issues #265, #247); X also caps following lists | Upgrade to v0.18.0+; compare count against profile `followers` |
| `api.tweet_replies(twid, limit=-1)` returns ~8–10 replies | twscrape follows only `Bottom` cursor, skipping `ShowMoreThreads` / `ShowMoreThreadsPrompt` (issue #215, still open) | 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

- [X post search API](https://xtikapi.com/apis/x/posts/search) ($0.002 a call): One page of X posts for a search query.
- [X post list API](https://xtikapi.com/apis/x/posts/list) ($0.002 a call): An X account's posts, newest first.
- [X account details API](https://xtikapi.com/apis/x/accounts/detail) ($0.002 a call): An X (Twitter) account profile.
- [X comments API](https://xtikapi.com/apis/x/comments/list) ($0.002 a call): Replies to one X (Twitter) post.
- [X account followers API](https://xtikapi.com/apis/x/accounts/followers) ($0.002 a call): A page of an X account's followers.
- [X account following API](https://xtikapi.com/apis/x/accounts/following) ($0.002 a call): A page of the accounts an X user follows.

## More about X

- [X API](https://xtikapi.com/apis/x)
- [twikit errors (Cloudflare 403, KEY_BYTE, login 399, rate limits, bans): how do I fix them?](https://xtikapi.com/answers/twikit-errors-and-fixes)
- [How much does the X (Twitter) API cost to read posts in 2026, and is there a cheaper way?](https://xtikapi.com/answers/x-api-pricing-alternative)
- [Agent Reach Twitter/X channel stopped working: what changed?](https://xtikapi.com/answers/agent-reach-twitter-channel-broken)
- [How do I get an X (Twitter) account's follower list, and what is the rate limit?](https://xtikapi.com/answers/x-api-followers-list-rate-limit)
- [Is it legal to collect public social media data?](https://xtikapi.com/answers/is-scraping-public-social-media-data-legal)

## How to do it

- [How to get a user's posts from X (Twitter) with Python](https://xtikapi.com/guides/x-user-posts-python)

## 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)](https://github.com/vladkens/twscrape/issues/384)
- [twscrape issue #330 (XClIdParseError: X web scripts not found)](https://github.com/vladkens/twscrape/issues/330)
- [twscrape issue #298 (No account available for queue SearchTimeline)](https://github.com/vladkens/twscrape/issues/298)
- [twscrape issue #248 (SearchTimeline 404)](https://github.com/vladkens/twscrape/issues/248)
- [twscrape issue #214 (ct0 not in cookies)](https://github.com/vladkens/twscrape/issues/214)
- [twscrape issue #265 (followers stops too early)](https://github.com/vladkens/twscrape/issues/265)
- [twscrape issue #215 (tweet_replies only up to 10)](https://github.com/vladkens/twscrape/issues/215)
- [X API rate limits](https://docs.x.com/x-api/fundamentals/rate-limits)

## 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).

---

XTikAPI: one API key for public social media data, prepaid per call. [HTML version](https://xtikapi.com/answers/twscrape-errors-and-fixes) · [llms.txt](https://xtikapi.com/llms.txt) · [OpenAPI](https://xtikapi.com/openapi.json)
