---
title: "List Datasets"
method: GET
path: "/v1/datasets"
tags: ["datasets"]
---

# List Datasets

`GET /v1/datasets`

## Request

- Base URL: `https://api.cohere.com`
- URL: `https://api.cohere.com/v1/datasets`
- Auth: HTTP bearer

List datasets that have been created.

## Query parameters

- `datasetType` string
- `before` string, date-time
- `after` string, date-time
- `limit` number, double
- `offset` number, double
- `validationStatus` 'unknown' | 'queued' | 'processing' | 'failed' | 'validated' | 'skipped': The validation status of the dataset

## Headers

- `X-Client-Name` string

## Response `200`

A successful response.

- DatasetsListResponse200
  - `datasets` Dataset[]
    - `id` string, required: The dataset ID
    - `name` string, required: The name of the dataset
    - `created_at` string, date-time, required: The creation date
    - `updated_at` string, date-time, required: The last update date
    - `dataset_type` 'embed-input' | 'embed-result' | 'cluster-result' | 'cluster-outliers' | 'reranker-finetune-input' | 'single-label-classification-finetune-input' | 'chat-finetune-input' | 'multi-label-classification-finetune-input' | 'batch-chat-input' | 'batch-openai-chat-input' | 'batch-embed-v2-input' | 'batch-chat-v2-input', required: The type of the dataset
    - `validation_status` 'unknown' | 'queued' | 'processing' | 'failed' | 'validated' | 'skipped', required: The validation status of the dataset
    - `validation_error` string: Errors found during validation
    - `schema` string: the avro schema of the dataset
    - `required_fields` string[]
    - `preserve_fields` string[]
    - `dataset_parts` DatasetPart[]: the underlying files that make up the dataset
      - `id` string, required: The dataset part ID
      - `name` string, required: The name of the dataset part
      - `url` string: The download url of the file
      - `index` integer: The index of the file
      - `size_bytes` integer: The size of the file in bytes
      - `num_rows` integer: The number of rows in the file
      - `original_url` string: The download url of the original file
      - `samples` string[]: The first few rows of the parsed file
    - `validation_warnings` string[]: warnings found during validation
    - `parse_info` ParseInfo
      - `separator` string
      - `delimiter` string
    - `metrics` Metrics
      - `finetune_dataset_metrics` FinetuneDatasetMetrics
        - `trainable_token_count` integer: The number of tokens of valid examples that can be used for training.
        - `total_examples` integer: The overall number of examples.
        - `train_examples` integer: The number of training examples.
        - `train_size_bytes` integer: The size in bytes of all training examples.
        - `eval_examples` integer: Number of evaluation examples.
        - `eval_size_bytes` integer: The size in bytes of all eval examples.
        - `reranker_data_metrics` RerankerDataMetrics
          - `num_train_queries` integer: The number of training queries.
          - `num_train_relevant_passages` integer: The sum of all relevant passages of valid training examples.
          - `num_train_hard_negatives` integer: The sum of all hard negatives of valid training examples.
          - `num_eval_queries` integer: The number of evaluation queries.
          - `num_eval_relevant_passages` integer: The sum of all relevant passages of valid eval examples.
          - `num_eval_hard_negatives` integer: The sum of all hard negatives of valid eval examples.
        - `chat_data_metrics` ChatDataMetrics
          - `num_train_turns` integer: The sum of all turns of valid train examples.
          - `num_eval_turns` integer: The sum of all turns of valid eval examples.
          - `preamble` string: The preamble of this dataset.
        - `classify_data_metrics` ClassifyDataMetrics
          - `label_metrics` LabelMetric[]
            - `total_examples` integer: Total number of examples for this label
            - `label` string: value of the label
            - `samples` string[]: samples for this label

## Other responses

- `400`: This error is returned when the request is not well formed. This could be because: - JSON is invalid - The request is missing required fields - The request contains an invalid combination of fields
- `401`: This error indicates that the operation attempted to be performed is not allowed. This could be because: - The api token is invalid - The user does not have the necessary permissions
- `403`: This error indicates that the operation attempted to be performed is not allowed. This could be because: - The api token is invalid - The user does not have the necessary permissions
- `404`: This error is returned when a resource is not found. This could be because: - The endpoint does not exist - The resource does not exist eg model id, dataset id
- `422`: This error is returned when the request is not well formed. This could be because: - JSON is invalid - The request is missing required fields - The request contains an invalid combination of fields
- `429`: Too many requests
- `498`: This error is returned when a request or response contains a deny-listed token.
- `499`: This error is returned when a request is cancelled by the user.
- `500`: This error is returned when an uncategorised internal server error occurs.
- `501`: This error is returned when the requested feature is not implemented.
- `503`: This error is returned when the service is unavailable. This could be due to: - Too many users trying to access the service at the same time
- `504`: This error is returned when a request to the server times out. This could be due to: - An internal services taking too long to respond

---

[API](https://skmtc.dev/cohere-ai/apis/cohere-api.md) · [All operations](https://skmtc.dev/cohere-ai/apis/cohere-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cohere-ai/apis/cohere-api/revisions/8e538a293bd3?raw)
