OSINT tool
Install twscrape on Windows, macOS and Linux
Search and collect X (Twitter) posts, profiles and followers.
ot install twscrapetwscrape collects data from X (Twitter): search results, a user's posts, followers and profile details. It works through accounts that you add to it and switches between them when one reaches its rate limit.
How to install twscrape
ot install twscrapeot installs twscrape 0.21.1 with uv into a Python environment of its own under ~/.ot, so it cannot conflict with your system Python or with any other tool.
Before first use: Needs one or more X accounts of your own, added with "ot run twscrape add_accounts".
New to ot? It is one command to install, shown below.
How to use twscrape
Arguments after the tool's name go straight to twscrape, so its own documentation applies unchanged.
Add your accounts from a file with one account per line.
ot run twscrape add_accounts accounts.txt username:password:email:email_passwordLog the accounts in.
ot run twscrape login_accountsSearch posts and print them as JSON.
ot run twscrape search "from:nasa" --limit 20Show a profile.
ot run twscrape user_by_login nasaot run twscrape --help lists every option. The project's own documentation is at github.com/vladkens/twscrape.
An AI agent can run twscrape too: ot mcp serves it over the Model Context Protocol. See OSINT with AI agents.
twscrape licence, platforms and versions
| Project | https://github.com/vladkens/twscrape |
| Licence | MIT |
| Runs on | Windows, macOS and Linux |
| Takes | username, query |
| Sends traffic to the target | No |
| Python package | twscrape 0.21.1, in its own isolated environment |
Questions about twscrape
How do I install twscrape on Windows?
Open PowerShell and install ot with irm https://otinstaller.com/install.ps1 | iex. Then run ot install twscrape. ot fetches a pinned version of twscrape and keeps it under ~/.ot, apart from the rest of your system.
Is twscrape free?
Yes. twscrape is open source, released under the MIT licence. ot, which installs it, is free under the Apache 2.0 licence.
Do I need to set up Python to use twscrape?
No. ot installs twscrape with uv into a virtual environment of its own, separate from your system Python. If uv is not installed, ot fetches its own copy first.
How do I update or remove twscrape?
ot update twscrape moves it to the version pinned in ot's registry, and ot update twscrape --latest to the newest upstream release. ot remove twscrape uninstalls it.
Install ot
curl -fsSL https://otinstaller.com/install.sh | shirm https://otinstaller.com/install.ps1 | iexRun it in PowerShell.
Current version: 0.3.0. Both scripts verify the download against its SHA-256 checksum before installing.
Tools related to twscrape
More: Social media OSINT tools