amazon-web-servicesapi

How do I get the URL for the item using the Amazon API


I'm making a ItemSearch request with keywords and the response groups 'EditorialReview' and 'Images', but I don't get back the DetailsPageURL, it's always null. I assume this would be the link (including my affliate tag) back to amazon. I've looked through all of the response groups, but I can't seem to find one which will offer this information!

Does anyone know how to get an affiliate link back to a product? Or do you have to build one yourself?

Thanks,

Andy.


Solution

  • The Url of each item can be found from the itemSearch request.

    I got it from using item.ItemLinks as below:

    string strLink = item.ItemLinks[0].URL;
    

    If you look in the documentation:

    http://s3.amazonaws.com/awsdocs/Associates/2011-08-01/prod-adv-api-gsg-2011-08-01.pdf

    itemLinks is returned in the XML from the API