Retrieve Images
The following request uses the ItemLookup
operation with the
Images
response group. The request retrieves images for ASIN
B004HO6I4M
(Rio, the movie).
Example Request
http://webservices.amazon.com/onca/xml? Service=AWSECommerceService &Operation=ItemLookup &ResponseGroup=Images &IdType=ASIN& &ItemId=B004HO6I4M &AWSAccessKeyId=
[Your_AWSAccessKeyID]
&AssociateTag=[Your_AssociateTag]
&Timestamp=[YYYY-MM-DDThh:mm:ssZ]
&Signature=[Request_Signature]
Example Response
The following response returns image details for the item.
<Item> <ASIN>B004HO6I4M</ASIN> <SmallImage> <URL> https://ecx.images-amazon.com/images/I/519SgX2wwDL._SL75_.jpg </URL> <Height Units="pixels">75</Height> <Width Units="pixels">56</Width> </SmallImage> <MediumImage> <URL> https://ecx.images-amazon.com/images/I/519SgX2wwDL._SL160_.jpg </URL> <Height Units="pixels">160</Height> <Width Units="pixels">120</Width> </MediumImage> <LargeImage> <URL> https://ecx.images-amazon.com/images/I/519SgX2wwDL._SL500_.jpg </URL> <Height Units="pixels">500</Height> <Width Units="pixels">375</Width> </LargeImage> <ImageSets> <ImageSet Category="primary"> <SwatchImage> <URL> https://ecx.images-amazon.com/images/I/519SgX2wwDL._SL30_.jpg </URL> <Height Units="pixels">30</Height> <Width Units="pixels">22</Width> </SwatchImage> <SmallImage> <URL> https://ecx.images-amazon.com/images/I/519SgX2wwDL._SL75_.jpg </URL> <Height Units="pixels">75</Height> <Width Units="pixels">56</Width> </SmallImage> <ThumbnailImage> <URL> https://ecx.images-amazon.com/images/I/519SgX2wwDL._SL75_.jpg </URL> <Height Units="pixels">75</Height> <Width Units="pixels">56</Width> </ThumbnailImage> <TinyImage> <URL> https://ecx.images-amazon.com/images/I/519SgX2wwDL._SL110_.jpg </URL> <Height Units="pixels">110</Height> <Width Units="pixels">82</Width> </TinyImage> <MediumImage> <URL> https://ecx.images-amazon.com/images/I/519SgX2wwDL._SL160_.jpg </URL> <Height Units="pixels">160</Height> <Width Units="pixels">120</Width> </MediumImage> <LargeImage> <URL> https://ecx.images-amazon.com/images/I/519SgX2wwDL._SL500_.jpg </URL> <Height Units="pixels">500</Height> <Width Units="pixels">375</Width> </LargeImage> </ImageSet> </ImageSets> </Item>
Images are returned in two ways:
-
The images under
Item
are specified by theSmallImage
,MediumImage
, andLargeImage
child elements. -
The image sizes under
ImageSets
are specified by the_SL
suffix in the URL, whereXXX
_
is the number of pixels on the longest side of the image. For example, theXXX
LargeImage
has 500 pixels on its longest side, so it has the suffix_SL500_
.jpg. When you reference images, include the_SL
suffix.XXX
_
The ImageSets
element attribute Category
is set to
Primary
. Primary images are those shown in the Item
section.