Raddy Website Design & Development Tutorials

Guide to Amazon Product Advertising API using NodeJs | PAAPI

By Raddy in NodeJs ·

This is a brief introduction to the Amazon Product Advertising API, where I will be using the official NodeJs SDK for interaction. I’ll guide you through the documentation, explain the API call limits, and show you how to perform operations like GetItems and SearchItems. Lastly, I’ll showcase how I utilized the API in one of my projects.

Summarised Amazon Product Advertising API usage:

  1. TPS (Transactions per Second): The maximum number of API calls you can make in one second.
  2. TPD (Transactions per Day): The maximum number of API calls you can make in one day.

Initial Usage Limit:

First 30-day period: One request per second (one TPS) and a cumulative daily maximum of 8640 requests per day (8640 TPD).

  1. Shipped Revenue: The total sales volume of all items shipped from orders resulting from clicks through links created using Product Advertising API 5.0.
  • Adjustable usage limit based on shipped item revenue.
  • Adjustments to Usage Limit:*
  • One TPD for every $5 in shipped item revenue generated via the API.
  • One TPS (up to a maximum of ten TPS) for every $4320 of shipped item revenue generated via the API.
  • Note:*
  • Account will lose access to Product Advertising API 5.0 if it has not generated referring sales for a consecutive 30-day period.
  • Can regain access within two days after referred sales are shipped.
  • Best Practices:*
  1. Use links provided by Product Advertising API 5.0 when linking back to Amazon.
  2. Do not edit any of the URL parameters.
  3. Use primary account credentials and retain all URL parameters returned in the response.
  4. Pass Partner tag in all requests to Product Advertising API 5.0.

Breakdown of how I used it in my project

* note that it was a personal project and I bodged everything together as fast as I can

My project was pretty straightforward. It was a Node.js project that allowed connection to my database and used the node-schedule package, and the Amazon SDK. Each product in my database had an ASIN number, which I used to fetch the latest info from Amazon.

  1. I configured Node Schedule to run every morning at 10:00.
  2. I created a process that queries all products with an ASIN number from my database.
  3. I used the returned records to make Amazon Requests in batches, with a pause of 2-3 seconds between each request.
  4. For each Amazon Request, if I received data back, I updated a record until all records were completed.

There might be more efficient ways to do this, but this method worked for me. As a starting point, you might want to set your Node.js to run 2-3 times per week instead of daily.

Other features that I had built:

  • NodeJs Process Logs
  • Status when the project ran and was completed

Nice to have:

  • Email Report

Leave a Reply

Your email address will not be published. Required fields are marked *