This query works similarly to productByID, except it allows you to fetch products in bulk instead of one-at-a-time.


Arguments

The list of product IDs you want to fetch from our product catalog.

This query supports retrieving up to 25 products per request.

Returns

ProductsByIDsResponse.*

Any requested field from the ProductsByIDsResponse object.


Example - request

query {
  productsByIds(input: [
    {
      id: "B00A2KD8NY"
      marketplace: AMAZON
    },
    {
      id: "B0BB6KNCKT"
      marketplace: AMAZON
    }
  ]) {
    products {
      __typename
      title
      url
    }
    errors {
      code
      field
      message
    }
  }
}

Example - response

{
  "data": {
    "productsByIds": {
      "products": [
        {
          "__typename": "AmazonProduct",
          "title": "OXO Good Grips 3-in-1 Egg Separator, White/Yellow 1 Count (Pack of 1)",
          "url": "https://www.amazon.com/OXO-Good-Grips-Separator-White/dp/B00A2KD8NY"
        },
        {
          "__typename": "AmazonProduct",
          "title": "Mkeke for iPhone 14 Pro Case Clear, [Military Grade Protection] [Not Yellowing] Shockproof Phone Case for Apple iPhone 14 Pro 2022",
          "url": "https://www.amazon.com/Mkeke-Military-Protection-Yellowing-Shockproof/dp/B0BB6KNCKT"
        }
      ],
      "errors": []
    }
  }
}