Setup a custom Web Search with Alfred
I work at a church and I’m constantly looking up bible verses on my Macs (and iOS devices too). On the Mac I’ve been using this tool called Alfred which is a Spotlight replacement tool for searching your mac. But it does more… so much more than that. You see, Alfred is also a workflow system and has custom Web Search capabilities. Today I’m going to show you how you can add any website search to Alfred.
How to set up a custom search in Alfred
Adding a custom search in Alfred couldn’t be easier, here’s how.
- Open the Alfred Preferences pane
- Click on the Features icon on the top of the Preferences Pane
- Select Web Search on the left side of the window
- On the bottom right click Add Custom Search
- Add the URL of the website you would like to search. Go to the website and do a quick search using their search box and then copy the resulting URL in the browser. I’m using Bible Gateway in this example.
- Paste the URL into the Search URL box https://www.biblegateway.com/passage/?search=genesis+1%3A1&version=NIV
You can see above (in blue is the actual search term I used but “url encoded”) The browser has to have this encoded so it will work but don’t worry Alfred can do this for you. - Replace the search term with {query} (yes, with the curly brackets) so Alfred can put in our search terms for us using that placeholder.
- You’ll end up with http://www.biblegateway.com/quicksearch/?quicksearch={query}&qs_version=NIV in that box.
- Tick the 2 check boxes indicating you want UTF8 and adding in a + to replace the spaces in your search terms
- Title it what you want, I named mine Bible Gateway
- Set a Keyword, I’m using ‘bible’ since it’s appropriate.
- In the Validation box type in genesis 1:1 and press Test. Your web browser should open and do the search for you.
- To test this activate Alfred (I use ⌘ and ␣ to activate it, you can read how I set that up here) and then I type in bible and the verse I’m looking for. “bible genesis 1:1” and press enter. Watch the gif below to see it in action.
So what else can I search?
On my show WPwatercooler my co-hosts regularly mention past episodes but have no idea what the episode number is. I could use this to search for that info with ease. WordPress has a standard URL format for all of their searches, for WPwatercooler I’d use http://www.wpwatercooler.com/?s={query} for the Search URL like we did above. So I could then search for anything on WPwatercooler quickly. If you reference my friend Syed Balkhi‘s site WPBeginner you could do the same thing http://www.wpbeginner.com/?s={query} or my friend Chris Lema‘s site http://www.chrislema.com/?s={query}
In the comments below, let me know what you have set up as a custom search.