Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can do that by using <a href="https://github.com/dmcquay/node-apac" rel="noreferrer">node-apac</a>, 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.</p> <ol> <li><p>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.</p></li> <li><p>Login into your AWS account and go to <a href="https://portal.aws.amazon.com/gp/aws/securityCredentials?" rel="noreferrer">Security Credentials page</a> to find out your Access Key ID and Secret Access Key</p></li> <li><p>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.</p></li> <li><p>Install node-apac</p> <pre><code>npm install apac@latest </code></pre></li> <li><p>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</p> <pre><code>var util = require('util'), OperationHelper = require('apac').OperationHelper; var opHelper = new OperationHelper({ awsId: '[YOUR ACCESS KEY ID HERE]', awsSecret: '[YOUR SECRET ACCESS KEY HERE]', assocId: '[YOUR ASSOCIATE TAG HERE]', }); opHelper.execute('ItemSearch', { 'SearchIndex': 'Books', 'Keywords': 'harry potter', 'ResponseGroup': 'ItemAttributes,Offers' }, function(error, results) { if (error) { console.log('Error: ' + error + "\n"); } console.log("Results:\n" + util.inspect(results) + "\n"); }); </code></pre></li> </ol> <p>For the task a) of fetching an item image and description you do this:</p> <pre><code>opHelper.execute('ItemLookup', { 'ItemId': '[ASIN GOES HERE]', 'MechantId': 'All', 'Condition': 'All', 'ResponseGroup': 'Medium' }, function(error, results) { if (error) { console.log('Error: ' + error + "\n"); } console.log("Results:\n" + util.inspect(results) + "\n"); }); </code></pre> <p>That's it. Check the "results" object for the fields you need. It should include product images, description, and a lot more.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload