Product Advertising API
Developer Guide (API Version 2011-08-01)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Did this page help you?  Yes | No |  Tell us about it...

Images Response Group

The Images response group returns the URLs to all available images of an item in three sizes: small, medium, and large. For example, if a blender is for sale and there are four images of it, this response group returns the URLs of twelve images: four images, each in three sizes.

In addition to returning the URLs of the images, the response groups also returns the height and width dimensions of each image. Use these values to help you display the images correctly.

Relevant Operations

Operations that can use this response group include:

Response Elements

The following table describes the elements returned by the Images response group.

Images also returns the elements that all response groups return, as described in Elements Common to All Response Groups.

Parent Response Group

The following response groups are parent response groups of the Images response group.

  • None

Child Response Group

The following response groups are child response groups of the Images response group.

  • None

Sample REST Use Case

All locales.

http://webservices.amazon.com/onca/xml?
Service=AWSECommerceService&
AWSAccessKeyId=[AWS Access Key ID]&
Operation=ItemSearch&
ItemId=B000Q678OO&
ResponseGroup=Images&
SearchIndex=Blended&
Version=2011-08-01
&Timestamp=[YYYY-MM-DDThh:mm:ssZ]
&Signature=[Request Signature]

Sample Response Snippet

The following response snippet shows the elements returned by the Images response group.

<Item>
  <ASIN>B000Q678OO</ASIN>
  <SmallImage>
  <URL>http://ecx.images-amazon.com/images/I/51YL4rlI%2B9L._SL75_.jpg</URL>
  <Height Units="pixels">75</Height>
  <Width Units="pixels">58</Width>
  </SmallImage>
  <MediumImage>
  <URL>http://ecx.images-amazon.com/images/I/51YL4rlI%2B9L._SL160_.jpg</URL>
  <Height Units="pixels">160</Height>
  <Width Units="pixels">124</Width>
  </MediumImage>
  <LargeImage>
  <URL>http://ecx.images-amazon.com/images/I/51YL4rlI%2B9L.jpg</URL>
  <Height Units="pixels">500</Height>
  <Width Units="pixels">389</Width>
  </LargeImage>

<ImageSets>
  <ImageSet Category="primary">
  <SwatchImage>
  <URL>http://ecx.images-amazon.com/images/I/51YL4rlI%2B9L._SL30_.jpg</URL>
  <Height Units="pixels">30</Height>
  <Width Units="pixels">23</Width>
  </SwatchImage>
  <SmallImage>
  <URL>http://ecx.images-amazon.com/images/I/51YL4rlI%2B9L._SL75_.jpg</URL>
  <Height Units="pixels">75</Height>
  <Width Units="pixels">58</Width>
  </SmallImage>
  <ThumbnailImage>
  <URL>http://ecx.images-amazon.com/images/I/51YL4rlI%2B9L._SL75_.jpg</URL>
  <Height Units="pixels">75</Height>
  <Width Units="pixels">58</Width>
  </ThumbnailImage>
  <TinyImage>
  <URL>http://ecx.images-amazon.com/images/I/51YL4rlI%2B9L._SL110_.jpg</URL>
  <Height Units="pixels">110</Height>
  <Width Units="pixels">86</Width>
  </TinyImage>
  <MediumImage>
  <URL>http://ecx.images-amazon.com/images/I/51YL4rlI%2B9L._SL160_.jpg</URL>
  <Height Units="pixels">160</Height>
  <Width Units="pixels">124</Width>
  </MediumImage>
  <LargeImage>
  <URL>http://ecx.images-amazon.com/images/I/51YL4rlI%2B9L.jpg</URL>
  <Height Units="pixels">500</Height>
  <Width Units="pixels">389</Width>
  </LargeImage>
 </ImageSet>
</ImageSets>

The images are returned in two ways: under <Item> and under <ImageSets>. The images under under <Item> are specified by the <SmallImage> , <MediumImage> , and <LargeImage> elements.

The sizes of the images under <ImageSets> are specified by the _SLXXX_ suffix in the URL, where XXX is the number of pixels on the longest side of the image. A medium size image, for example, has 160 pixels on its longest side so it has the suffix _SL160_. This is the preferred way to reference images.

The ImageSets element attribute, Category, is set to Primary. Primary images are the same images that appear in the <Item> section.