t3chnoboy / amazon-product-api

:credit_card: Amazon Product Advertising API client
365 stars 104 forks source link

How to get a product page from itemlookup #110

Open shlomioz opened 6 years ago

shlomioz commented 6 years ago

Hi all, I am using "ITEMLOOKUP" call, and I am trying to get (or generate) a product page URL of the cheapest product. The "Technical Details" link is not good because the price there is not always the cheapest(not equal to the "LowestNewPrice" from the API response ) and the "MoreOffersUrl" is an offer-listing URL.

Do anyone know how can I get it?

FdezRomero commented 6 years ago

If you have the ASIN of the product, you can easily compose the details page URL yourself:

https://www.amazon.com/dp/ASIN
shlomioz commented 6 years ago

@FdezRomero thanks for responding, This way is not always right, I attached two picture, one is showing to lowest price for condition new from the API, and the other is showing different price (and different seller) capture

image

there is an other way to do it?

FdezRomero commented 6 years ago

@shlomioz From your original question I understood that you were trying to "get (or generate) a product page URL". But with your latest reply it seems that what you're trying to accomplish is to replicate the pricing information as shown on Amazon product pages.

By my experience, Amazon handles cases and you'll have to kind of reverse engineer the same conditions Amazon uses to choose the "buy box" price from all the available offers. The API provides all the information you need, just not in the same way as shown on Amazon.com. This is the way the data is coming from the Product Advertising API, it's not specific to this library.

I suggest you to include the Variations resource group to get all the available offers and play with the query conditions to get what you want. You'll find more information about getting the prices in the Product Advertising API docs.

When asking this kind of open question try to be more specific about what you're trying to accomplish and not only what didn't work for you, so other people can help you with better answers 😊