• Skip to primary navigation
  • Skip to main content

Social Metrics

Social Media, Organizations, and Academic Research

  • Home
  • Blog
  • Publications
  • Teaching
  • Python
  • About Me
  • Show Search
Hide Search

Downloading Tweets by a List of Users

This post is a brief, temporary attempt at pointing people in the right direction for a common task: downloading tweets sent by a number of different Twitter users. It is directed at those who are new to Python and/or downloading data from the Twitter API.

OK, so I am assuming you have made it through (or intend to) the following tutorials, which should help you get set up and working with Python:

  • Which version of Python to download
  • Running your first code
  • Four ways to run your code

Another detailed tutorial I have created, Usint Python to Grab Twitter User Data, is intended to serve as an introduction to how to access the Twitter API and then read the JSON data that is returned. This gets you the account-level data for a Twitter user (such as when the account was created), but not the actual tweets. That is a more difficult process, but not a huge leap once you’ve made it through all of the above steps.

I have yet to upload a tutorial showing how to use my code to download tweets by a list of Twitter users, but fortunately my PhD student Wayne Xu has. This tutorial helps fill in the blanks. It will help walk you through the steps of getting a Twitter developer account (so you can access the API), of which database to use (SQLite), and then how to access and store data from the Twitter user_timeline API, which allows you to download up to the last 3,200 tweets sent by each Twitter user.

I hope this helps. Happy coding!

Share Button

Written by:
Gregory Saxton
Published on:
October 26, 2014
Thoughts:
No comments yet

Categories: python, Twitter

Explore more

Contact Information

Gregory D. Saxton
Schulich School of Business
York University
Toronto, ON
gsaxton@yorku.ca

Footer

Copyright © 2025 · Navigation Pro on Genesis Framework · WordPress · Log in

Keep in Touch

  • Email
  • Facebook
  • GitHub
  • LinkedIn
  • Twitter
  • About Me
  • Media Mentions
  • Contact