Easy-to-use Python package?

python

#1

New to Twitter development…

I need to retrieve a bunch of old Tweets from specific users, their followers, their re-tweets, etc, but this is all I need to be able to do (for research). What is the easiest, quickest-to-learn Python package for this purpose? Specifically, I’d like to use a package with good documentation and examples in existence if possible.


#2

For Python, I recommend Twarc: https://github.com/docnow/twarc

It’s a command line and library.


#3

I like Python Twitter, but I also wrote a fair bit of it :slight_smile:

Good luck!


#4

In both cases, @shuasanders for the avoidance of doubt, note that the standard search API only goes back up to 7 days and has an incomplete index.

Both twarc and python-twitter (and also twython, and tweepy) are very good libraries, with a lot of good examples and tutorials out there.

For more access, there’s a newer, commercial (but with limited free access) pair of premium API offerings that provide search back either over 30-days, or over the whole Twitter archive. Currently, twarc and python-twitter do not support those endpoints - at least not to my knowledge, I hope they might in the future! - but there’s another library called search-tweets that does.