Scweet: the Python Twitter (X) Scraper, and Its Searches as API Calls

By TwitterAPI.io Team•15 min read
Two-column diagram. Left, Scweet self-hosted library: X account auth_token cookie, Scweet 5.9.0 s.search with min_likes, account pool and proxies you run, X internal web GraphQL, list of tweet dicts. Right, twitterapi.io advanced_search: API key, one GET request, the same operators in the query, cursor paging, tweets JSON.
The same X search two ways: Scweet signs in as an X account; advanced_search takes the same operators with an API key. 895 tweets tested, collected in 2026.
TL;DR
  • What it is: Scweet 5.9.0 (MIT, Python 3.9+, pip install -U Scweet) scrapes X search, timelines, followers, following, profiles and trends through X's internal web GraphQL, authenticated with an auth_token cookie from a logged-in account.
  • No browser since v5: the changelog says the move from browser automation to direct GraphQL calls began in v3 and v5 removed the nodriver dependency and browser login entirely; old Selenium-era tutorials no longer match the code.
  • Limits are per account: default caps of 300 requests and 6,000 tweets per account per UTC day; the 5.9.0 changelog cites 50 searches per 15 minutes per account; scale means more dedicated accounts and proxies, which you run.
  • Every filter maps to an operator: min_likes=50 is min_faves:50, from_users is from:, has_images is filter:images, since becomes since_time:<unix>. In our test 895 of 895 tweets satisfied every structural filter.
  • Cost of our whole study: 66 requests, 1,249 tweets plus 600 follower records, about $0.19 to $0.21 (15 credits per tweet). The same 1,249 post reads on the official X API rate card would be about $6.25.
  • Searching X for "scweet" finds slang first: of 194 posts the search returned, 20 (10%) were about the Python library; 124 were slang and fan posts and 50 were about a perfume brand.

This page is about one library: Scweet, what its current version actually does, what it needs from you, and how each of its calls translates into a documented REST request. Our twscrape guide covers a different cookie-based library with its own account-pool model and command set; Scweet differs in its structured search filters (min_likes, from_users, has_images and twenty-odd more as keyword arguments), its single-cookie quickstart and its built-in CSV and JSON saving, so the migration notes here are specific to Scweet's method names and row shape.

Everything about Scweet below comes from its README, DOCUMENTATION.md, CHANGELOG.md, the PyPI listing and the GitHub repository, all read this session; we did not install Scweet or run it against X, and we did not log into X with it. The numbers about the API side come from our own study: eight Scweet-style searches, a NASA timeline and a NASA follower page set, collected in 2026 through /twitter/tweet/advanced_search, /twitter/user/last_tweets and /twitter/user/followers.

Scweet filters that held when rewritten as API search operators

100% of 895 tweets across eight Scweet-style searches satisfied every structural filter (dates, likes, author, media, language, replies, hashtags, links, retweets), collected in 2026 for about $0.19.

01 — Section

What Scweet is today (and what it stopped being)

Scweet started as a Selenium-based scraper that opened X in a browser and read the page. That is the version many older blog posts and Stack Overflow answers describe, and it is the reason the name still turns up next to browser-automation guides. The project's own changelog explains the change: the migration from browser automation to direct GraphQL API calls began in v3, because X progressively restricted anonymous access from 2023 onwards, and v5 completed it by removing the nodriver dependency and browser-based login.

The current package describes itself on PyPI as a "Twitter scraper and X scraper for Python: scrape tweets, profiles, followers, following and trends without the official API". The facts we confirmed this session:

FactValueSource
Latest release5.9.0, uploaded 2 December 2026PyPI JSON for Scweet
LicenseMITPyPI and GitHub
Python3.9 or newerPyPI requires_python
Repositorygithub.com/Altimis/Scweet, not archived, last push December 2026GitHub API
Read operations12, sync and async, plus a CLIREADME
Tweet row25 fields incl. views, quotes, bookmarks, langREADME

How it authenticates. You log into x.com in a browser, open DevTools, copy the auth_token cookie and pass it as Scweet(auth_token=...). The README is explicit that username and password login is not supported because programmatic login is unreliable and likely to trigger account locks. Accounts, cooldowns and daily counters are stored in a local SQLite file (scweet_state.db), so later runs can start with Scweet() and no credentials.

How it gets data. Scweet sends requests to X's internal GraphQL endpoints (the README calls them "undocumented X web endpoints"), builds the x-client-transaction-id header X expects, and re-reads the current query ids from X's JavaScript bundles when X rotates them (refresh_manifest()). That is why its changelog reads like a log of X's changes: 5.8.1 followed a change in how X serves the page the signature needs, 5.8.3 handled a failed signature build, and 5.9.0 reworked rate-limit waits and refused searches.

There is also a hosted version. The README promotes a hosted run on a third-party scraping marketplace that uses the maintainer's accounts and proxies. This page covers the open-source library only.

02 — Section

A minimal Scweet run, per the README

The quickstart is three steps: install, copy the cookie, call search(). The code below is adapted from the README's examples (same calls, our query values); we reproduce it so the method names in the rest of this page have context, not because we ran it. Note the README's two warnings: use a dedicated account, never your personal one, and always set limit, because without it a run continues until the account's daily cap.

Structured filters. search() accepts a query string plus keyword filters: all_words, any_words, exact_phrases, exclude_words, hashtags_any, hashtags_exclude, from_users, to_users, mentioning_users, tweet_type, verified_only, blue_verified_only, has_images, has_videos, has_links, has_mentions, has_hashtags, min_likes, min_replies, min_retweets, place, geocode, near and within, with since/until dates (default: the last 30 days) and display_type of Latest or Top.

Other methods. get_profile_tweets, get_profile_media, get_followers, get_following, get_verified_followers, get_user_info, get_tweet_info, get_tweet_replies, get_reposters, search_users and get_trending, each with an async twin (asearch, aget_followers and so on). Version 5.9.0 added streaming twins (iter_search, iter_followers and others) that yield rows as pages arrive, so memory stays flat for large limits.

Output. Each tweet is a dict with keys such as tweet_id, text, timestamp, tweet_url, user, likes, retweets, comments, quotes, bookmarks, views, lang, media, hashtags, quoted_tweet and raw (the full payload X returned). save=True writes CSV, JSON or both.

python
# From the Scweet README (5.9.0). Requires the auth_token cookie of a dedicated X account.
# pip install -U Scweet
from Scweet import Scweet

s = Scweet(auth_token="YOUR_AUTH_TOKEN")
tweets = s.search(
    "AI agents",
    since="2026-01-01",
    min_likes=50,
    lang="en",
    limit=200,
    save=True,          # writes a CSV next to the script
)
for t in tweets[:5]:
    print(t["tweet_id"], t["likes"], t["text"][:80])

followers = s.get_followers(["NASA"], limit=1000)
profiles = s.get_user_info(["NASA"])
03 — Section

Requirements, limits and common failures

Scweet's documentation is unusually frank about what goes wrong, and the failure modes all come from the same root: every request is made as a logged-in X account against endpoints X does not publish. The numbers below are quoted from the project's docs and changelog, not measured by us.

Limit or failureWhat the Scweet docs say
Per-account throughputHundreds to a few thousand tweets per day before rate limits (README)
Default daily capsdaily_requests_limit 300, daily_tweets_limit 6,000 per account per UTC day
Search rate windowX allows 50 searches in 15 minutes per account (5.9.0 changelog)
Rate-limit wait5.9.0 waits up to run_wait_max_s (1,200 s) for an account to return
Refused searchAccount rests search_refused_cooldown_s (6 hours)
Suspended accountRests suspended_cooldown_s (7 days); log names the suspension
Expired or revoked cookieReason rejected_auth_token; copy a fresh auth_token
Protected accountsNot supported; public content only (README)

AccountPoolExhausted. The error a script sees when every account is cooling down or at its daily cap. With one account this is the normal end of a long run. The fix the docs describe is more dedicated accounts, each with its own proxy, listed in cookies.json.

Empty results that are not empty. Before 5.9.0, a refused search, a profile stopped by a 429 or a follower list that hit an auth error could return an empty list or a short list with no error. 5.9.0 changed that: those methods now raise EngineError or AccountPoolExhausted. If an older script treats [] as "no tweets", re-test it after upgrading.

404 and signature errors. When the x-client-transaction-id header cannot be built, X answers 404. Versions 5.8.1 and 5.8.3 changed how Scweet handles this (a stale cookie row in the state file broke a fresh token; a failed build ended single-account runs). If you see 404 on every request, the changelog's first suggestion is to upgrade and refresh the manifest.

The account is the cost. The README says to use dedicated accounts only, the docs list lock, suspension and rate-limit states for each account, and X's Terms of Service (x.com/en/tos) say that, except as required by applicable law, you cannot scrape the Services without X's express written permission. Those are the terms that govern an account Scweet signs in as. Whether that is acceptable is your call and your counsel's; we only state what the terms and the project say.

04 — Section

Each Scweet method and its REST endpoint

If the goal is the data rather than the library, every Scweet read operation has a documented equivalent on api.twitterapi.io. These requests use an API key in the X-API-Key header; there is no X account, cookie, proxy or state file, and pagination is has_next_page plus next_cursor everywhere.

Scweet methodtwitterapi.io endpointNotes
search()/twitter/tweet/advanced_searchquery + queryType Latest or Top, 20 per page
get_profile_tweets()/twitter/user/last_tweetsuserName, includeReplies=true for replies
get_profile_media()/twitter/tweet/advanced_searchfrom:<user> filter:media
get_followers()/twitter/user/followersabout 200 records per page
get_following()/twitter/user/followingssame record shape
get_verified_followers()/twitter/user/verifiedFollowerstakes user_id
get_user_info()/twitter/user/infounknown user: status: error, not a 404
get_tweet_info()/twitter/tweetscomma-separated tweet_ids
get_tweet_replies()/twitter/tweet/repliesor conversation_id:<id> in advanced_search
get_reposters()/twitter/tweet/retweetersabout 100 per page
search_users()/twitter/user/searchquery
get_trending()/twitter/trendswoeid (1 = worldwide)

One difference to plan for. Scweet's since and until take YYYY-MM-DD dates. The advanced_search docs (docs.twitterapi.io/api-reference/endpoint/tweet_advanced_search) say the since:2021-12-31_23:59:59_UTC style is not supported; use since_time:<unix seconds> and until_time:<unix seconds> instead. The code at the end of this page converts a date string for you.

Row shape. API tweets use camelCase (likeCount, retweetCount, replyCount, viewCount, createdAt, author.userName). The as_scweet_row() helper in the code below maps them onto Scweet's keys (likes, retweets, comments, views, timestamp, user.screen_name) so downstream pandas code keeps working.

05 — Section

Translating Scweet's search filters into operators

Scweet's keyword filters are a friendly front end for X's search operators: the README itself points readers to the community operator reference at github.com/igorbrigadir/twitter-advanced-search. So a migration is mostly string building. The table lists the translation we used and whether our study tested it.

Scweet filterOperatorTestedHeld in our test
since / untilsince_time: / until_time: (unix)Q1, Q2100%
min_likes=50min_faves:50Q2100%
from_users=["NASA"]from:NASAQ3100%
has_images=Truefilter:imagesQ3100%
lang="en"lang:enQ4100%
tweet_type="exclude_replies"-filter:repliesQ4100%
to_users=["NASA"]to:NASAQ5100%
hashtags_any=[...](#python OR #rustlang)Q6100%
has_links=Truefilter:linksQ6100%
min_retweets=20min_retweets:20Q7100%
exclude_words=["crypto"]-cryptoQ8100%
exact_phrases=[...]"machine learning"Q1, Q4, Q8phrase located in 97%
min_replies, has_videos, mentioning_users, geocodemin_replies:, filter:videos, @user, geocode:not testednot measured

Why phrase matches are not 100%. X's search matches a phrase in more places than the visible tweet text: a quoted post, the display name or handle, the text of a linked page or card. We checked the phrase against the tweet text, the quoted tweet text, the author handle and name, and expanded link URLs; it was found in 97% of tweets for the "python programming" search and 92% for "bitcoin". Only 46% of the "python programming" tweets carried the phrase in their own text. Scweet sends its query to the same X search, so expect the same behavior from both; if you need the phrase in the post body, filter on text after collection.

Horizontal bar chart of eight Scweet-style searches run as advanced_search queries. Blue bars: structural filters held on 100% of returned tweets for all eight queries. Orange bars: keyword or phrase located in visible fields for the four keyword queries, at 97%, 92%, 97%, 93% and 97%.
Share of returned tweets that satisfied each translated Scweet filter. 895 tweets across eight queries, collected in 2026.
06 — Section

Our test: eight Scweet searches as API queries

We wanted to know whether rewriting Scweet's filters as operator strings loses anything. For each of the eight searches we collected up to 10 pages (Q1) or 5 pages (the rest), then checked every returned tweet against each filter using the fields in the response: createdAt for the window, likeCount and retweetCount for thresholds, author.userName, extendedEntities.media[].type, lang, isReply, inReplyToUsername, entities.hashtags and entities.urls.

QueryOperator stringTweetsAll checks held
Q1 keyword + date range"python programming" since_time: until_time:20097%
Q2 min_likesbitcoin min_faves:50 + window10092%
Q3 from_users + has_imagesfrom:NASA filter:images100100%
Q4 lang + tweet_type"AI agents" lang:en -filter:replies10097%
Q5 to_usersto:NASA95100%
Q6 hashtags_any + has_links(#python OR #rustlang) filter:links100100%
Q7 min_retweetsopenai min_retweets:2010093%
Q8 exact_phrases + exclude_words"machine learning" -crypto10097%

The structural filters never missed. Across 895 tweets, every date window, like and retweet threshold, author, photo, language, not-a-reply, reply-to, hashtag, link and excluded-word check held on 100% of rows. The only shortfalls in the "all checks" column are the phrase-location cases explained above, where the match sits in content the response does not carry (a card, a linked page).

Pages were full. Seven of the eight queries averaged 20 tweets per page; the to:NASA query averaged 19. Every query still had has_next_page: true when we stopped, so the counts above are our page budget, not the end of the results.

Fields were filled. viewCount, lang and bookmarkCount were present on 100% of the 895 tweets. Media appeared on 24% (replies to NASA) to 65% ("python programming") of tweets, and quoted posts on 0% to 31%, which tracks the content, not the API.

Latest vs Top. Scweet's display_type maps to queryType. For Q1 the Top ranking returned 60 tweets over three pages with a median of 95 likes, against a median of 3 likes for the 200 Latest tweets. Scweet's docs describe Top the same way: a ranked selection with far fewer tweets.

07 — Section

Timelines and follower lists: what the equivalents return

Scweet's other two everyday calls are get_profile_tweets and get_followers. We ran their API equivalents on NASA, an organization account.

MeasureNASA timelineNASA followers
Endpoint/twitter/user/last_tweets/twitter/user/followers
Pages53
Records100 tweets (20 per page)600 records (200 per page)
Span or mix31.2 days; 48% retweets, 0% replies51.7% have zero tweets; 7.5% protected
Medians515,859 views, 2,248 likes0 followers per follower account

Timelines. Five pages covered the latest 31.2 days of NASA's posting. 48% of the 100 items were retweets and 48% carried media; there were no replies because includeReplies was off (the parameter mirrors Scweet's include_replies=True).

Followers. The 600 newest followers of a very large account are, by these aggregates, largely new or inactive accounts: half had never posted, the median one had no followers of its own, and 27.5% had a bio. That is a property of who follows big accounts recently, and a reason to sample deeper than the first pages if you study an audience. Each record carries screen_name, followers_count, following_count, statuses_count, created_at, protected, can_dm, description and location, which covers Scweet's curated follower fields.

08 — Section

Cost: Scweet's accounts, the official X API, and per-tweet pricing

Scweet itself is free; its cost is the dedicated accounts, the proxies the README recommends for real volume, the engineering time to keep up with releases, and the risk to the accounts. Those do not reduce to a per-tweet number, so we put the two metered options side by side instead.

Datatwitterapi.ioOfficial X API pay-per-usage
Tweets (search, timelines, by ID)$0.15 per 1,000 tweets returned$0.005 per post read ($5 per 1,000)
User profiles$0.18 per 1,000 profiles$0.010 per user read
Followers / following1 to 3 credits per user returned$0.010 per follower/following read
Our study (1,249 tweets)about $0.19about $6.25

The X API side. The official rates are from docs.x.com/x-api/getting-started/pricing, read this session: $0.005 per post read, $0.010 per user read and per follower or following read, $0.015 per post created and $0.200 per post created with a URL. Pay-per-usage plans are capped at 3 million post reads per monthly billing cycle, with Enterprise above that, and X offers $20 in credits after a first eligible card and purchase plus a match of the first auto-recharge up to $50. Per 1,000 tweets the ratio is $5 against $0.15, about 33x.

The twitterapi.io side. Tweet endpoints cost 15 credits per tweet returned ($1 = 100,000 credits), with a minimum of 15 credits ($0.00015) per request, so an empty search still costs the minimum and a full 20-tweet page costs $0.003. There is no per-request cap. Our whole study, 66 requests returning 1,249 tweets and 600 follower records, came to about $0.19 to $0.21. New accounts that pass the automatic bot check get free starter credits (no card, one per person or network, expiring after 31 days); the amount is on the pricing page. Rate limits are 0.2 requests per second before the first payment and 20 per second once paid, with higher tiers on larger plans.

When Scweet still makes sense. A one-off academic pull of a few thousand tweets, by someone who accepts the account risk and the terms question, is the case Scweet is built for. Recurring collection, anything customer-facing, or any job where a locked account would stop the pipeline is where a metered API is easier to reason about.

09 — Section

How we collected this

Question. When a Scweet search is rewritten as an advanced_search operator query, does each translated filter hold on the tweets that come back, and what do the timeline and follower equivalents return?

Queries and accounts. Eight Scweet-style searches (Q1 to Q8 in the tables above), Q1 also as Top; a search for the word "scweet" (10 pages); NASA's timeline via /twitter/user/last_tweets (5 pages) and NASA's followers via /twitter/user/followers (3 pages). NASA is an organization account.

Window and size. Collected in 2026. Q1 and Q2 used a fixed seven-day since_time/until_time window; the other queries took the latest matching posts at collection time. 66 requests, 1,249 tweets and 600 follower records in total.

Method. Every filter was checked on the returned fields only; the phrase check looked at the tweet text, quoted tweet text, author handle and name, and expanded URLs. The "scweet" posts were classed by keyword rules into the library, a perfume brand, and slang or fan posts.

What the sample cannot show. It does not measure recall (tweets X search did not return), it cannot see text inside cards or linked pages, five pages per query is a sample of the latest posts rather than full history, and we did not run Scweet itself, so we make no measured claim about its speed or success rate.

Privacy. Aggregates only. Search and follower pages stayed out of the repository; the published sample holds de-identified rows (no ids, URLs, text, author ids or handles). Only NASA, an organization, is named.

Bar chart of 194 X posts returned by a Latest search for the word scweet: 124 slang, fan posts and replies (64%), 50 about a perfume brand (26%), 20 about the Python library (10%).
What a search for "scweet" on X returns: 194 posts over 11 years, 20 about the Python library. Collected in 2026.
python
"""scweet_to_api.py - run a Scweet-style search, profile timeline and follower
list through the twitterapi.io REST API, with no X account and no cookies.

    pip install requests
    export TWITTERAPI_IO_API_KEY=...   # from the twitterapi.io dashboard
    python scweet_to_api.py
"""
import os
import time
from datetime import datetime, timezone

import requests

BASE = "https://api.twitterapi.io"
HEADERS = {"X-API-Key": os.environ["TWITTERAPI_IO_API_KEY"]}
PAUSE_S = 0.2  # fixed pacing between pages


def unix(day: str) -> int:
    """'2026-01-01' -> unix seconds (UTC). advanced_search wants since_time/until_time."""
    return int(datetime.strptime(day, "%Y-%m-%d").replace(tzinfo=timezone.utc).timestamp())


def scweet_filters_to_query(query="", since=None, until=None, from_users=(), to_users=(),
                            hashtags_any=(), exact_phrases=(), exclude_words=(), lang=None,
                            min_likes=None, min_retweets=None, has_images=False,
                            has_links=False, tweet_type="all"):
    """Translate the keyword arguments of Scweet's s.search() into one operator string."""
    parts = [query] if query else []
    parts += [f'"{p}"' for p in exact_phrases]
    if from_users:
        parts.append("(" + " OR ".join(f"from:{u}" for u in from_users) + ")")
    if to_users:
        parts.append("(" + " OR ".join(f"to:{u}" for u in to_users) + ")")
    if hashtags_any:
        parts.append("(" + " OR ".join(f"#{h}" for h in hashtags_any) + ")")
    parts += [f"-{w}" for w in exclude_words]
    if lang:
        parts.append(f"lang:{lang}")
    if min_likes:
        parts.append(f"min_faves:{min_likes}")
    if min_retweets:
        parts.append(f"min_retweets:{min_retweets}")
    if has_images:
        parts.append("filter:images")
    if has_links:
        parts.append("filter:links")
    if tweet_type == "exclude_replies":
        parts.append("-filter:replies")
    if since:
        parts.append(f"since_time:{unix(since)}")
    if until:
        parts.append(f"until_time:{unix(until)}")
    return " ".join(parts)


def search(query: str, limit: int = 200, query_type: str = "Latest") -> list:
    """Equivalent of s.search(..., limit=N): page with has_next_page / next_cursor."""
    rows, cursor = [], ""
    while len(rows) < limit:
        r = requests.get(f"{BASE}/twitter/tweet/advanced_search", headers=HEADERS,
                         params={"query": query, "queryType": query_type, "cursor": cursor},
                         timeout=30)
        r.raise_for_status()
        body = r.json()
        rows += body.get("tweets", [])
        if not body.get("has_next_page") or not body.get("next_cursor"):
            break
        cursor = body["next_cursor"]
        time.sleep(PAUSE_S)
    return rows[:limit]


def profile_tweets(user: str, limit: int = 100) -> list:
    """Equivalent of s.get_profile_tweets([user], limit=N)."""
    rows, cursor = [], ""
    while len(rows) < limit:
        r = requests.get(f"{BASE}/twitter/user/last_tweets", headers=HEADERS,
                         params={"userName": user, "cursor": cursor}, timeout=30)
        r.raise_for_status()
        body = r.json()
        rows += body.get("data", {}).get("tweets", [])
        if not body.get("has_next_page") or not body.get("next_cursor"):
            break
        cursor = body["next_cursor"]
        time.sleep(PAUSE_S)
    return rows[:limit]


def followers(user: str, limit: int = 600) -> list:
    """Equivalent of s.get_followers([user], limit=N); about 200 records per page."""
    rows, cursor = [], ""
    while len(rows) < limit:
        r = requests.get(f"{BASE}/twitter/user/followers", headers=HEADERS,
                         params={"userName": user, "cursor": cursor}, timeout=30)
        r.raise_for_status()
        body = r.json()
        rows += body.get("followers", [])
        if not body.get("has_next_page") or not body.get("next_cursor"):
            break
        cursor = body["next_cursor"]
        time.sleep(PAUSE_S)
    return rows[:limit]


def as_scweet_row(t: dict) -> dict:
    """Map an API tweet onto the row keys a Scweet script already reads."""
    author = t.get("author") or {}
    media = (t.get("extendedEntities") or {}).get("media", [])
    return {
        "tweet_id": t["id"],
        "text": t.get("text", ""),
        "timestamp": t.get("createdAt"),
        "tweet_url": t.get("url"),
        "user": {"screen_name": author.get("userName"), "name": author.get("name"),
                 "followers_count": author.get("followers")},
        "likes": t.get("likeCount"), "retweets": t.get("retweetCount"),
        "comments": t.get("replyCount"), "quotes": t.get("quoteCount"),
        "bookmarks": t.get("bookmarkCount"), "views": t.get("viewCount"),
        "lang": t.get("lang"),
        "media": {"image_links": [m["media_url_https"] for m in media if m.get("type") == "photo"]},
        "in_reply_to_tweet_id": t.get("inReplyToId"),
    }


if __name__ == "__main__":
    # s.search("bitcoin", min_likes=50, lang="en", since="2026-01-01", limit=100)
    q = scweet_filters_to_query("bitcoin", min_likes=50, lang="en", since="2026-01-01")
    print("operator query:", q)
    rows = [as_scweet_row(t) for t in search(q, limit=100)]
    print(len(rows), "tweets; first:", rows[0]["tweet_url"] if rows else None)

    nasa = profile_tweets("NASA", limit=40)
    print(len(nasa), "NASA timeline tweets")

    fol = followers("NASA", limit=200)
    print(len(fol), "follower records; protected:", sum(1 for u in fol if u.get("protected")))

Researching this?Free starter credits cover end-to-end testing — Google sign-in, no card. Get a key.

10 — Questions

Questions readers ask

Does Scweet still work in 2026?

The project is actively maintained: version 5.9.0 was published on PyPI on 2 December 2026 and the GitHub repository is not archived. It works by calling X's undocumented web GraphQL endpoints as a logged-in account, so individual runs can still fail when X changes something or limits an account; the changelog shows a release every few weeks responding to such changes. We did not run it ourselves.

Does Scweet need an X (Twitter) account?

Yes. Since version 5 it authenticates with the auth_token cookie of a logged-in X account, copied from your browser's DevTools. Username and password login is not supported. The README says to use dedicated accounts, never your personal one, and to add accounts and proxies for volume.

Does Scweet use Selenium or a browser?

Not anymore. Early versions drove a browser; the changelog says the move to direct GraphQL calls began in v3 and v5 removed the nodriver dependency and browser-based login. Tutorials that set up ChromeDriver for Scweet describe an old version.

How many tweets can Scweet scrape per day?

Per account, the README says hundreds to a few thousand tweets a day before rate limits. The defaults cap each account at 300 requests and 6,000 tweets per UTC day, and the 5.9.0 changelog cites X's limit of 50 searches per 15 minutes per account. More throughput means more accounts.

Why does Scweet return an empty list or AccountPoolExhausted?

AccountPoolExhausted means every account is cooling down or at its daily cap. Before 5.9.0, a refused search or a stopped profile could also come back as an empty list; 5.9.0 raises EngineError or AccountPoolExhausted instead. Upgrade, check ScweetDB("scweet_state.db").accounts_summary(), and replace a rejected auth_token.

Is scraping X with Scweet allowed?

X's Terms of Service (x.com/en/tos) say that, except as required by applicable law, you cannot scrape the Services without X's express written permission. Scweet signs in as your account, so those terms govern it, and the account can be rate-limited, locked or suspended. Take legal advice for your use case.

What is a Scweet alternative that needs no cookies?

A hosted REST API. On twitterapi.io, /twitter/tweet/advanced_search takes the same search operators Scweet builds from its filters, and /twitter/user/last_tweets, /twitter/user/followers and /twitter/user/info cover its timeline, follower and profile calls, with an API key and no X account. Tweets cost $0.15 per 1,000 returned; the official X API charges $0.005 per post read.

How do I convert Scweet's since and until dates for the API?

Convert each YYYY-MM-DD date to unix seconds (UTC) and use since_time:<unix> and until_time:<unix> in the query; the advanced_search docs say the since: date-string form is not supported. The unix() helper in this page's code does the conversion.

11 — Further reading

Continue

Sources & further reading
More from this series

Writing about something you built with TwitterAPI.io? Our community rewards program pays API credits for honest tutorials, build logs and videos.

Build it

Stop reading. Start building.

Starter credits cover real testing on real data. Google sign-in, no card, no application queue.

Get an API key

Already building with TwitterAPI.io? Publish an honest tutorial or build log about it and earn up to $200 a month in API credits.