> For the complete documentation index, see [llms.txt](https://docs.mindplug.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mindplug.io/api/query-by-collection.md).

# Query by collection

### Prerequisites

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

### Deleting Collection

Deletes all embedding vectors from the collection. The endpoins requires:

1. Database name: `db`
2. A collection name: `collection`

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

mindplug.post("/collection/vectors", {
    db: "walmart",
    collection: "office supplies"
});
```

Returns a list of top 10 vectors from the collection

```json
{
    "data": [
        {
            "id": "94d75718-c00a-468f-825c-4181925447e6",
            "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
            }
        }
    ],
    "count": 2
}

```
