# Query By Ids

### Prerequisites

Requires a user auth token. See the [API Auth](/api/api-setup-text.md) section.

### Getting vectors

Fetches data on specific vectors given vector ids.

```typescript
import mindplug from "@/src/mindplugAPI"; // base instance

mindplug.post("/data/vectors", {
    "db": "walmart",
    "collection": "OfficeSupplies",
    "vectorIds": ["22dd234c-340f-4c85-b784-47645bcdf07a",  "c8c47178-cba5-4795-a6ef-67fd4eda70fa"]
});
```

Returns the vector data related to the given vectors

```json
{
    "data": [
        {
            "id": "0b1a591b-bf13-4c3a-a667-81c9da5bf75f",
            "metadata": {
                "content": "Premium eraser: an erases that works on both pen and pencil and leaves no crumbs",
                "description": "Premium eraser: an erases that works on both pen and pencil and leaves no crumbs",
                "id": 1234335
            }
        }
    ]
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mindplug.io/api/query-by-ids.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
