# Backup Twitter Status Updates to a Google Spreadsheet

It looks like [Twitter are finally rolling out the option to download all your tweets](http://thenextweb.com/twitter/2012/12/16/twitter-has-started-rolling-out-the-option-to-download-all-your-tweets/). As well as providing a nice offline search interface it appears that *“the archive also includes CSV and JSON files, the latter complete with each tweet’s metadata”*. I’m looking forward to see the data visualisations/mashups people come up with around their data.

The [Twitter API has long allowed you to extract a user’s status updates](https://dev.twitter.com/docs/api/1/get/statuses/user_timeline) the limitation being you can could only get the last 3,200 tweets. This is something [Sheila MacNeill discovered](https://www.vizify.com/sheila-macneill/year-on-twitter) when she tried vizify’s ‘Year on Twitter’ tool.

> apparently I'm a "tweet-aholic" so @[vizify](https://twitter.com/vizify) 's tweets of the year can only go back to June, wondering if @[mhawskey](https://twitter.com/mhawskey) has alternative?
> 
>  — Sheila MacNeill (@sheilmcn) [December 12, 2012](https://twitter.com/sheilmcn/status/278880680543391744)

[![the archive of me](https://hawksey.info/wp-content/uploads/2012/12/image9.png "the archive of me")](http://hawksey.info/tagsexplorer/arcMe.html)Exporting tweets was something I looked at in 2011 in the cryptically titled [Google Spreadsheets and floating point errors aka when is 65078736491511804 + 1 = 65078736491511808 (and automatically archiving your Twitter Status Updates)](https://hawksey.info/blog/2011/05/export-twitter-status-updates/). With this I’ve got a record of my tweets going back to April 2010 which is triggered to update itself every week. A reason I do this is often I need to find things I’ve previously said in ‘[the archive of me’](http://hawksey.info/tagsexplorer/arcMe.html).

[Here’s the template](https://docs.google.com/spreadsheet/ccc?key=0AqGkLMU9sHmLdFJnMXFwVkFNenVWYmxkdUw0X2NDLUE) (File &gt; Make a copy) and follow the instructions if you want to try (please be aware of the [Twitter Developer Rules of the Road](https://dev.twitter.com/terms/api-terms)). I’ve updated the code to make it compatibly with version 1.1 of the Twitter API. One of the options I’ve added is a JSON dump which is saved to your Google Drive. It only took two lines of code using Google Apps Script HT +[Romain Vialard](https://plus.google.com/u/0/116263732197316259248/posts/fgm5RiZNBan)

 ```
  var blob = Utilities.newBlob(Utilities.jsonStringify(json), "application/json", filename);
  DocsList.createFile(blob);
```

\[The JSON dump is a bit buggy – some issues with character escaping somewhere\]

Enjoy!