I’m doing a sort of shopping list web app in which you can link items to their Amazon’s equivalent.
But I’m wondering how to do so. Is there any API? If so, is there a javascript API?
I’d like to:
a) Fetch an item image and description using their ASIN
b) Fetch search’s results for a certain term.
You can do that by using node-apac, a node.js client for Amazon’s Product Advertising API. However, to use the Amazon API you have to open a Amazon Web Services (AWS) account. Follow these steps.
Open a AWS account. Note: Amazon will ask you for a credit card on sign-up, but the Product Advertising API is free, so you won’t be charged.
Login into your AWS account and go to Security Credentials page to find out your Access Key ID and Secret Access Key
Enroll into Amazon Associates Program and get your Associate Tag. This will allow you to receive commission from Amazon for the referrals you send to them.
Install node-apac
Here is a code snippet that accomplishes your task b) for Amazon search query. It comes from the node-apac page, credit goes to dmcquay
For the task a) of fetching an item image and description you do this:
That’s it. Check the “results” object for the fields you need. It should include product images, description, and a lot more.