> ## Documentation Index
> Fetch the complete documentation index at: https://upstash-vector.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch

Used to retrieve the vector by ID.

## Arguments

<ResponseField name="IDs" type="string[] | number[]" required>
  The IDs of the vectors you want to fetch.
</ResponseField>

<ResponseField name="Options" type="Object" required>
  <Expandable>
    <ResponseField name="includeMetadata" type="boolean">
      Whether to include the metadata of the vectors in the response. Setting
      this `true` would be the best practice, since it will make it easier to
      identify the vectors.
    </ResponseField>

    <ResponseField name="includeVectors" type="boolean">
      The metadata of the vector. This is used to make it easier to identify the
      vector on queries.
    </ResponseField>
  </Expandable>
</ResponseField>

## Response

<ResponseField name="FetchResponse" type="Vector[]" required>
  This field is `null` if no vector with the specified id is found.

  <Expandable defaultOpen="true">
    <ResponseField name="id" type="string | number" required>
      The ID of the resulting vector. <br />
    </ResponseField>

    <ResponseField name="vector" type="number[]">
      The resulting vector.
    </ResponseField>

    <ResponseField name="metadata" type="Record<string, unknown>">
      The metadata of the vector. This is used to make it easier to identify the
      vector on queries.
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```typescript Basic
  const responseDelete = await index.fetch(["2", "3"], {});
  // [{ id: "2" }, { id: "3" }]
  ```

  ```typescript Vector Not Found
  const responseDelete = await index.fetch(["2", "3"], {});
  // [{ id: "2" }, null]
  ```
</RequestExample>
