How to fetch amazon product image url from asin

976 Views Asked by At

We have the Amazon product ASIN in our database and we want to display the Amazon product image from it in frontend. Any idea or library you are aware of that can fetch this quickly? This should be done at frontend in javascript/

1

There are 1 best solutions below

0
wprogLK On

You can do that with Amazon's product advertising API (PAAPIv5). For that you need an affiliate account. See this page for more information. There exists an downloadable example for Node.js. You need to fetch an item based on its ASIN by get-items endpoint. On its response you find the urls for the product images in various sizes

"ItemResults": {
"Items": [
  {
    ...
    "Images": {
      "Primary": {
        "Small": {
          ..
          "URL": "https://m.media-amazon.com/images/I/61s4tTAizUL._SL75_.jpg",
        }
      }
    }
}]

There exists as well an online playground called Product Advertising API ScratchPad.

Keep in mind there exists limits how many request you can send!