Hugging Face Collection API
One curated list with every item in order, including the curator's notes and each item's position.
GET /v1/hugging-face/collections/{owner}/{slug}1 credit Failed requests are free
About this endpoint
GET /v1/hugging-face/collections/{owner}/{slug} returns collection with slug, url, title, description, owner, upvotes, lastUpdatedAt, gated, theme, itemCount and items. Unlike the search endpoint, items is the whole collection in order.
Each item has type (model, dataset, space, paper or collection), id, url, note, position, title, repo, upvotes and publishedAt where they apply. slug is the part after the owner, for example gemma-4-69ce8ad93186d46744cb42f1.
Hugging Face Collection API FAQ
How do I get the collection slug?
The collection's URL ends in owner/slug. This endpoint takes the owner and the slug separately, without the owner prefix in slug.
What are notes and positions?
note is the curator's comment on an item, and position is its zero-based place in the list.
Can a collection contain another collection?
Yes. An item with type collection points at another collection slug.
How much does a collection 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.
Other Hugging Face endpoints
- Search modelsGET /v1/hugging-face/models
- Get modelGET /v1/hugging-face/models/{owner}/{name}
- Search datasetsGET /v1/hugging-face/datasets
- 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