Skip to main content

Twitter High level scraper for humans.

Project description

Twitter High level scraper for humans.


  • 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:

$ pip install twpy
# or
$ python -m pip install twpy


Guidance of using Twpy :

>>> from twpy import TwpyClient
>>> from twpy.serializers import to_pandas
>>> # create twpy client object
>>> tc = TwpyClient()

Get twpy current version :

>>> tc.__version__

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, proxy="", 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 :

>>> # 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




get user followers


get user followings/friends


get user timeline/tweets


get user profile info


search tweets with query and username


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

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

twpy-1.2.1.tar.gz (9.2 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page