Query a corpus with query parameters
GET/v2/corpora/:corpus_key/query
Queries a single corpus with a simple request. The Query APIs support Retrieval Augmented Generation (RAG). They search your data and generate AI-powered summaries.
The platform provides three query types:
- Single corpus query: A simple search within a single corpus.
- Advanced single corpus query: Full search and RAG within one corpus. Supports table summarization, metadata filtering, and reranking.
- Multiple corpora query: A search across one or more corpora with full RAG capabilities.
Set these parameters:
corpus_key: The unique key of the corpus to query. You create the key in the Vectara Console or the Create Corpus API. You can assign a customcorpus_keythat follows your preferred naming convention. Search requests reference the corpus by this key.query: The search query string, which is the question you want to ask.limit: The maximum number of results 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.