Ask Dave Taylor
  • Facebook
  • Instagram
  • Linkedin
  • Pinterest
  • Twitter
  • YouTube
  • Home
  • YouTube Videos
  • Top Categories
  • Subscribe via Email
  • Ask A Question
  • Meet Dave
  • Home
  • HTML & Web Page Design
  • How can I create predefined Amazon search links?

How can I create predefined Amazon search links?

October 2, 2007 / Dave Taylor / HTML & Web Page Design / 8 Comments

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:

http://www.amazon.com/s/ref=nb_ss_gw/102-1882688-6100927?
initialSearch=1&url=search-alias%3Daps&field-keywords=honda+parts&Go.x=0&Go.y=0&Go=Go

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?

Amazon.com Search Hack: No Results in Category...

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:

http://www.amazon.com/s?url=search-alias%3Daps&field-keywords=honda+parts

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:

<a href=”http://www.amazon.com/s?url=search-alias%3Daps&field-keywords=honda+parts”><img
src=”amazon-search-honda.jpg” alt=”Search for Honda parts at Amazon” /></a>

or just as a hypertext link unto itself:

<a href=”http://www.amazon.com/s?url=search-alias%3Daps&field-keywords=honda+parts”>Check Amazon.com for Honda parts</a>

Hope that helps you work with the Amazon search engine!

About the Author: Dave Taylor has been involved with the online world since the early days of the Internet. Author of over 20 technical books, he runs the popular AskDaveTaylor.com tech help site. You can also find his gadget reviews on YouTube and chat with him on Twitter as @DaveTaylor.

Let’s Stay In Touch!

Never miss a single article, review or tutorial here on AskDaveTaylor, sign up for my fun weekly newsletter!
Name: 
Your email address:*
Please enter all required fields
Correct invalid entries
No spam, ever. Promise. Powered by FeedBlitz
Please choose a color:
Starbucks coffee cup I do have a lot to say, and questions of my own for that matter, but first I'd like to say thank you, Dave, for all your helpful information by buying you a cup of coffee!

8 comments on “How can I create predefined Amazon search links?”

  1. Randy Harmelink says:
    March 14, 2013 at 6:36 pm

    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:
    http://www.amazon.com/s?node=158591011&field-price=0-0&sort=popularity-rank
    I’d like a way to remove all of the short stories from the search results. Say, anything under 100 pages.

    Reply
  2. tim says:
    March 14, 2013 at 1:50 pm

    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.
    Tim

    Reply
  3. Bobby says:
    October 30, 2011 at 1:55 am

    Thank You! You made life lot easier.

    Reply
  4. Sarah says:
    November 29, 2010 at 4:14 pm

    Hi,
    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.
    Thanks

    Reply
  5. Bill Talada says:
    September 26, 2010 at 8:24 am

    Navigate to the amazon book desired. Click on “share” link. Copy permalink and paste into your article.

    Reply
  6. Prasanth says:
    August 4, 2010 at 10:51 pm

    Hi,
    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
    Regards,
    Prasanth

    Reply
  7. yosax says:
    April 19, 2008 at 3:27 pm

    Great article…
    However, I want to know the methods to include the referral link (tag=xxxxxx-20) inside the Amazon search codes.

    Reply
  8. Richard Holt says:
    March 6, 2008 at 2:53 pm

    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?
    ®

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

Recent Posts

  • How Can I Share My Netflix Account With My Friend? [Updated for 2023]
  • How to Check Energy Recommendations on your Windows Laptop
  • How Do I Customize New Tab Windows in Safari for Mac?
  • Can AI-Generated ChatGPT Text Be Accurately Identified?
  • How to Perform a Microsoft Account Security Audit and Checkup

On Our YouTube Channel

How to: Replace a Switchbot Door Sensor Battery

EMEET Luna vs INNOTRIK Studio Bluetooth Speakerphones -- DEMOS & REVIEW

Categories

  • AdSense, AdWords, and PPC Help (106)
  • Amazon, eBay, and Online Shopping Help (163)
  • Android Help (226)
  • Apple iPad Help (147)
  • Apple Watch Help (53)
  • Articles, Tutorials, and Reviews (346)
  • Auto Tech Help (15)
  • Business Advice (200)
  • ChromeOS Help (31)
  • Computer & Internet Basics (779)
  • d) None of the Above (166)
  • Facebook Help (383)
  • Google, Chrome & Gmail Help (188)
  • HTML & Web Page Design (247)
  • Instagram Help (49)
  • iPhone & iOS Help (623)
  • iPod & MP3 Player Help (173)
  • Kindle & Nook Help (99)
  • LinkedIn Help (88)
  • Linux Help (173)
  • Linux Shell Script Programming (89)
  • Mac & MacOS Help (911)
  • Most Popular (16)
  • Outlook & Office 365 Help (33)
  • PayPal Help (68)
  • Pinterest Help (54)
  • Reddit Help (19)
  • SEO & Marketing (82)
  • Spam, Scams & Security (95)
  • Trade Show News & Updates (23)
  • Twitter Help (220)
  • Video Game Tips (66)
  • Web Site Traffic Tips (62)
  • Windows PC Help (947)
  • Wordpress Help (206)
  • Writing and Publishing (72)
  • YouTube Help (47)
  • YouTube Video Reviews (159)
  • Zoom, Skype & Video Chat Help (62)

Archives

Social Connections:

Ask Dave Taylor


Follow Me on Pinterest
Follow me on Twitter
Follow me on LinkedIn
Follow me on Instagram


AskDaveTaylor on Facebook



microsoft insider mvp


This web site is for the purpose of disseminating information for educational purposes, free of charge, for the benefit of all visitors. We take great care to provide quality information. However, we do not guarantee, and accept no legal liability whatsoever arising from or connected to, the accuracy, reliability, currency or completeness of any material contained on this site or on any linked site. Further, please note that by submitting a question or comment you're agreeing to our terms of service, which are: you relinquish any subsequent rights of ownership to your material by submitting it on this site. Our lawyer says "Thanks for your cooperation."
© 2023 by Dave Taylor. "Ask Dave Taylor®" is a registered trademark of Intuitive Systems, LLC.
Privacy Policy - Terms and Conditions - Accessibility Policy