Hugging Face

Get Hugging Face dataset viewer

Get what a Hugging Face dataset viewer can show.

GET/v1/hugging-face/datasets/{owner}/{name}/viewer
1credit
x-api-keystringheader

API key (`sfk_...`)

Parameters
2
ownerstringrequiredpath

Owner of the repository: a user or organization name.

pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,95}$

namestringrequiredpath

Repository name, without the owner.

pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,95}$

Response fields
33

Endpoint-specific response payload.

datalookupStatus
string

Whether the item was found. `restricted` means it exists but its content is gated.

one of: found, not_found, restricted

Row viewer facts when found; otherwise null.

dataviewerstatus
string

`available` when Hugging Face can show the dataset's rows; `unavailable` when it cannot.

one of: available, unavailable

dataviewerreason
stringnullable

Why no rows are shown: `disabled` (the owner switched it off), `no_data_files`, `empty`, `unsupported_format`, `too_large`, `failed`, or `split_not_found` when a default lookup finds no split in the dataset. Null when rows are available. A `config` or `split` you name that the dataset does not have is refused with a 400.

one of: disabled, no_data_files, empty, unsupported_format, too_large, failed, split_not_found, null

dataviewerisPartial
booleannullable

Whether the figures cover only part of a very large dataset.

Which row features the dataset supports.

dataviewersupportspreview
booleannullable

First rows can be previewed.

dataviewersupportsviewer
booleannullable

Rows can be paged through.

dataviewersupportssearch
booleannullable

Rows can be searched.

dataviewersupportsfilter
booleannullable

Rows can be filtered.

dataviewersupportsstatistics
booleannullable

Column statistics are available.

dataviewertotalRows
integernullable

Rows across every subset and split.

dataviewerparquetBytes
integernullable

Size of the dataset's Parquet files in bytes.

Subsets of the dataset.

dataviewerconfigs[]name
string

Subset (config) name.

dataviewerconfigs[]numRows
integernullable

Rows in the subset.

dataviewerconfigs[]numColumns
integernullable

Columns in the subset.

dataviewerconfigs[]license
stringnullable

Licence the dataset script declares.

dataviewerconfigs[]homepage
stringnullable

Homepage the dataset script declares.

Columns of the subset.

dataviewerconfigs[]features[]name
string

Column name.

dataviewerconfigs[]features[]type
string

Column type, e.g. `string`, `int64`, `ClassLabel`, `Image`.

Class names of a ClassLabel column.

dataviewerconfigs[]features[]classNames[]
stringoptional

Splits of the subset.

dataviewerconfigs[]splits[]name
string

Split name.

dataviewerconfigs[]splits[]numRows
integernullable

Rows in the split.

dataviewerconfigs[]splits[]numBytes
integernullable

Size of the split in memory, in bytes.

Metadata describing the request and billing outcome.

metarequestId
string

Unique request identifier for tracing this API call.

min 1 chars

metacreditsCharged
integer

Credits charged for this request.

≥ 0

metaversion
string

Public API version that served the response.

one of: v1

Code example

curl "https://api.socialfetch.dev/v1/hugging-face/datasets/stanfordnlp/imdb/viewer" \
  -H "x-api-key: YOUR_API_KEY"

Responses

Dataset row viewer facts.