Simple Single Corpus Query
GET/v2/corpora/:corpus_key/query
Supported API Key Type:
Query ServicePersonal
The Query APIs enable Retrieval Augmented Generation (RAG), allowing you to search your data and generate AI-powered summaries. Vectara provides three query types to match different search needs:
- Single corpus query: For a simple search within a single data source.
- Advanced single corpus query: For full-featured search and RAG within one corpus, supporting advanced features like table summarization, metadata filtering, and reranking.
- Multiple corpora query: For searching across one or more corpora with full RAG capabilities.
Search a single corpus with a straightforward query request, specifying the corpus key and query parameters.
- Specify the unique
corpus_keyidentifying the corpus to query. Thecorpus_keyis created in the Vectara Console or the Create Corpus API, and the corpus key is part of that process. When creating a new corpus, you have the option to assign a customcorpus_keyfollowing your preferred naming convention. This key serves as a unique identifier for the corpus, allowing it to be referenced in search requests. - Enter the search
querystring for the corpus, which is the question you want to ask. - Set the maximum number of results (
limit) to return. Default: 10, minimum: 1
Request
Responses
- 200
- 400
- 403
- 404
A response to a query.
Query request was malformed.
Permissions do not allow querying the corpus.
Corpus not found.