Using the Amazon API for autocomplete

On the website, I create an Amazon product search. This should display some product information that I can get using their partner API. I can find product information using this dependency (which I'm not entirely happy with because I probably have to create my own package from my provided WSDL), but I'm not entirely sure what would be the best way to implement autocomplete in a search engine for their products.

I want to download the autocomplete information from my own server, not Amazon's, but I'm not sure what the recommended way to do this would be. Through the provided Amazon Affiliate API or is there a better way?

As a summary, I'm looking for a way that I have an autocomplete textbox on my website that uses my own server to do autocomplete (example.com/search/autocomplete/%QUERY%), which should then call some autocomplete functions in the Amazon API.

+3


source to share


2 answers


Amazon offers - in addition to their partner API - a web service that can be used to retrieve autocomplete information. It can be used by calling a url like:

http://completion.amazon.com/search/complete?search-alias=aps&client=amazon-search-ui&mkt=1&q=canon

      



Where content q is the query you want to autocomplete.

+6


source


I created a Vanilla JavaScript plugin to integrate the Amazon Autocomplete web service into search input.

Fortunately, the Amazon Web Service is JSONP enabled, so it allows you to handle requests via tags <script>

and callbacks that are already implemented in the plugin.



https://github.com/caroso1222/amazon-autocomplete

+2


source







All Articles