Skip to main content

How to back up your Twitter data

If you have a Twitter profile and would be sad to lose your tweets or shared images, now is a good time to make a backup. 

The past couple of weeks have been chaotic at Twitter, to put it mildly.

There was a hard deadline today for employees who made it through the layoffs to sign on for Elon Musk's "extremely hardcore" Twitter 2.0, and many apparently decided to leave instead. The Verge reports that it's not looking good: 

Multiple “critical” teams inside Twitter have now either completely or near-completely resigned, said other employees who requested anonymity to speak without Musk’s permission. That includes Twitter’s traffic and front end teams that route engineering requests to the correct backend services. The team that maintains Twitter’s core system libraries that every engineer at the company uses is also gone. “You cannot run Twitter without this team,” a departing employee said.

Several members of Twitter’s “Command Center” team, a group of engineers that is on call 24/7 and acts as the clearing house for problems internally, also tweeted about their departures. “If they go down, there is no one to call when shit breaks,” said a person familiar with how the team operates. The team that manages Twitter API for developers has also been severely gutted.

Twitter's offices are closed until Monday

People are concerned that Twitter may have trouble with the expected surge of traffic with the start of the World Cup on Sunday. 

Twitter may weather the storm, but I doubt it will be the same. 

And even if Twitter continues to work great, it is always a good idea to have a backup of any data that is important to you.

So if you do want to back up your Twitter data, I recommend you do it now. 

Note that much of the data just links back to Twitter. For example any link you shared is only included as a short t.co link that Twitter redirects to the correct URL. And your followers and following lists only include user IDs, rather than handles or names. At the end of the post I've listed some options for better exports or reformatting of the archive data.

Watch the video for an overview of how to create your Twitter archive and how to access the data you have downloaded. Or read on for more detailed instructions.

How to create an archive of your Twitter data

You can request your Twitter data either on the web or in the mobile app. Note that your archive files may be too large to download to your phone, so you will need to use a desktop computer for the last step. 

1. Sign in to Twitter at www.twitter.com or in the official Twitter app

2. On the left menu select Settings and Support

Note that on desktop you may need to click the 3 dot "more" icon to see that option.

3. Select Settings and Privacy

4. Click Your Account

5. Then select Download an Archive of Your Data

For security you may be prompted to sign in to your account again. 

6. Finally click the Request archive button

When your archive is ready, you will see a Twitter notification and receive an email. 

Note that while Twitter says it may take up to 24 hours, my archive wasn't ready for closer to 36 hours. If your archive is very large, or Twitter's systems are overwhelmed with requests, it may take longer than that. 

Download your Twitter Archive

Once your Twitter data archive is ready, you have up to 7 days to download the archive file. You will likely need to download your data on a desktop computer, not your mobile device, as the archive can be very large. 

To give you a sense of the scale, my @PeggyKTC archive was 609 MB, including 16.8k tweets and 3964 media (image and video) files. 

To download the archive, either click the link in the notification you received, or navigate to the Download an Archive of your Data screen (steps 1-6 above). 

Then click the button to download your data. 

The archive is a .zip file. That can be opened by just double clicking on most platforms. 

What is included in your Twitter data archive?



In your archive, you will see two folders, data and assets. There is also a “Your archive.html” file. 

The easiest way to navigate your data is by opening the Your archive.html file in your favorite browser. That will let you browse your tweets in a very Twitter-like format. 

Note that the Your archive.html file only works if your archive is smaller than 50 GB.

It also does not give you access to all of your data.

The data folder

Your account data is (not surprisingly) in the data folder. 

In that folder is also a ReadMe.txt file that has the technical details about your archive. This is the description: 

The data folder consists of machine-readable JSON files with a .js extension containing information associated with this account. We’ve included the information we believe is most relevant and useful, including profile information, Tweets, Direct Messages, Moments, images, videos and GIFs attached to Tweets, Direct Messages or Moments, followers, following, address book, Lists created, a member of, or subscribed to, interest and demographic information that we have inferred, information about ads seen or engaged with on Twitter, and more.

Each file contains detailed information about that category of data. To see this information, simply double click on one of the JSON files. Note that some information, such as the media shared via Direct Messages, is included in a folder instead of a JSON file. Separately, also note that some files may not contain any information if your account is not associated with any of the data they cover.

As it says, JSON files are "machine-readable", which means they aren't very human-readable. It is much easier to view the Tweets using the browser page instead.

The tweets_media and other folders with _media in the hold the images and videos you shared in their original format. Note that those do not appear to be the full-sized images.

The image folder also includes the images of the Tweets you re-tweeted or shared.

Limitations

There are a number of limitations to using the data in the archive. 

Any link to a web page, YouTube video or quoted Tweet is a shortened  t.co  URL.

This is how Twitter renders your links, even though that isn’t really visible when you are on twitter.com. 

The problem with that is that the links are only useful as long as Twitter continues to correctly redirect the t.co URLs. 

Some of the archive just links to Twitter account pages

Another limitation is that your list of followers and accounts you are following are just lists of Twitter account IDs and user links. It does not include Twitter handles or names.

And some content, such as accounts you blocked or muted, and the lists you created, just link back to Twitter. 

The JSON format is not very useful

Your Twitter archive files are in JSON format, which is not easily converted to blog posts or other easy-to-read formats.

There isn’t an easy solution to this.

Get a more useful version of your archive

Tim Hutton, a Senior Scientist at Microsoft, created a Twitter archive parser in Python code, which you can access on GitHub.

  • Converts the tweets to markdown with embedded images, videos and links.
  • Replaces t.co URLs with the original URLs
  • Copies used images to an output folder
  • Asks if you want to try downloading the full-sized images

They also link to a number of other tools you can use.

I am hoping someone comes up with a version that doesn’t require understanding how to run Python scripts.

Other potentially useful sites: 

  • Import your archive's tweets into a TiddleWiki notbook
  • Use CommentPicker.com to export your Twitter followers and follows.
  • Fedifinder and Debirdify find the Mastodon profiles of people you follow on Twitter. Fedifinder also finds profiles of accounts in your Twitter lists.
  • @atomicthumbs on Cohost has a "Twitter evacuation master search query" tool to find social media accounts, linktrees and other online information posted by the people you follow on Twitter.  

I'm not sure how much trouble I will go to. I never did anything with the Google+ archives I downloaded. But it does make me feel better knowing I could access them if I wanted to.

Moving to Mastodon

Many Twitterers are moving to Mastodon, a federated social network. 

You need to make an account with a provider (called a "server"), just like making an email account on @gmail or @yahoo. And just like email, you can interact with people who post on a different server. 

Some servers are big, some are small, some limit who can join, others are regional or have strict conduct rules. You can find a list of servers at mastodon.org

I signed up at mas.to, and you can find me at @peggyktc@mas.to (mas.to/@peggyktc ).

I'm still learning how the platform works, and I like it so far. But it's not a Twitter replacement. 

There are services that will scan the Twitter accounts you follow for Mastodon handles, including Fedifinder and Debirdify. I like Fedifinder because it scans your Twitter lists as well as follows, and lets you re-follow people with a single click.

But, notably, there's no way to import your Tweets. If you join Mastodon, consider starting fresh. 

I am hoping there will be more user-friendly tools and services in the future for managing Twitter archives and moving to other platforms, but those may not materialize. 

Best to download the data you care about as soon as you can.

Comments