Hugging Face Dataset Info API

Dataset validity and structure endpoints

Operations 2

GET /is-valid Check Dataset Validity #
GET /splits Get Dataset Splits #

Documentation

Specifications

SDKs

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/hugging-face-dataset-info-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

hugging-face-dataset-info-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Hugging Face Dataset Viewer Dataset Info API
  description: Query and visualize datasets stored on the Hugging Face Hub through a lightweight REST API. Get dataset splits, preview rows, search and filter data, access Parquet files, retrieve size statistics, and obtain Croissant metadata - all without downloading the entire dataset.
  version: 1.0.0
  termsOfService: https://huggingface.co/terms-of-service
  contact:
    name: Hugging Face Support
    url: https://huggingface.co/support
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: https://datasets-server.huggingface.co
  description: Hugging Face Dataset Viewer production server
security:
- {}
- bearerAuth: []
tags:
- name: Dataset Info
  description: Dataset validity and structure endpoints
paths:
  /is-valid:
    get:
      summary: Check Dataset Validity
      description: Check whether a specific dataset is valid and processed by the Dataset Viewer. Returns availability status for preview, viewer, search, filter, and statistics features.
      operationId: isValid
      tags:
      - Dataset Info
      parameters:
      - name: dataset
        in: query
        required: true
        description: The dataset ID on the Hugging Face Hub
        schema:
          type: string
        example: cornell-movie-review-data/rotten_tomatoes
      responses:
        '200':
          description: Dataset validity status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidityResponse'
              examples:
                Isvalid200Example:
                  summary: Default isValid 200 response
                  x-microcks-default: true
                  value:
                    preview: true
                    viewer: true
                    search: true
                    filter: true
                    statistics: true
        '404':
          description: Dataset not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Isvalid404Example:
                  summary: Default isValid 404 response
                  x-microcks-default: true
                  value:
                    error: example_value
                    cause_exception: example_value
                    cause_message: example_value
                    cause_traceback:
                    - example_value
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Isvalid500Example:
                  summary: Default isValid 500 response
                  x-microcks-default: true
                  value:
                    error: example_value
                    cause_exception: example_value
                    cause_message: example_value
                    cause_traceback:
                    - example_value
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /splits:
    get:
      summary: Get Dataset Splits
      description: Get the list of subsets (configurations) and splits for a dataset. A dataset can have multiple subsets, each with different splits (e.g., train, test, validation).
      operationId: getSplits
      tags:
      - Dataset Info
      parameters:
      - name: dataset
        in: query
        required: true
        description: The dataset ID on the Hugging Face Hub
        schema:
          type: string
        example: squad
      responses:
        '200':
          description: List of subsets and splits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SplitsResponse'
              examples:
                Getsplits200Example:
                  summary: Default getSplits 200 response
                  x-microcks-default: true
                  value:
                    splits:
                    - dataset: example_value
                      config: example_value
                      split: example_value
                    pending:
                    - {}
                    failed:
                    - {}
        '404':
          description: Dataset not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Getsplits404Example:
                  summary: Default getSplits 404 response
                  x-microcks-default: true
                  value:
                    error: example_value
                    cause_exception: example_value
                    cause_message: example_value
                    cause_traceback:
                    - example_value
        '500':
          description: Processing error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Getsplits500Example:
                  summary: Default getSplits 500 response
                  x-microcks-default: true
                  value:
                    error: example_value
                    cause_exception: example_value
                    cause_message: example_value
                    cause_traceback:
                    - example_value
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
          example: example_value
        cause_exception:
          type: string
          description: Underlying exception type
          example: example_value
        cause_message:
          type: string
          description: Underlying exception message
          example: example_value
        cause_traceback:
          type: array
          items:
            type: string
          description: Stack trace (only in development)
          example: []
    SplitsResponse:
      type: object
      properties:
        splits:
          type: array
          items:
            type: object
            properties:
              dataset:
                type: string
                description: Dataset ID
              config:
                type: string
                description: Subset (configuration) name
              split:
                type: string
                description: Split name
                example: train
          example: []
        pending:
          type: array
          items:
            type: object
          example: []
        failed:
          type: array
          items:
            type: object
          example: []
    ValidityResponse:
      type: object
      properties:
        preview:
          type: boolean
          description: Whether preview (first rows) is available
          example: true
        viewer:
          type: boolean
          description: Whether the full viewer is available
          example: true
        search:
          type: boolean
          description: Whether full-text search is available
          example: true
        filter:
          type: boolean
          description: Whether filtering is available
          example: true
        statistics:
          type: boolean
          description: Whether statistics are available
          example: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: HF Token
      description: Optional Hugging Face API token. Required for private and gated datasets.