---
title: "List corpora"
method: GET
path: "/v2/corpora"
tags: ["Corpora"]
---

# List corpora

`GET /v2/corpora`

Lists the corpora in your account. Results are paginated. Each corpus object contains basic information about the corpus. These objects contain less detail than the corpus returned by the Get Corpus API.

Optional parameters control the pagination and filtering of the results. The limit parameter sets the maximum number of corpora to return. It defaults to 10 and has a maximum value of 100.

## Query parameters

- `limit` integer
- `filter` string
- `corpus_id` string[]
- `page_key` string

## Headers

- `Request-Timeout` integer
- `Request-Timeout-Millis` integer

## Response `200`

The response includes an array of matching `corpora` objects and pagination `metadata`.

- ListCorporaResponse — Response containing a list of corpora within a customer account.
  - `corpora` Corpus[]
    - `id` string, required — Vectara ID of the corpus.
    - `key` string, required — A user-provided key for a corpus.
    - `name` string, required — Name for the corpus. This value defaults to the key.
    - `description` string — Corpus description.
    - `enabled` boolean — Specifies whether the corpus is enabled or not.
    - `chat_history_corpus` boolean — Indicates that this corpus does not store documents and stores chats instead.
    - `queries_are_answers` boolean — Queries made to this corpus are considered answers, and not questions. This swaps the semantics of the encoder used at query time.
    - `documents_are_questions` boolean — Documents inside this corpus are considered questions, and not answers. This swaps the semantics of the encoder used at indexing.
    - `encoder_id` string — The encoder used by the corpus. *Deprecated*: Use `encoder_name` instead
    - `encoder_name` string — The encoder used by the corpus, `boomerang-2023-q3`.
    - `save_history` boolean — Indicates whether to save corpus queries to query history by default.
    - `filter_attributes` FilterAttribute[] — The filter attributes of the corpus.
      - `name` string, required — The JSON path of the filter attribute in a document or document part metadata.
      - `level` 'document' | 'part', required — Indicates whether this is a document or document part metadata filter.
      - `description` string — A description of the filter. This property can be omitted.
      - `indexed` boolean — Whether to create an index for the filter. An index improves query latency for queries that use the filter.
      - `type` 'integer' | 'real_number' | 'text' | 'boolean' | 'list[integer]' | 'list[real_number]' | 'list[text]', required — The value type of the filter.
    - `custom_dimensions` CorpusCustomDimension[] — The custom dimensions of all document parts inside the corpus.
      - `name` string, required — The name of the custom dimension.
      - `description` string — Description of the custom dimension.
      - `indexing_default` number, double — The default value of a custom dimension on a document part. This value applies when the custom dimension value is not specified at indexing time. A value of 0 means that the custom dimension is not considered.
      - `querying_default` number, double — The default value of a custom dimension for a query. This value applies when the custom dimension value is not specified in the query. A value of 0 means that the custom dimension is not considered.
    - `limits` object
      - `used_docs` integer — The number of documents contained in the corpus.
      - `used_parts` integer — The number of document parts contained in the corpus.
      - `used_bytes` integer — NOTE: This field is currently not populated by the platform. The number of bytes contained in the corpus. This includes the document metadata, document part metadata, and document contents.
      - `used_characters` integer — The number of characters contained in the corpus. This includes the document metadata, document part metadata, and document contents.
      - `max_bytes` integer — NOTE: This field is currently not populated by the platform. The maximum number of bytes the corpus can be.
      - `max_metadata_bytes` integer — The maximum size that metadata can be on documents.
      - `index_rate` integer — NOTE: This field is currently not populated by the platform. The maximum per-second addition of new documents to corpus.
    - `created_at` string, date-time — Indicates when the corpus was created.
  - `metadata` ListMetadata — The standard metadata in the response of a list operation.
    - `page_key` string — The page key for the next page of results. Pass it as a query parameter to request the next page.

## Other responses

- `403` — Permissions do not allow listing corpora.

---

[API](https://skmtc.net/vectara/apis/vectara-rest-api-v2.md) · [All operations](https://skmtc.net/vectara/apis/vectara-rest-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vectara/vectara-rest-api-v2/revisions/a95087fe3a20/schema)
