---
title: "Preview the contents of a dataset."
method: GET
path: "/data/preview"
tags: ["datasets"]
---

# Preview the contents of a dataset.

`GET /data/preview`

## Query parameters

- `dataset_id` string, required — The ID of the dataset to preview. This can be a HuggingFace dataset ID or a local dataset ID.
- `offset` integer — The starting index from where to fetch the data.
- `split` string — The split to preview. This can be train, test, or validation.
- `limit` integer — The maximum number of data items to fetch.
- `streaming` boolean

## Response `200`

Successful response. Data is a list of column names followed by data, which can be of any datatype.

- SuccessResponse
  - `status` string, required
  - `data` object, required

## Other responses

- `400` — Bad Request
- `422` — Validation Error

---

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