Resources for Developers Using Amazon's Product Advertising API
· Home  
· Search  
· Browse Nodes  
· Data Feed?  
· FAQs  
· One-Second Rule  
· PHP Examples  
· Tips for Associates  
· Tools  
· Understanding A2S  

Create a custom Amazon Associate Store in minutes with
Associate-O-Matic.

Disappointed by Amazon.com and the Associates program?

Please consider
Shareasale

Shareasale manages affiliate programs for thousands of merchants. The site makes it easier to apply to programs and create links. And simple-to-use datafeeds are offered by most merchants.

How do I know what search index to use in an ItemSearch operation?

If you use the ItemSearch operation to provide general search results, you run into a problem. The ItemSearch operation requires you to specify a Search Index.

Unfortunately, there's no straightforward way to relate a keyword phrase to the search index (or indexes) in which the products associated with the phrase are indexed. For example, if a user searches for "Star Wars," should you search the Book, DVD, VHS, or VideoGame search index?

In the US domain, you can use All in place of the search index, This tells A2S to do a quick search of all the search indexes and return a few matching results from each.

But, what can you do for other domains?

One solution is to take advantage of the fact that the AWS Licensing Agreement allows you to cache information for a limited period of time. Each time your site does an ItemSearch or ItemLookup operation, store the results in your database and with the current time.

When a site visitor does a keyword search, perform an ItemSearch on a randomly selected search index and update the database with the results. Then search the database for results to return your site's visitor. Delete asny results returned which are too old according the AWS terms.

See Also:


Copyright © 2019 by Roger Smith