I read your note about how to add an Amazon.com search box to your site and it’s very cool, but what I want to know is: What if I want the search to only search a certain keyword, Example “Honda Parts”?
Of all the major sites that I visit with frequency, there are non with a more Byzantine URL structure and organization than Amazon.com. I don’t know what kind of back-end infrastructure decision they made years ago, but the whole “obidos” and session number thing really makes it a huge pain to work with the site, and forget about being able to email someone a URL so they can see a product for sale: their URLs are famously bizarre.
But! Don’t panic!
When it comes to their search system, buried in all the junk, there is a parameter that contains the actual search string, so when I go to Amazon.com and simply search for “honda parts” from the home page, the resultant page has the following URL:
Now it’s just a matter of slicing until it fails: what parameters can we axe from this ghastly URL until we get just what we want?
The way I do this is to actually edit the URL within the Address box of my browser (Apple’s Safari) and reload the page each time until it just doesn’t bring up what I seek.
Do that and you’ll quickly find that all the “Go” fields can be safely chopped off. Can we delete the url=search-alias%3Daps value?
Clearly not. We’ve ended up with a search that has no category specified, but the Amazon backend can’t extrapolate a full-site search. Bummer.
How about the core URL? Can we tweak that a bit, losing the nb_ss_gw and/or the 102-1882688 jazz?
Surprisingly, yes, you can get rid of the numeric session ID value without breaking the search, something that’s a bit confusing if you’re used to all parameters being name=value pairs after the “?” symbol. You can even get rid of the ref= part of the URL, believe it or not. Lots of superfluous information in this search URL, as is obvious.
Heck, you can even get rid of the “first-search” value, leaving us with a much less scary URL:
Doesn’t even need a line break. Better, you can now see how to add it to your site and how to use it as the wrapper for a button, say:
src=”amazon-search-honda.jpg” alt=”Search for Honda parts at Amazon” /></a>
or just as a hypertext link unto itself:
Hope that helps you work with the Amazon search engine!
Do you know if there is a parameter to remove short stories from a Kindle eBook search? For example, I use this to search for free Science Fiction Kindle books:
I’d like a way to remove all of the short stories from the search results. Say, anything under 100 pages.
Thanks for the Amazon URL. That worked beautifully.
I sent you $5.00 for coffee.
Two questions if I may:
Do you have a similar answer for accessing Google Images via their URL?
What software are you using for your comments form? It looks better than others I have seen.
Thanks again for the excellent link.
Enjoy your coffee.
Thank You! You made life lot easier.
Just wondered if you knew of a way of bringing up listings on amazon.co.uk for items currently unavailable.
If an item has a price then it will be listed. For example in vhs if I leave the search box empty I will get a list of around 80,000 videos with prices ranging from £0.01 to hundreds of pounds. However none of the currently unavailable videos will show on the search.
Navigate to the amazon book desired. Click on “share” link. Copy permalink and paste into your article.
In my site i am listing song names, and there is a link corresponding to each song which redirects to amazon. Currently i am searching the song name in amazon, so i have only one field-keyword. How Can i provide a search using artist name too. required search by song and artist… plz help
However, I want to know the methods to include the referral link (tag=xxxxxx-20) inside the Amazon search codes.
Great post, very helpful. Is it possible to add in an Amazon Associates ID so I can get credit for links I send their way?