skip to navigation
skip to content

Not Logged In


Write tweets to database

Latest Version:

Download tweets into a CouchDB database


  • Flexible: works with any Twitter endpoint (REST API or Streaming API).
  • Geocode lookup for the Twitter user location using Google’s Map geocode service.
  • Uses CouchDB for storage.


  • Install Python packages TwitterAPI, TwitterAPI, and couchdb using pip.
  • Install CouchDB database using its installer


The first time the script is executed the database is created. For example, to store tweets in a database called “twdb” and to stream tweets that contain “pizza”, run this command:

python -m TweetBase.TweetBase
-couchurl -dbname twdb -endpoint statuses/filter -parameters track=pizza

The TweetBase script downloads tweets and stores them into the specified database. Tweet meta data is stored separately from the user meta data. This is done so user data is only stored once in the database. The two types of records are differentiated by the “type” field, which is either TWEET_STATUS or TWEET_USER.

The same time that a new database is created, some views are also created. These views are:

  • get_tweets
  • get_users
  • count_type

In the client_examples folder you will find a Python example and a JavaScript example that uses these views to retrieve data.


  • TwitterAPI
  • TwitterGeoPics
  • couchdb
File Type Py Version Uploaded on Size
TweetBase- (md5) Source 2014-02-05 4KB
  • Downloads (All Versions):
  • 24 downloads in the last day
  • 341 downloads in the last week
  • 1595 downloads in the last month