Skip to content

Twitter High Level Scraper for Humans

You are here:
Estimated reading time: 1 min


  • NO LIMIT, NO API required
  • Fast and easy to use
  • Working with python 3.5+
  • Integrated with pandas for data science research



Manual install via Git:

$ git clone
$ cd twpy
$ python install

Install using pip:

$ pip3 install twpy
# or
$ python3 -m pip install twpy



Create Twpy Object:

from twpy import TwpyClient 

# create twpy client object
tc = TwpyClient()

With Proxy:

# or you can pass proxy
tc = TwpyClient(proxy="")

Get Twpy Current Version:

# '1.2.4'

Get User Followers:

# get user followers, limited up to 50
# interval : delay between each request, default is 0 for no delay
# proxy : send traffic through proxy, default is none
followers_data = tc.get_followers(username="elonmusk", limit=50, interval=1)

Get User Timeline:

tweets = tc.get_timeline(username="elonmusk", limit=50)

Get User Profile:

user_info = tc.get_user(username="elonmusk")

Convert Result Object to Other Data Structures:

from twpy.serializers import to_pandas, to_json, to_list
# convert result to pandas data frame, json and list
# pandas
pandas_sample = to_pandas(followers_data)
# json
json_sample = to_json(followers_data)
# list
list_sample = to_list(followers_data)

Search Example:

# search user tweets until 2015
tweets ="elonmusk", until="2015")

# add limit and interval
tweets ="elonmusk", until="2015", limit=100, interval=1)

# search tweets contains `love` word
tweets ="love", limit=100, interval=1)

# search tweets which contains `love` word and were tweeted since 2015-01-01
tweets ="love", since="2015-01-01", limit=10)


Supported Methods

Method Description
get_friends() get user followings/friends
get_timeline() get user timeline/tweets
get_user() get user profile info
search() search tweets with query and username



Fardin Allahverdinazhand – @0x0ptim0us – Distributed under the MIT license. see LICENSE.txt for more information.

Was this article helpful?
Dislike 0
Views: 4
Back To Top