# Mastra.getVector()
[EN] Source: https://mastra.ai/reference/core/getVector

The `.getVector()` method is used to retrieve a vector store by its name. The method accepts a single `string` parameter for the vector store's name.

## Usage example

```typescript copy
mastra.getVector("testVectorStore");
```

## Parameters

<PropertiesTable
  content={[
    {
      name: "name",
      type: "TVectorName extends keyof TVectors",
      description:
        "The name of the vector store to retrieve. Must be a valid vector store name that exists in the Mastra configuration.",
    },
  ]}
/>

## Returns

<PropertiesTable
  content={[
    {
      name: "vector",
      type: "TVectors[TVectorName]",
      description:
        "The vector store instance with the specified name. Throws an error if the vector store is not found.",
    },
  ]}
/>

## Related

- [Vector stores overview](/docs/rag/vector-databases)
- [RAG overview](/docs/rag/overview)


---
title: "Reference: Mastra.getVectors() | Core"
description: "Documentation for the `Mastra.getVectors()` method in Mastra, which retrieves all configured vector stores."
---