Skip to main content
Version: 2.0

Retrieve Document API Definition

The Retrieve Document API enables you to fetch the content and metadata of a specific document from a corpus. Use this endpoint to view the full details of a document, including its text, metadata, and associated tables, if table extraction is enabled.

This information is particularly useful when you need to analyze the details of a specific document or integrate document content into your application workflows.

Retrieve Document Request and Response

To retrieve a document, send a GET request to /v2/corpora/:corpus_key/documents/:document_id, where corpus_key is the unique identifier for the corpus. You also specify the unique document_id of the document to retrieve.

The response contains the unique ID, the parts that make up the document, and the metadata of the specific document. If table extraction is enabled, the response includes tables associated with the document.

REST 2.0 URL

Retrieve Document REST Endpoint Address

Vectara exposes a REST endpoint at the following URL to retrieve a document:
https://api.vectara.io/v2/corpora/:corpus_key/documents/:document_id

The API Reference shows the full Retrieve Document REST definition.