> Agent-readable docs index: /llms.txt. Download /docs.zip to grep all markdown files locally.

---
title: "productsByIds"
description: "Fetches a batch of products by their ID."
---

<Note>
  This query works similarly to [`productByID`](/api-reference/productbyid), except it allows you to fetch products in bulk instead of one-at-a-time.
</Note>

***

### Arguments

<ParamField path="input" type={<a href="/api-reference/productbyidinput">[ProductByIDInput!]!</a>} required>
  The list of product IDs you want to fetch from our product catalog.

  This query supports retrieving up to 25 products per request.
</ParamField>

### Returns

<ParamField path="ProductsByIDsResponse.*" type={<a href="/api-reference/productsbyidsresponse">ProductsByIDsResponse!</a>}>
  Any requested field from the [`ProductsByIDsResponse`](/api-reference/productsbyidsresponse) object.
</ParamField>

***

### Example - request

<Tabs items={["GraphQL"]}>
  <Tab title="GraphQL">
    ```GraphQL
    query {
      productsByIds(input: [
        {
          id: "B00A2KD8NY"
          marketplace: AMAZON
        },
        {
          id: "B0BB6KNCKT"
          marketplace: AMAZON
        }
      ]) {
        products {
          __typename
          title
          url
        }
        errors {
          code
          field
          message
        }
      }
    }
    ```
  </Tab>
</Tabs>

### Example - response

<Tabs items={["json"]}>
  <Tab title="json">
    ```json
    {
      "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": []
        }
      }
    }
    ```
  </Tab>
</Tabs>

***

### Related mutations

* [`productByID`](/api-reference/productbyid)
* [`productsByDomainV2`](/api-reference/productsbydomainv2)


---

*Powered by [holocron.so](https://holocron.so)*
