Skip to main content
100%

A script to download all of a user's tweets into a csv

✓ Published0🌍 Public
BBenHeubl
Last edited Nov 1, 2013
Created on Aug 20, 2015

This script downloads a user’s entire tweet history into a CSV file, preserving each tweet’s ID, creation timestamp, and text. It demonstrates the Twitter API’s pagination limits by repeatedly fetching batches of 200 tweets via Tweepy’s `user_timeline` method, using the `max_id` parameter to retrieve older tweets until none remain. The final output is written with Python’s built-in `csv` module, encoding text as UTF-8. The example relies on Tweepy for API authentication and data retrieval, and shows a practical pattern for handling rate-limited, cursor-based API responses.

AI-generated description

Similar vizzes