twscrape
Python library and CLI that pulls X/Twitter search results, profiles, followers and tweets through your own pool of accounts.
Python CLI · library · Open source · Social media intelligence · github.com
- Takes
- Username
- Pricing
- Free, open source
- Footprint
- Passive · no contact with target
- Account
- Needed for full results
- API
- No public API
- Last verified
- Nov 27, 2026
Python library and CLI that pulls X/Twitter search results, profiles, followers and tweets through your own pool of accounts. It takes username. Read the cons before you build a workflow on it.
What it does
twscrape is an asynchronous Python library and command-line tool for X/Twitter's search and GraphQL endpoints. It runs on accounts you add yourself, usually from browser cookies, stores their sessions in a local SQLite database and switches between them when one hits a rate limit. Results come back as parsed models compatible with the old snscrape format or as raw API responses.
Researchers use it to collect tweets matching an advanced search query, to pull a user's profile, timeline, followers or following list, and to gather replies or retweeters of a post for network analysis. Because the official X API is costly, it is one of the more common ways to get X data into a notebook or database for a study.
Footprint is passive: it reads its own index or third-party records and does not contact the target. An account is needed for full results. There is no public API.
- +Free and actively maintained
- +Works from the command line or as a Python library
- +Handles rate limits by rotating accounts
- +Output fits existing snscrape-based workflows
- −Needs one or more logged-in X accounts, which X's terms discourage
- −Breaks whenever X changes its internal API
- −Accounts used for scraping can be suspended
When to use it
- 01Use it when you need to collect a large set of tweets for a search query or hashtag.
- 02Use it when you want to map the followers or retweeters of an account for network analysis.
Next steps from this result
Suggested from the inputs twscrape takes- Found a resultConfirm it with a second, independent source before you record itActive
- Found a new identifierPivot on it only if your scope covers the new targetDepends
Quick start
pip install twscrape twscrape add_cookie my_account twscrape search "from:xdevelopers lang:en" --limit=20
Technical details
Listing verified by an editor on Nov 27, 2026- API
- No public API
- Account
- Needed for full results
- Footprint
- Passive · no contact with target
- Pricing
- Free, open source
- Platforms
- Python CLI · library
- Repository
- vladkens/twscrape 3,001 stars
- Language
- Python
- Licence
- MIT
- Last commit
- Nov 2026
- Listed
- Nov 27
Reviews
No reviews yet
Written by signed-in members. Each review appears here after an editor has read it.
Used twscrape? Sign in to say what you used it for and how it went.
Sign in to reviewAlternatives to twscrape
Listed tools that take the same inputs, closest match first.
- SherlockOpen source · ActiveWhat it does
Command-line tool that checks hundreds of websites for an account with a given username.
UsernameNo ratings yetVerified 5d ago - BskyFollowFinderFree · ActiveWhat it does
Lists Bluesky accounts that many of a profile's followed accounts follow, but the profile itself does not.
UsernameNo ratings yetVerified 3d ago - ChatCrawlerFree · PassiveWhat it does
Search engine for public Telegram that shows a username's history and which open groups and channels an author posted in.
UsernameNo ratings yetVerified yesterday
