Repository navigation
A run now delivers what X has, or an error that names the cause, and every large method can yield its rows one at a time. Two defaults change behaviour, each to treat a defect: a search waits for the rate-limit window of X (run_wait_max_s, set 0 for the earlier stop), and a method raises where it returned [] for a refusal.
Added
- Streaming twins of the large methods.
iter_search,iter_profile_tweets,iter_profile_media,iter_followers,iter_followinganditer_verified_followersyield each row as its page arrives, and the async twinsaiter_*do the same withasync for. The run holds no list of its rows, so the memory stays flat for anylimit. Abreakstops the run and releases its accounts before the loop ends, and the run never reads more thanstream_buffer_pagespages ahead of the consumer. Withsave=True, each page goes to the file as it arrives, so a crash keeps every page before it. The plain generator also works in Jupyter. The CLI commands of these six methods use them, with the same output.
Added (opt-in)
show_sensitive_content=Trueturns off "Hide sensitive content" in the search settings of each account before its first search, so a search and the replies of a tweet include the posts that X hides. It changes a setting of your account, so it is off by default.young_account_ramp=Trueramps the search of an account that Scweet uses for the first time, over 14 days. The stages are starting values, not a measurement.
Changed
- Version ranges for the dependencies.
curl_cffi>=0.10,<1: 0.10 is the first version where the library can remove a header of a page load (measured on 0.7.4 to 0.17). Upper bounds forsqlmodel,SQLAlchemy,pydanticandXClientTransaction, and lower bounds forpython-dotenvandbeautifulsoup4. - The documents say that every user row carries
raw. Follower, following and user-info rows always held the full payload underraw, and the CSV held it too, while the documents said "only withraw_json=True". The rows do not change;raw_jsonstays accepted.
Fixed
- A search no longer ends at the first rate-limit window. X allows 50 searches in 15 minutes for each account. A run leased its accounts once, and a worker left its account at the margin of the window, so one account and
limit=5000returned 960 tweets and no error. Now the run leases a replacement while work remains, and when every account rests for the rate limit it waits for the first one to return, up torun_wait_max_s(20 minutes), and logs when. It does not wait for an account that rests after a network or an auth failure. - A refused search no longer reads as "no more tweets". X refuses the search of an account with HTTP 200, an error on the timeline, and no timeline. That answer counted as an empty page. Now it rests the account
search_refused_cooldown_s(6 hours), and the interval moves to another account. - A signed 404 and a lock no longer lose the interval. Both failed the interval at once, also when another account was free. Now the interval moves to another account, as after a 401 or a 403.
- A locked account returns after its rest. The status of a lock was not reusable, so the account never returned to the pool, also after the user unlocked it.
- A suspended account rests and says why. X still shows a suspended user its own profile, so the self-lookup said "alive" and the account came back after each short cooldown. After a refusal, a 404, a 401 or a 403, Scweet now asks
verify_credentials(a live check of 2026-12-02 saw X answer the search of a suspended account with 404 and an empty body); a suspended account restssuspended_cooldown_s(7 days), and the log names the suspension. - No method turns a refusal into an empty list.
get_followers,get_following,get_verified_followers,get_profile_tweets,get_profile_media,get_user_info,get_tweet_replies,get_repostersandsearch_usersreturned[]when X refused or no account was usable. Now they raiseEngineErrorwith the status, orAccountPoolExhausted, assearchdoes. An answer of X with no row and status 200 stays[]. - A profile continues on another account when X stops the first one. In a profile timeline or a follower list, a 429, an auth error or a lock ended that profile with the rows it had, and no error, while another account was free. Now the cursor moves to another account, up to
max_account_switchestimes. - A resume continues every open interval. A search runs several intervals in parallel, but its checkpoint held one cursor that each interval wrote over: a resume continued the last writer, lost the progress of the others, and never planned the first intervals again. The checkpoint was also written only when the first run had
resume=True, its key ignored the filters (from_users=["alice"]and["bob"]shared one), and the default dates of the day entered the key. Now every search keeps one checkpoint with each open interval and its cursor, keyed on the whole request, andresume=Truecontinues exactly those intervals. A checkpoint of an earlier version still starts a resume. get_profile_tweets,get_profile_mediaand the follower methods resume. They acceptedresume=Trueand ignored it. Now each unfinished profile keeps its cursor, andresume=Truecontinues it.- The daily cap holds inside a run. The cap of an account was checked only when a run took the account, so a long follower list kept one account past it. Now the run hands the work to another account when one reaches its cap.
- An ad is never a row. The replies of a tweet held the promoted tweets that X puts in a module of replies: 5 of 42 rows in one real page.
- A search sends the switches of the web client of X. It sent the switches of every operation, with the values of the bundled manifest: compared with a request of the web client, 9 of its 42 switches were missing, 3 were extra and 5 had another value. Now a live read of X gives SearchTimeline its own list, with the values of the logged-in user, in the order of X, and the search sends
withQuickPromoteEligibilityTweetFieldsas the web client does. The live read now refreshes itself once a day (manifest_auto_refresh_s). - A save name keeps its dots.
save_name="elon.musk"and"elon.dev"both wrote toelon.csv, and the default name of a query with a dot lost its end. Only.csvand.jsoncount as an extension now. - One slow answer of the proxy check does not end a run. With
proxy_check_on_lease(on by default), one timeout of the exit ended the run with 0 tweets, and the next requests through that exit answered. The check now tries twice. A failed check also rests the account as a network failure does: a 407 left the account with no rest, and the run leased it again at once. - A split interval counts as open work. When X ends a chain while tweets remain, the run splits the interval. A child that never ran left the run "completed", and the run deleted its resume checkpoint.
since:anduntil:inside the query split the run. Every interval sent the same window, so the run read the same pages several times. The operators now become the bounds of the run.- The user-info and timeline paths respect the window of X. They had no limiter. After a 429, the user-info path sent every later handle from the same account, and both paths released the account with no cooldown. Now they pace to
profile_window_request_limit, stop an account at a 429, a refusal or a lock, rest it, and continue on another account. - An account sends its API calls as the web client does. The calls carried the headers of a page load of Chrome (
sec-fetch-mode: navigate, an HTMLaccept,upgrade-insecure-requests), the languageenfor every account, and the home page as the referer of a search. Now they carry the headers of a fetch, the language of thelangcookie of the account, and the search page as the referer. The page load of x.com for the request signature no longer sends the headers of an API call. - An account keeps one exit IP. A proxy URL with
{session}gave an account a new random token at each session build, and the page load of x.com for the request signature left through the global proxy with another token. One session at several IPs is the pattern of a stolen cookie. Now each account keeps one token for its API calls and its page loads, and moves to a new one only after a network failure of its exit. - The sync methods work in Jupyter. They called
asyncio.run, which refuses to start where an event loop already runs. - A pool with no usable account fails at once. It waited
pool_wait_max_s(120 s) for a cooldown that could not end. - Two processes on one state file never lease one account. The lease is now a conditional update.
- A refreshed manifest outlives its TTL. One hour after
refresh_manifest(), the engine used the bundled query ids again, and X answered 404. - Workers that start together build the request signature once. Each built it, and each build loaded x.com with the cookies of an account.