Skip to content

Run Search

Deprecated
PipelineRetrieveResponse Pipelines.Retrieve(PipelineRetrieveParamsparameters, CancellationTokencancellationToken = default)
POST/api/v1/pipelines/{pipeline_id}/retrieve

Run a retrieval query against a managed pipeline.

Searches the pipeline’s vector store using the provided query and retrieval parameters. Supports dense, sparse, and hybrid search modes with configurable top-k and reranking.

ParametersExpand Collapse
PipelineRetrieveParams parameters
required string pipelineID

Path param

formatuuid
required string query

Body param: The query to retrieve against.

minLength1
string? organizationID

Query param

formatuuid
string? projectID

Query param

formatuuid
Double? alpha

Body param: Alpha value for hybrid retrieval to determine the weights between dense and sparse retrieval. 0 is sparse retrieval and 1 is dense retrieval.

maximum1
minimum0
string className

Body param

Double? denseSimilarityCutoff

Body param: Minimum similarity score wrt query for retrieval

maximum1
minimum0
Long? denseSimilarityTopK

Body param: Number of nodes for dense retrieval.

maximum100
minimum1
Boolean? enableReranking

Body param: Enable reranking for retrieval

Long? filesTopK

Body param: Number of files to retrieve (only for retrieval mode files_via_metadata and files_via_content).

maximum5
minimum1
Long? rerankTopN

Body param: Number of reranked nodes for returning.

maximum100
minimum1
RetrievalMode retrievalMode

Body param: The retrieval mode for the query.

DeprecatedBoolean retrieveImageNodes

Body param: Whether to retrieve image nodes.

Boolean retrievePageFigureNodes

Body param: Whether to retrieve page figure nodes.

Boolean retrievePageScreenshotNodes

Body param: Whether to retrieve page screenshot nodes.

MetadataFilters? searchFilters

Body param: Metadata filters for vector stores.

IReadOnlyDictionary<string, SearchFiltersInferenceSchema?>? searchFiltersInferenceSchema

Body param: JSON Schema that will be used to infer search_filters. Omit or leave as null to skip inference.

IReadOnlyDictionary<string, JsonElement>
IReadOnlyList<JsonElement>
string
Double
Boolean
Long? sparseSimilarityTopK

Body param: Number of nodes for sparse retrieval.

maximum100
minimum1
ReturnsExpand Collapse
class PipelineRetrieveResponse:

Schema for the result of an retrieval execution.

required string PipelineID

The ID of the pipeline that the query was retrieved against.

formatuuid
required IReadOnlyList<RetrievalNode> RetrievalNodes

The nodes retrieved by the pipeline for the given query.

required TextNode Node

Provided for backward compatibility.

string ClassName
IReadOnlyList<Double>? Embedding

Embedding of the node.

Long? EndCharIdx

End char index of the node.

IReadOnlyList<string> ExcludedEmbedMetadataKeys

Metadata keys that are excluded from text for the embed model.

IReadOnlyList<string> ExcludedLlmMetadataKeys

Metadata keys that are excluded from text for the LLM.

IReadOnlyDictionary<string, JsonElement> ExtraInfo

A flat dictionary of metadata fields

string ID

Unique ID of the node.

string MetadataSeperator

Separator between metadata fields when converting to string.

string MetadataTemplate

Template for how metadata is formatted, with {key} and {value} placeholders.

string Mimetype

MIME type of the node content.

IReadOnlyDictionary<string, Relationship> Relationships

A mapping of relationships to other node information.

One of the following:
class RelatedNodeInfo:
required string NodeID
string ClassName
string? Hash
IReadOnlyDictionary<string, JsonElement> Metadata
NodeType? NodeType
One of the following:
"1"1
"2"2
"3"3
"4"4
"5"5
IReadOnlyList<RelatedNodeInfo>
required string NodeID
string ClassName
string? Hash
IReadOnlyDictionary<string, JsonElement> Metadata
NodeType? NodeType
One of the following:
"1"1
"2"2
"3"3
"4"4
"5"5
Long? StartCharIdx

Start char index of the node.

string Text

Text content of the node.

string TextTemplate

Template for how text is formatted, with {content} and {metadata_str} placeholders.

string ClassName
Double? Score
string ClassName
DeprecatedIReadOnlyList<PageScreenshotNodeWithScore> ImageNodes

The image nodes retrieved by the pipeline for the given query. Deprecated - will soon be replaced with ‘page_screenshot_nodes’.

required Node Node
required string FileID

The ID of the file that the page screenshot was taken from

formatuuid
required Long ImageSize

The size of the image in bytes

minimum0
required Long PageIndex

The index of the page for which the screenshot is taken (0-indexed)

minimum0
IReadOnlyDictionary<string, JsonElement>? Metadata

Metadata for the screenshot

required Double Score

The score of the screenshot node

string ClassName
MetadataFilters? InferredSearchFilters

Metadata filters for vector stores.

required IReadOnlyList<Filter> Filters
One of the following:
class MetadataFilter:

Comprehensive metadata filter for vector stores to support more operators.

Value uses Strict types, as int, float and str are compatible types and were all converted to string before.

See: https://docs.pydantic.dev/latest/usage/types/#strict-types

required string Key
required Value? Value
One of the following:
Double
string
IReadOnlyList<string>
IReadOnlyList<Double>
IReadOnlyList<Long>
Operator Operator

Vector store filter operator.

One of the following:
"!="
"<"
"<="
"=="
">"
">="
"all"All
"any"Any
"contains"Contains
"in"In
"is_empty"IsEmpty
"nin"Nin
"text_match"TextMatch
"text_match_insensitive"TextMatchInsensitive
MetadataFilters
Condition? Condition

Vector store filter conditions to combine different filters.

One of the following:
"and"And
"not"Not
"or"Or
IReadOnlyDictionary<string, string> Metadata

Metadata associated with the retrieval execution

IReadOnlyList<PageFigureNodeWithScore> PageFigureNodes

The page figure nodes retrieved by the pipeline for the given query.

required Node Node
required Double Confidence

The confidence of the figure

maximum1
minimum0
required string FigureName

The name of the figure

required Long FigureSize

The size of the figure in bytes

minimum0
required string FileID

The ID of the file that the figure was taken from

formatuuid
required Long PageIndex

The index of the page for which the figure is taken (0-indexed)

minimum0
Boolean IsLikelyNoise

Whether the figure is likely to be noise

IReadOnlyDictionary<string, JsonElement>? Metadata

Metadata for the figure

required Double Score

The score of the figure node

string ClassName
IReadOnlyDictionary<string, Double> RetrievalLatency

The end-to-end latency for retrieval and reranking.

Run Search

PipelineRetrieveParams parameters = new()
{
    PipelineID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    Query = "x",
};

var pipeline = await client.Pipelines.Retrieve(parameters);

Console.WriteLine(pipeline);
{
  "pipeline_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "retrieval_nodes": [
    {
      "node": {
        "class_name": "class_name",
        "embedding": [
          0
        ],
        "end_char_idx": 0,
        "excluded_embed_metadata_keys": [
          "string"
        ],
        "excluded_llm_metadata_keys": [
          "string"
        ],
        "extra_info": {
          "foo": "bar"
        },
        "id_": "id_",
        "metadata_seperator": "metadata_seperator",
        "metadata_template": "metadata_template",
        "mimetype": "mimetype",
        "relationships": {
          "foo": {
            "node_id": "node_id",
            "class_name": "class_name",
            "hash": "hash",
            "metadata": {
              "foo": "bar"
            },
            "node_type": "1"
          }
        },
        "start_char_idx": 0,
        "text": "text",
        "text_template": "text_template"
      },
      "class_name": "class_name",
      "score": 0
    }
  ],
  "class_name": "class_name",
  "image_nodes": [
    {
      "node": {
        "file_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "image_size": 0,
        "page_index": 0,
        "metadata": {
          "foo": "bar"
        }
      },
      "score": 0,
      "class_name": "class_name"
    }
  ],
  "inferred_search_filters": {
    "filters": [
      {
        "key": "key",
        "value": 0,
        "operator": "!="
      }
    ],
    "condition": "and"
  },
  "metadata": {
    "foo": "string"
  },
  "page_figure_nodes": [
    {
      "node": {
        "confidence": 0,
        "figure_name": "figure_name",
        "figure_size": 0,
        "file_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "page_index": 0,
        "is_likely_noise": true,
        "metadata": {
          "foo": "bar"
        }
      },
      "score": 0,
      "class_name": "class_name"
    }
  ],
  "retrieval_latency": {
    "foo": 0
  }
}
Returns Examples
{
  "pipeline_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "retrieval_nodes": [
    {
      "node": {
        "class_name": "class_name",
        "embedding": [
          0
        ],
        "end_char_idx": 0,
        "excluded_embed_metadata_keys": [
          "string"
        ],
        "excluded_llm_metadata_keys": [
          "string"
        ],
        "extra_info": {
          "foo": "bar"
        },
        "id_": "id_",
        "metadata_seperator": "metadata_seperator",
        "metadata_template": "metadata_template",
        "mimetype": "mimetype",
        "relationships": {
          "foo": {
            "node_id": "node_id",
            "class_name": "class_name",
            "hash": "hash",
            "metadata": {
              "foo": "bar"
            },
            "node_type": "1"
          }
        },
        "start_char_idx": 0,
        "text": "text",
        "text_template": "text_template"
      },
      "class_name": "class_name",
      "score": 0
    }
  ],
  "class_name": "class_name",
  "image_nodes": [
    {
      "node": {
        "file_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "image_size": 0,
        "page_index": 0,
        "metadata": {
          "foo": "bar"
        }
      },
      "score": 0,
      "class_name": "class_name"
    }
  ],
  "inferred_search_filters": {
    "filters": [
      {
        "key": "key",
        "value": 0,
        "operator": "!="
      }
    ],
    "condition": "and"
  },
  "metadata": {
    "foo": "string"
  },
  "page_figure_nodes": [
    {
      "node": {
        "confidence": 0,
        "figure_name": "figure_name",
        "figure_size": 0,
        "file_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "page_index": 0,
        "is_likely_noise": true,
        "metadata": {
          "foo": "bar"
        }
      },
      "score": 0,
      "class_name": "class_name"
    }
  ],
  "retrieval_latency": {
    "foo": 0
  }
}
Note for AI agents: this documentation is built for programmatic access. - Overview of all docs: https://developers.llamaindex.ai/llms.txt - Any page is available as raw Markdown by appending index.md to its URL — e.g. https://developers.llamaindex.ai/llamaparse/parse/getting_started/index.md - Agent-friendly REST search APIs live under https://developers.llamaindex.ai/api/ — search (BM25 full-text), grep (regex), read (fetch a page), and list (browse the doc tree). See https://developers.llamaindex.ai/llms.txt for parameters. - A hosted documentation MCP server is available at https://developers.llamaindex.ai/mcp. If you support MCP, you can ask the user to install it for browsing these docs directly (an alternative to the REST API). Setup: https://developers.llamaindex.ai/for-agents/mcp/ - Other LlamaIndex tooling for agents — the LlamaParse Platform MCP server, agent skills and plugins, and the n8n node — is mapped at https://developers.llamaindex.ai/for-agents/