Setup a custom Web Search with Alfred

Setup a custom Web Search with Alfred

biblegateway

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.

  1. Open the Alfred Preferences pane
  2. Click on the Features icon on the top of the Preferences Pane
  3. Select Web Search on the left side of the window
  4. On the bottom right click Add Custom Search
  5. 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.
  6. 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.
  7. Replace the search term with {query} (yes, with the curly brackets) so Alfred can put in our search terms for us using that placeholder.
  8. You’ll end up with http://www.biblegateway.com/quicksearch/?quicksearch={query}&qs_version=NIV in that box.
  9. Tick the 2 check boxes indicating you want UTF8 and adding in a + to replace the spaces in your search terms
  10. Title it what you want, I named mine Bible Gateway
  11. Set a Keyword, I’m using ‘bible’ since it’s appropriate.
  12. In the Validation box type in genesis 1:1 and press Test. Your web browser should open and do the search for you.

    Alfred_Preferences
    Your setup should end up looking like this
  13. 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.

Here is how it works once you set it all up

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.