Introduction
SearchLink is a System Service (Quick Action) for macOS which searches multiple web sources and automatically generates Markdown links for text. It allows you to write without leaving your editor to run web searches for the items you want to link to. It’s great for blogging, and excellent for creating podcast show notes, among other things.
It works in a few ways:
- Run a quick search on a single selection, and have the selection replaced with the resulting URL (and optional title) as a Markdown inline link, a Markdown reference, or just a plain URL.
- Run a single search and have the results put on your clipboard, perfect for using from scripts and launchers (e.g. LaunchBar or Alfred).
- Use the “bracket” format, which allows you to just write, marking things to link as you go. When you’re done, you can run it on the full document and—if your queries were good—have your links generated automatically without ever opening a browser.
This replaces the “Auto-link web search” service in the Markdown Service Tools. With SearchLink you can mark links, specify how they should be searched, and provide alternate query terms for linked text.
Documentation
The full documentation for SearchLink, including configuration options, query syntax, examples, and troubleshooting tips, lives in the GitHub wiki:
If you’re interested in using SearchLink from the command line, the wiki also has details: see the page on Using SearchLink From The Command Line.
Download
There will likely be updates to SearchLink as more workflows and edge cases are discovered, so keep an eye on this page for new versions. The current source code is available on GitHub:
You can also install SearchLink via Homebrew, thanks to @TomBen:
brew tap tombener/tap && brew install --cask searchlink
Or download the latest prebuilt release:
Plugins
All of SearchLink’s searches are defined using a plugin architecture. You can explore and extend what SearchLink can do using the following resources:
Bonus for LaunchBar users
With a small AppleScript saved as
~/Library/Application Support/LaunchBar/Actions/Instant Search.scpt,
you can use SearchLink as a launcher for the web. Load the action in LaunchBar,
type Space and enter a SearchLink simple query (just text with an optional !arg
at the beginning). When you hit Enter it will grab the first link and load it
in the Open URL action. Press Enter again to open it in your browser, or ⌘C
to copy it to your clipboard.
The script takes care of appending the special !! marker for you, so your
queries can stay short and natural.
For the full script, see: