Hugging Face hub

Hugging Face Collections API

Curated lists of models, datasets, Spaces and papers, with the first items and the curator.

GET /v1/hugging-face/collections

1 credit Failed requests are free

About this endpoint

GET /v1/hugging-face/collections returns a page of collections and a page block. Use query, owner, item (for example models/openai-community/gpt2 or papers/1706.03762), sort (trending, upvotes, lastModified), limit and cursor.

Each collection has slug, url, title, description, owner, upvotes, lastUpdatedAt, gated, theme, itemCount and items, the first items with their type, id, note, position, title and repository summary. This list carries a preview of up to 4 items and no total, so itemCount is null here; the single collection endpoint returns every item and the count. Follow page.nextCursor for more collections.

Hugging Face Collections API FAQ

How do I find collections that contain one model?

Pass item=models/owner/name. For a paper use item=papers/arxivId. The value must name the kind and the id.

Are all items returned here?

No. This endpoint returns the first items of each collection. The collection endpoint returns every item in order.

What can I sort by?

trending (default), upvotes or lastModified.

How much does a collection 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.