Web Searching in Alfred


Last week, I published a post introducing you to Alfred and I’m really pleased with the feedback I have received. I thought I’d expand on it a little and go into some detail on how you can create Web Searches from within Alfred as well. 

From the Preferences section in Alfred, go to the Features pane and select Web Search. 


As you can see, there are a lot of services built-in with which you can leverage Alfred’s interface in order to present some impressive results. Let’s say for example, I need to search Gmail for an email containing the word Invoice, I simply open Alfred with my shortcut and type gmail invoice. Alfred then runs off in the background, opens up Gmail in your web browser of choice and runs an ‘invoice’ search of your inbox and archive. 


Maybe you are sitting there watching a TV programme and are stumped as to the name of the actor playing the lead protagonist. Again, Alfred can do this search by default with IMDB.


I won’t go through the list of built-in searches that you can perform, I’m sure you can read as well as I can. What I will do, however, is show you how to create your own Custom Search for a website that doesn’t appear by default. Let’s do - I don’t know - this site for example. To start a custom search, click the link in the bottom right hand corner of the screen. 


OK, let’s look at what we’ve got here. You will see I’ve already filled in the content that you need to set this up but let’s look at the first box in particular.

The Search URL is something that you are going to have to go and locate for yourself as part of the setup. The way that you SHOULD be able to do this for most sites is:

- Navigate to the site’s Home Page (in this case, http://www.myproductivemac.com)

- Find the search box (any site that values hits is going to have one) and key in a query. (Please note - I use a Google Custom Search window for default searches. I’ve added a native Search bar to the Home Page to help with this exercise if you are working through it)

- Search for anything on the destination site - Copy the URL that is generated to the clipboard and then paste it into the Search URL field in Alfred - Delete everything that follows q= from the URL and insert {query} in it’s place

Next, you need to decide on the Title of the search, which is essentially what Alfred will display in it’s results. Then the keyword you will use to invoke the search. 


You can also validate that your search query will work by typing a search term into the Validation field and clicking the Test button on the right hand side. This will run the search and open up the web page with the results. 

I’m sure you can think of a wide range of sites you could do this with. Myself, when I’ve published this post, I will be setting them up for ProductivityistMacStoriesMacsparky and ScreenCastsOnline as well as Apple World Today

Lastly, I’d just like to cover using Alfred to launch websites in general.

If you open Alfred and start typing in a URL that is in your bookmarks, Alfred will present them as an option. Also, if you type in a general URL into Alfred

 then Alfred will keep a history of this information, much like Safari or Chrome do.


I now use Alfred as the main launcher for all of my web activity. When I need to search my site for a link URL, I use the search facility to do so. When I need to open a URL from my bookmarks, I go straight to Alfred. In fact, I’m starting to think that Alfred is fast becoming my go-to application for almost everything I do on the Mac now, which is both worrying and awesome in equal measure. 

Because Alfred is awesome. 

Go get it from the Mac App Store or from the developers directly at their site.