Images

The Images resources returns the URLs for all available images of an item in three sizes: Small, Medium, and Large. For example, if a Kindle has four images, the images resources returns the URLs of 12 images: four images, each in three sizes.

In addition to returning the image URLs, these resources also return the height and width dimensions of each image. Use these values to display the images correctly.

Availability

All locales.

Response Elements

Name Description
Primary Container for Primary Images. The container includes Large, Medium, and Small Image Sizes as per the resources requested. Each of the image size contains three values: URL, Height, and Width of the image. For more information, refer ImageType Response Element
Variants Container for Variants Images. The container includes Large, Medium, and Small Image Sizes as per the resources requested. Each of the image size contains three values: URL, Height, and Width of the image. For more information, refer ImageType Response Element

ImageType Response Element

The structure of ImageType (Primary / Variants) container inside the high level Images Resource is as follows:

{
  "ImageType": {
    "ImageSize": {
      "URL": "Image URL",
      "Height": "Number representing width of the image",
      "Width": "Number representing height of the image"
    }
  }
}
  • Each of the ImageType (Primary / Variant) can contain three sub-resources: Small, Medium, and Large.
  • Each of the ImageSize (Small / Medium / Large) contains three values: URL, Height, and Width of the image.

The Primary image denotes the image which is displayed in search results and on the detail page. Variants include everything else. The sizes of the images are specified by the _SLXXX_ suffix in the URL, where XXX is the number of pixels on the longest side of the image. For example, a medium size image has 160 pixels on its longest side, so it has the suffix _SL160_. This is the preferred way to reference images.

Relevant Operations

Operations that can use these resources include:

Resources

Add the resource name in the request payload to get the corresponding data in the API response.

Name Description
Images.Primary.Small Get the primary image of an item in small size.
Images.Primary.Medium Get the primary image of an item in medium size.
Images.Primary.Large Get the primary image of an item in large size.
Images.Variants.Small Get the variant images of an item in small size.
Images.Variants.Medium Get the variant images of an item in medium size.
Images.Variants.Large Get the variant images of an item in large size.

Sample Use Cases

Example 1

Get the primary image of an item, in large size.

Request Payload

{
    "AssociateTag": "xyz-20",
    "ItemIds": ["B00TSUGXKE"],
    "Resources": ["Images.Primary.Large"]
}

Response

{
 "ASIN": "B00TSUGXKE",
 "Images": {
  "Primary": {
   "Large": {
    "URL": "https://m.media-amazon.com/images/I/41FYkVPzrIL.jpg",
    "Height": 500,
    "Width": 500
   }
  }
 }
}

Example 2

Get the primary image of an item in large size, and variant images in small size.

Request Payload

{
    "AssociateTag": "xyz-20",
    "ItemIds": ["B00TSUGXKE"],
    "Resources": ["Images.Primary.Large", "Images.Variants.Small"]
}

Response

{
 "ASIN": "B00TSUGXKE",
 "Images": {
  "Primary": {
   "Large": {
    "URL": "https://m.media-amazon.com/images/I/41FYkVPzrIL.jpg",
    "Height": 500,
    "Width": 500
   }
  },
  "Variants": [{
   "Small": {
    "URL": "https://m.media-amazon.com/images/I/51CjYz4iQHL._SL75_.jpg",
    "Height": 75,
    "Width": 75
   }
  }, ...]
 }
}

Example 3

Get all images of an item, in all sizes.

Request Payload

{
    "AssociateTag": "xyz-20",
    "ItemIds": ["B00TSUGXKE"],
    "Resources": ["Images.Primary.Small", "Images.Primary.Medium", "Images.Primary.Large", "Images.Variants.Small", "Images.Variants.Medium", "Images.Variants.Large"]
}

Response

{
 "ASIN": "B00TSUGXKE",
 "Images": {
  "Primary": {
   "Small": {
    "URL": "https://m.media-amazon.com/images/I/41FYkVPzrIL._SL75_.jpg",
    "Height": 75,
    "Width": 75
   },
   "Medium": {
    "URL": "https://m.media-amazon.com/images/I/41FYkVPzrIL._SL160_.jpg",
    "Height": 160,
    "Width": 160
   },
   "Large": {
    "URL": "https://m.media-amazon.com/images/I/41FYkVPzrIL.jpg",
    "Height": 500,
    "Width": 500
   }
  },
  "Variants": [{
   "Small": {
    "URL": "https://m.media-amazon.com/images/I/51CjYz4iQHL._SL75_.jpg",
    "Height": 75,
    "Width": 75
   },
   "Medium": {
    "URL": "https://m.media-amazon.com/images/I/51CjYz4iQHL._SL160_.jpg",
    "Height": 160,
    "Width": 160
   },
   "Large": {
    "URL": "https://m.media-amazon.com/images/I/51CjYz4iQHL.jpg",
    "Height": 500,
    "Width": 500
   }
  }, ...]
 }
}

results matching ""

    No results matching ""