Search Notes

macOS only.

Screenshot of the action

This action queries Obsidian's built-in search and returns the file paths of the notes found. It does not return the notes themselves, just their paths.

Use the "Get Note" action with the returned file paths to get the actual note contents.

The search query is passed to Obsidian as-is, so any search syntax available in Obsidian can be used. See the related official docs for details.

There's currently no good way to programmatically search a vault, and many developers opt to run a search in Obsidian, as you yourself would, and then scrape the results list. This is a brittle process, to say the least, and not working well on iOS, so this action isn't available on iOS.

Starting in v1.2.0, there is a new "Search Notes With Omnisearch" action for searching via the Omnisearch plugin (if installed) which works on both platforms.


Examples

Most of the time you would use this action to get a list of search results (their file paths), then loop over the results list using the built-in "Repeat With" block. If you want to retrieve the details of the notes, you would use a "Get Note" action and use the loop variable Repeat Item as the argument for the "File Path or Name" parameter.

Screenshot of the action

If you want to filter the list by folders etc., I recommend using the "Filter List" action from Sindre Sorhus's excellent Actions app (no relation) or a built-in "Repeat With" loop with a contained "If" action.


Changes / History

v1.2

Removed from iOS. The Obsidian API doesn't support search, so we developers have relied on brittle workarounds to collect search results, but it's not a stable solution, especially on mobile. Please use the new Search Notes With Omnisearch action instead.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Carlo Contact Carlo