Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get images and description from Amazon's Product Advertising API?

I am using the Amazon Product Advertising API (formerly ECS) in PHP to get product information using an ASIN code. I can get the information but images and product descriptions are missing. I've looked around the API class and couldn't find anything helpful. The code I am using to get the product details is:

$client = new AmazonECS(get_option('awskey'), get_option('awssecret'), 'UK'); 
$response = $client->lookup('0596157134'); 
var_dump($response); // Debugging

Is it possible with the API or is there another way to get the product description and image?

like image 766
Riess Howder Avatar asked Jun 05 '11 10:06

Riess Howder


1 Answers

The item lookup call you are making only returns basic information about the product. You will need to use the ResponseGroup parameter to specify what information you want Amazon to return (see Amazon's ItemLookup Documentation for more information). If you want to get the images and product description, you can request the "Medium" response group. Try the following call:

$response = $client->responseGroup('Medium')->lookup('0596157134'); 
like image 119
user635090 Avatar answered Sep 23 '22 17:09

user635090