Here’s how you can access your entire iMessage history on your Mac
A guide on how to create a data-science-friendly file with your iMessage history.
If you’re a data nerd, have a Mac and you message friends and family, I’m glad this post found you!
Back in 2019 I wrote the first guide on how to access your entire iMessage history that sits on your Mac computer. It’s a database that powers the Messages app on your Mac.
One of the limitations that the original code had was that it seemed to miss a large number of sent messages. Via a lot of trial and error, I tried to understand the thinking behind the code that Apple engineers wrote.
I’m very excited to present this new version of the code that now includes all those missing messages.
You can find the latest version of the jupyter notebook and documentation here.
The repo contains two jupyter notebooks. One with all the code for the extraction and transformation of the data to create a data-science friendly csv file with all the messages in your computer, alongside with information about the time, sender, recipient and chat group.
The other notebook contains some analysis ideas and code to help get you started with all the insights you can get out of your messaging history. You can create plots like below, showing the volume over time. Here’s a post I wrote with more analysis you can do.
This version of the code also includes, for the first time ever, the detection of iMessage “reactions” (aka Tapback, introduced with iOS 10 back in 2016).
I also included a much more detailed Readme (about time!) as well as future directions. There’s more we can still extract from the data for even more in-depth and insightful analysis.
I hope you find the code helpful and please share any questions or fun analysis you end up doing with it!