X Tweet Exporter

A Chrome extension that exports tweets from any X (Twitter) profile to CSV or TXT files. No API keys, no authentication, no cost.

How It Works

Go to any profile on X.com. Click the extension icon. Enter how many tweets you want. Pick CSV or TXT. Click Export. The extension scrolls through the profile, collects the tweets, and downloads the file.

Architecture Diagram

What You Get

Each exported tweet includes:

  • The tweet text (no like counts, no retweet counts, no reply counts)
  • The timestamp when it was posted
  • The direct URL to the tweet

Installation

  1. Open Chrome and go to chrome://extensions
  2. Turn on Developer Mode (toggle in the top right)
  3. Click Load Unpacked
  4. Select this folder
  5. Pin the extension icon for easy access

Usage

  1. Navigate to any profile on X.com (for example, https://x.com/elonmusk)
  2. Click the extension icon
  3. Enter the number of tweets (1 to 500)
  4. Choose CSV for spreadsheet-friendly data or TXT for readable text
  5. Click Export Tweets
  6. The file downloads automatically when done

Project Structure

x-tweet-exporter/
  manifest.json   -- Extension config (Manifest V3)
  content.js      -- Runs on X.com, scrapes tweets, handles scrolling
  popup.html      -- The popup UI you see when clicking the icon
  popup.js        -- Connects the popup to the content script
  assets/
    architecturediagram.png  -- How the extension works

Why Use This

No paid subscriptions. No API keys. No registration. Just point it at a profile and click export.

The scraper uses X.com's own DOM structure to extract tweets. It scrolls automatically, detects when it reaches the end of available tweets, and avoids duplicates using a JavaScript Map.

Tech Stack

  • Vanilla JavaScript
  • Chrome Extension Manifest V3
  • Browser DOM APIs
  • Zero external dependencies

License

MIT. Use it, modify it, share it.

Contributing

Open an issue for bugs or feature requests. Pull requests are welcome.

Built With

Share this project:

Updates