---
title: "Query Text"
description: "Local-first visual environment for building and running AI workflows. Build agents visually, deploy anywhere, privacy by design."
canonical: https://docs.nodetool.ai/nodes/vector/querytext
markdown: https://docs.nodetool.ai/nodes/vector/querytext.md
product: NodeTool
source: https://github.com/nodetool-ai/nodetool/blob/main/docs/nodes/vector/querytext.md
---

# Query Text

**Type:** `vector.QueryText`

**Namespace:** `vector`

## Description

Query the index for similar text.
    vector, RAG, query, text, search, similarity

## Properties

| Property | Type | Description | Default |
|----------|------|-------------|---------|
| collection | `collection` | The collection to query | `{"type":"collection","name":""}` |
| text | `str` | The text to query | `` |
| n_results | `int` | The number of results to return | `1` |

## Outputs

| Output | Type | Description |
|--------|------|-------------|
| ids | `list[str]` |  |
| documents | `list[str]` |  |
| metadatas | `list[dict]` |  |
| distances | `list[float]` |  |

## Related Nodes

Browse other nodes in the [vector](./) namespace.
