Hugging Face Datasets API
Find datasets by keyword, author, language, licence or tags, with download counts and card metadata on every row.
GET /v1/hugging-face/datasets1 credit Failed requests are free
About this endpoint
GET /v1/hugging-face/datasets returns a page of datasets in results. Filter with query, author, language, license, tags and gated, then sort by downloads, likes, likes7d, likes30d, trending, created or updated.
Each row carries id, url, author, likes, downloads, downloadsAllTime, trendingScore, gated, tags, license and the card metadata the list exposes. sort=likes30d needs query or author, because the platform cannot sort the whole dataset list that way. Page with page.nextCursor while page.hasMore is true.
Hugging Face Datasets API FAQ
Why is sort=likes30d refused without a query or author?
The platform times out when it sorts the entire dataset list by 30-day likes. The request is refused with a 400 instead of waiting for that timeout.
Can I filter datasets by language?
Yes, language takes a code such as en. tags takes a comma-separated list that must all match, for example task_categories:text-classification.
How many results fit on a page?
limit accepts 1 to 1000 and defaults to 50. page.nextCursor carries the rest.
Does a search return datasets with no public files?
Yes. The list is about the dataset record, not whether its rows can be previewed. Use the rows endpoint to check that.
How much does a dataset search 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. Each paginated page is a separate billed request.
Other Hugging Face endpoints
- Search modelsGET /v1/hugging-face/models
- Get modelGET /v1/hugging-face/models/{owner}/{name}
- Get datasetGET /v1/hugging-face/datasets/{owner}/{name}
- Search SpacesGET /v1/hugging-face/spaces
- Get SpaceGET /v1/hugging-face/spaces/{owner}/{name}
- READMEGET /v1/hugging-face/repos/{repoType}/{owner}/{name}/readme
- FilesGET /v1/hugging-face/repos/{repoType}/{owner}/{name}/files
- CommitsGET /v1/hugging-face/repos/{repoType}/{owner}/{name}/commits