Backing up user content prior to deletion

Hi - I have been tasked with deleting a bunch of users’ accounts and I would like to back up their content, bookmarks, favorites etc

What is the best way to do this? Also can it be done using the API?

Thanks

0 0 43