← All notes

Using the Dataset Viewer API

Summary

The dataset viewer is a REST API at https://datasets-server.huggingface.co. It checks a Hub dataset, lists splits, pages through rows, searches and filters text, and returns Parquet URLs, size, statistics, and Croissant metadata. Nothing has to be installed.

Calls

Every example is an HTTP GET. A public dataset needs only its name. An account is optional, but gated datasets (the page names CommonVoice and ImageNet) need the user token from your settings, sent as a Bearer token. Private datasets need the same header. They are supported when a PRO user or an Enterprise Hub organization owns them. Without a token, a private or gated name returns an error that the dataset does not exist or is not accessible without authentication.

dataset is the dataset name on each of these GET routes:

The viewer converts every Hub dataset to Parquet.

Row slices

/rows reads a window of a split without downloading the dataset, but only when Parquet exports already exist. Parameters are dataset, config, split, offset, and length (maximum 100). The JSON lists column features and rows. partial: true means the dataset was too big to slice in full.

Image and audio cells are URLs. An image has src (a signed URL that expires), height, and width. If a cached file is gone, call /rows again. Cell text is not truncated, and truncated_cells stays empty.

Claims

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Hugging Face, Quickstart, Apache-2.0 (huggingface/dataset-viewer docs); Hugging Face, Download slices of rows, Apache-2.0 (huggingface/dataset-viewer docs).

Cite this

Permanent ID: iil:note:sf4ds1c1

iinventedlight. 2026. "Using the Dataset Viewer API." iinventedlight Library, iil:note:sf4ds1c1, version of 2026-11-03. https://iinventedlight.com/library/notes/hf-dataset-viewer-api/. License: CC-BY-4.0.

@misc{iil_note_sf4ds1c1,
  author = {{iinventedlight}},
  title = {{Using the Dataset Viewer API}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-03},
  url = {https://iinventedlight.com/library/notes/hf-dataset-viewer-api/},
  note = {Permanent ID iil:note:sf4ds1c1. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com.

For language models and agents: start at /llms.txt. This page in Markdown: /library/notes/hf-dataset-viewer-api.md.