Getting started with tweepy
Tweepy is a Python wrapper for the Twitter API. It accesses the Twitter REST (including Search) and Stream APIs.
Read more about the Twitter APIs, Tweepy documentation, or check out Tweepy on GitHub.
The current version of Tweepy is 3.5.0.
Tweepy can be installed from its PyPI repository using
You can also download the source from GitHub and install it using
See the tweepy documentation for more.
The Search API provides access to recent tweets*. This is as opposed to the Stream API, which provides search results in real-time.
*Note that "the Search API is focused on relevance and not completeness" - Twitter Search API
The Stream API provides access to tweets in real-time. Streams can be filtered based on keywords, language, location, and more. Here's a simple example to track mentions of the word "tweepy":
You can track different keywords by changing the
You can track data adressed to your account by using
userstream() instead of filter.
This modified text is an extract of the original Stack Overflow Documentation created by following contributors
and released under CC BY-SA 3.0