gitmyhub

twint

Python ★ 16k updated 3y ago ▣ archived

An advanced Twitter scraping & OSINT tool written in Python that doesn't use Twitter's API, allowing you to scrape a user's followers, following, Tweets and more while evading most API limitations.

A Python command-line tool that scrapes Twitter without needing an API key, letting you collect tweets, follower lists, and profile data in bulk with no official rate limits or account registration required.

PythonSQLiteElasticsearchDockersetup: moderatecomplexity 2/5

Twint, also called the Twitter Intelligence Tool, is a Python tool for pulling data from Twitter without going through Twitter's official API. Normally, if you want a program to read tweets, you have to register a developer account, get API keys, and live within rate limits and a hard 3,200-tweet history cap per user. Twint sidesteps that by talking to Twitter's public search and profile pages directly — the README's tagline is "No authentication. No API. No limits."

The tool wraps Twitter's search operators so you can collect every tweet from a specific user, every tweet that contains a keyword or hashtag, tweets sent in a certain date range, tweets near a geographic location, tweets from verified users only, and so on. It can also walk a user's followers, who they follow, and the tweets they have liked, and it can pull out sensitive-looking strings like emails and phone numbers. Results can be printed, written to a text file, exported as CSV or JSON, stored in a SQLite database, or pushed into Elasticsearch (with optional dashboards in Kibana). You can drive it from the command line or import it as a Python module and configure a Config object in code. There is also a graph-visualisation feature and an experimental tweet-translation mode.

You would reach for Twint for open-source intelligence (OSINT) work, journalism, academic research on social media, or any project where you need a lot of historical tweets and the official API's quotas get in your way. It is installed with pip and there is also a Docker image. The full README is longer than what was provided.

Where it fits