Use the Amazon API to Get Product Prices

You can use the Amazon Advertising API (AWS) to fetch the current prices, item description, customer reviews, product images, quantity available and other details of any product listed on various Amazon websites.

The getAmazonPrice() method takes the region (like “com” for US or “es” for Spain) and the 10-digit ASIN of any product. The response is returned as JSON that the Amazon Price Tracker can easily parse with Google Scripts. You cannot however use this technique for fetching prices of Kindle Books as the Amazon API doesn’t support them yet.

You’ll have to get your public and private access keys from the AWS Management Console and replace them in the PHP snippet. You also need to put your Amazon Affiliate ID for the country specific Amazon Affiliate program. For instance, the id for Amazon US would be different from Amazon UK though you can use the same Access Keys with the code.