iMessage: How do I search for keywords in an individual message thread?

The archive of all the messages is in ~/Library/Messages/chat.db. It's a SQLite database. There are some SQLite viewers that will make it fairly easy to sort this data and either allow you to search it or selectively export some of it to CSV. Alternately if you search for "sqlite to csv" you'll find some more information on exporting it. Unfortunately this is a big weakness of iMessage.


  1. Open Messages on Mac
  2. Type term into search bar (also accessible using CMD+F)
  3. Click on the desired conversation you want to search in
  4. You'll see the first message (chronologically) that contained the word displayed in a faded color
  5. Press CMD+G to see the next occurrence and shift+CMD+G to see the previous one.

--

Keyboard shortcuts are shown in the menubar: Edit → Find

This functionality should work across most apps, not just Messages.


Edit => Find => Find Next & Edit => Find => Find Previous are greyed out for me so those approaches aren't options.

I simply opened the conversation in a separate window and kept scrolling up rapidly to load all of the old chats.

You can press command + A to select the entire chat, press command + C to copy it to the clipboard, and then paste the chat in TextEdit (or another text editor). Any text editor will provide better search support than iMessage - just press command + F.


This was asked a long time ago, but Apple still didn't do anything to make the search in Messages easier or more reliable, and I just faced this problem myself today.

The best solution I have found is to use Chatology for Mac. It is a paid app (with a 14-days trial), but does the job perfectly:

  • it allows you to search through entire single conversations,
  • it searches for word-substrings, not just whole words,
  • it ignores diacritics
  • it has (optional) integration with native Messages app, so hitting CMD+F in Messages will automatically open Chatology for you.

Lastly, it allows you to export entire conversations as text files, so you can search them manually or do whatever you need to do with them.

You can download the trial or buy the app here: https://flexibits.com/chatology.

Note: I am not related to developers of the app in any way.