Hugging Face hub

Hugging Face Dataset Statistics API

Per-column statistics for one split, with the type of each statistic and how many rows were counted.

GET /v1/hugging-face/datasets/{owner}/{name}/statistics

1 credit Failed requests are free

About this endpoint

GET /v1/hugging-face/datasets/{owner}/{name}/statistics returns available, config, split, numExamples, isPartial and columns. When statistics exist, each column has name, type (int, float, string_label, string_text, class_label, bool and more) and statistics.

The shape of statistics depends on the type: counts, minimum, maximum and mean for numbers, histogram or label frequencies for categorical data, and text summaries for free text. Choose config and split from the row facts endpoint; a name the dataset does not have is refused with a 400. available: false means the platform did not compute statistics for that split.

Hugging Face Dataset Statistics API FAQ

Why is available false?

The platform did not compute statistics for this split. That is a final answer, not a missing page, and columns is empty.

What does numExamples count?

The rows that were counted. isPartial tells you when only part of the split was counted.

How do I get statistics for another split?

Pass config and split from the row facts endpoint. Without them the dataset's first subset and split are used.

How much does a statistics lookup cost?

Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged: that field is the billing source of truth.