Search Better with Keyword Search and Shortcuts
A few months back, I created a shortcut that lets me quickly and easily take any Amazon product URL and format it into a clean link with my affiliate tag attached. Since this site is a hobby with ongoing costs, I count it as a win whenever I can get a few pennies back for products that I recommend and yâall purchase.
As a side effect of the shortcut making it so simple to open any page with the affiliate link, Iâve started using it when I purchase things myself. It may not be in the spirit of the affiliate program, and perhaps Iâm shooting myself in the foot by writing about it here, but itâs a fun experiment.
But something was nagging at the back of my head. My understanding is that the affiliate link is only effective if itâs the one that opens your browsing session. So, if Iâm searching around for an item, find it, and then reopen the page with the affiliate tag, does it still work? That led me to wonder if I could build the tag right into my quick searches.
Fortunately, the Amazon Affiliate website offers built-in functionality to attach your affiliate link to a particular search. By deconstructing the resulting URL, I was able to identify where the search term goes, hardcode in the Amazon Smile domain, and remove the additional tracking parameters that Amazon includes by default.
Hereâs the final search URL, in which â@@@â is replaced with the search term, and â###â is replaced with the Affiliate ID:
https://smile.amazon.com/s?k=@@@&tag=###
Making it all work with Keyword Search
Since I have the excellent (and free) Keyword Search Safari extension installed on all my devices, setting up a custom search was trivial. This app lets you create custom searches for nearly any site using an abbreviation that you define. I just added a new item with âazâ as the keyword and âhttps://smile.amazon.com/s?k=@@@&tag=heydingusnet-20â as the expansion. And I only had to add it once since Keyword Search syncs automatically across its installations.
All I need to do to open an Amazon search page with my affiliate link included is to prepend âazâ to my search query. I can do this directly from Safariâs Address Bar or Spotlight on iPhone, iPad, and Mac. I typically use Alfred as a Spotlight replacement on the Mac, and it works there, too.
Now, any Amazon search that I start from my Mac, iPhone, or iPad always opens to Amazon Smile, includes my affiliate tag, and doesnât include any other grossness from the end of the URL. You can, of course, change the Affiliate ID to any you want (or keep mine if youâd like to support this site đ). And if all you want is quick access to a clean Amazon search, youâre welcome to remove everything after the â@@@â.
If you havenât tried Keyword Search before, I highly recommend it. Itâs a far faster way to find something from a specific domain or search engine on the web.
Bonus: Search Menu shortcut
I couldnât let you go without including something for Shortcuts. Ever since I installed Keyword Search, my âShare Menuâ shortcut gets less use these days, but I used to run it all the time. Say you have a shortlist of places that you search regularly. For example, YouTube, Twitter, HeyDingus, Apple Maps, and Amazon. This shortcut asks for a search term and then presents a menu of just those places that youâve defined. Tap one, and youâre brought directly to the search results. There is no need to locate the app on your device, then navigate to its search view, and then finally type in the term to search for the results.
It works with search engines built into the âSearch Webâ shortcuts action and any URL you construct, like the one above. And, if an app on your device provides a search action, you can add those in, too (e.g., Maps or Reeder). (Youâll also find in it a teaser for another shortcut that will be published on HeyDingus soon!)
âSearch Menuâ works well as a widget, as a standalone icon on your Home Screen, or in other launchers. Itâs also compatible with the Mac, as long as the corresponding apps are also installed there.
Get the âSearch Menuâ shortcut â Original Version | Latest Version