Search photos in Apple Photos app

Can anyone provide AppleScript to search for photos in Apple's Photos app by searching for the text in the photo's caption?

Here's a three line macro that will do what you are asking for, but not using AppleScript. It will return all the photos that contain the word "Vacation" in the caption.

Unfortunately, due to the limited control Photos provides, it also will return photos that contain the word "Vacation" in the keywords field, or other fields. I'm not sure if that will make you unhappy or not.

But one way to address that is to do the search using the Smart Folders feature of Photos, which does have the ability to isolate text searches by the fields that they are in. If that's what you really want, I could modify this macro.

The macro I wrote above uses the mouse to click in the search fields. Normally I would use the keyboard shortcut, which is CMD-F, but for some reason that keyboard shortcut isn't working, and I can't understand why that is.

Thanks, the attached works pretty well.

1 Like