How do I download all of my questions and answers across all of the sites in the network?

And is there a way that could preserve special LaTeX formatting?


At the moment, the easiest way is to download the data dumps. Getting the data out of that then becomes a problem (query on your user number for each site), but the easiest way to get ahold of the data, especially with all formatting intact, is to download the dumps.

You can also write a script using the API to do the same thing, but that's more work up front. However, you'll only get what you need, whereas the data dump gives you much more than you need. You can peruse the library of existing apps built on the API to help you get close to what you want.

There are many other ways to grab the data, but the engine actively resists robots and screen scrapers, so it's harder to get the data off the site using normal site grabbing tools.

  • Doesn't this only cover graduated sites? All of the sites I'm most active on are beta sites. – hippietrail Sep 27 '12 at 5:32
  • The dump indeed only covers "all public non-beta Stack Exchange Sites" (source). – Franck Dernoncourt Nov 26 '13 at 17:42
  • 1
    The data dumps now include beta sites. – Monica Cellio Jan 15 '17 at 18:51

You can use the Data Explorer and run this query:

-- Display all questions+answers of a given user

DECLARE @UserId int = ##UserId##

SELECT Posts.Body
FROM Posts
WHERE Posts.OwnerUserId = @UserId

The main issue is that it needs to be run for each Stack Exchange website you want to retrieve your questions+answers from, which can be pretty tedious to do. Also, the output is in CSV format.

A much better alternative: this SEDE query Dump of my own Stack Exchange content

| improve this answer | |
  • 1
    I entered my userID but none of my own questions are coming up, how exactly do I do this? can you please provide more detail? – user321525 Apr 15 '16 at 17:32
  • @Jonathan Did you choose a Stack Exchange website where you posted a question? If so, keep in mind that the data explorer is updated only once a week approximately. – Franck Dernoncourt Apr 15 '16 at 21:21

Not the answer you're looking for? Browse other questions tagged .