> ## Documentation Index
> Fetch the complete documentation index at: https://docs-test.rye.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# productsByIds

> 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

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

### Example - response

<CodeGroup>
  ```json theme={null}
  {
    "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": []
      }
    }
  }
  ```
</CodeGroup>

***

### Related mutations

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