Custom web search with Alfred on your Mac

October 20, 2018

Show Alfred preferences - press ⌘ + Space (or your custom shortcut) and type Alfred Searching for Alfred preferences

Go to the Features tab and select Web Search from the side menu Alfred Web Search list

Click on Add Custom Search button on the bottom right corner

Fill the desired data and click on Save button

1Search URL: https://developer.mozilla.org/en-US/search?q={query}
2Title: Search MDN for ‘{query}’
3Keyword: mdn

You can also drop a custom icon if you want. Mine is from this link

Add Custom Search for Alfred

Open Alfred app Press ⌘ + Space and type e.g. mdn ternary operator Working example (mdn)

The result will be like this The result from the search query

#
Custom Searches (from Alfred documentation)

Custom searches allow you to set up search queries for sites you use regularly but are not included in Alfred’s default searches.

Find out the search URL on the site of your choice, then replace the query with {query} in curly brackets. Use the test search to ensure your search works as expected then click “Save” to add your new query.

#
Custom Search fields (from Alfred documentation)

Search URL: This is where Alfred goes when you use the keyword that you have assigned to this custom search. {query} is what you want to search for in that specific application or website.

Title: What is displayed in the results when you use your keyword.

Keyword: The keyboard shortcut that you want to use to call up this custom search.

Encode query using UTF8: This option helps if you’re using non-standard characters. Try ticking it if your query didn’t work the first time.

To hide a custom search you no longer need, either uncheck the “Enabled” box or select the custom search row and press backspace to delete it.

For more details, take a look at our tutorial on creating your own custom searches.