Hugging Face

Search Hugging Face collections

Search Hugging Face collections, or find the collections that contain a model, dataset, Space or paper.

GET/v1/hugging-face/collections
1credit
x-api-keystringheader

API key (`sfk_...`)

Parameters
6
querystringquery

Search text in titles and descriptions.

min 1 chars · max 200 chars

ownerstringquery

Only collections this account curates.

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

itemstringquery

Only collections that contain this item, e.g. `models/openai-community/gpt2` or `papers/1706.03762`.

pattern: ^(?:models|datasets|spaces)\/[A-Za-z0-9][A-Za-z0-9._-]{0,95}\/[A-Za-z0-9][A-Za-z0-9._-]{0,95}$|^papers\/[A-Za-z0-9./-]{1,40}$

sortstringquery

`trending` (default), `upvotes` or `lastModified`.

one of: trending, upvotes, lastModified

limitintegerquery

Items per page, 1-100. A page can hold fewer. Default: 10.

≥ 1 · ≤ 100

cursorstringquery

Pass `page.nextCursor` from the previous response to get the next page. Keep every other parameter the same.

min 1 chars · max 1024 chars

Response fields
61

Endpoint-specific response payload.

datalookupStatus
string

Whether the item was found.

one of: found, not_found

Collections on this page.

datacollections[]slug
string

Collection slug, `owner/title-id`.

datacollections[]url
string

Collection page URL.

datacollections[]title
string

Title.

datacollections[]description
stringnullable

Description.

Who curates the collection.

datacollections[]ownerusername
string

Account name, the part of the profile URL after the domain.

datacollections[]owneruid
stringnullable

Stable account id.

datacollections[]ownerdisplayName
stringnullable

Display name.

datacollections[]owneravatarUrl
stringnullable

Avatar image URL.

datacollections[]ownerurl
string

Profile page URL.

datacollections[]ownertype
stringnullable

Whether the account is a user or an organization.

one of: user, org, null

datacollections[]ownerisPro
booleannullable

Whether the account has a Pro subscription.

datacollections[]ownerisStaff
booleannullable

Whether the account belongs to the platform's staff, when the response includes it.

datacollections[]ownerfollowerCount
integernullable

Followers, when the response includes it.

datacollections[]upvotes
integernullable

Upvotes.

datacollections[]lastUpdatedAt
stringnullable

When the collection last changed (ISO-8601).

datacollections[]gated
booleannullable

Whether the collection is gated.

datacollections[]theme
stringnullable

Colour theme of the collection.

datacollections[]itemCount
integernullable

Items in the collection. Lists carry a preview of up to 4 `items` and no total, so `itemCount` is null there; the detail route returns every item and the count.

The first items of the collection.

datacollections[]items[]type
string

Item kind: `model`, `dataset`, `space`, `paper` or `collection`.

datacollections[]items[]id
string

Item id: a repository id, a paper id or a collection slug.

datacollections[]items[]url
string

Item page URL.

datacollections[]items[]note
stringnullable

The curator's note on the item.

datacollections[]items[]position
integernullable

Position in the collection, from 0.

datacollections[]items[]title
stringnullable

Title of a paper or collection.

Repository details when the item is a model, dataset or Space.

datacollections[]items[]repoid
string

Repository id, `owner/name`.

datacollections[]items[]repotype
string

Repository type.

one of: model, dataset, space

datacollections[]items[]repouid
stringnullable

Stable repository id; survives renames.

datacollections[]items[]repourl
string

Repository page URL.

datacollections[]items[]repoauthor
stringnullable

Owner account name.

datacollections[]items[]repocreatedAt
stringnullable

When the repository was created (ISO-8601).

datacollections[]items[]repolastModified
stringnullable

When the repository last changed (ISO-8601).

datacollections[]items[]reposha
stringnullable

Latest commit on the default branch.

datacollections[]items[]repolikes
integernullable

Likes.

datacollections[]items[]repodownloads
integernullable

Downloads in the last 30 days.

datacollections[]items[]repodownloadsAllTime
integernullable

Downloads since the repository was created.

datacollections[]items[]repotrendingScore
numbernullable

Trending score.

datacollections[]items[]repogated

Whether access needs approval: `false`, `auto` (accepted on request) or `manual` (reviewed by the owner).

datacollections[]items[]repodisabled
booleannullable

Whether the repository has been disabled.

Tags: task, library, languages, licence and more. Null when the collection item does not carry them.

datacollections[]items[]repotags[]
stringoptional
datacollections[]items[]repopipelineTag
stringnullable

Main task of a model, e.g. `text-generation`; null in dataset and Space results.

datacollections[]items[]repolibrary
stringnullable

Library a model is made for, e.g. `transformers`; null in dataset and Space results.

datacollections[]items[]repolicense
stringnullable

Licence id taken from the tags, e.g. `mit`.

datacollections[]items[]reposdk
stringnullable

SDK of a Space, e.g. `gradio`; null in model and dataset results.

datacollections[]items[]repoparameters
integernullable

Parameter count of a model, when known; null in dataset and Space results.

datacollections[]items[]repospaceStage
stringnullable

Run state of a Space, e.g. `RUNNING` or `SLEEPING`; null in model and dataset results.

datacollections[]items[]upvotes
integernullable

Upvotes on a paper or collection.

datacollections[]items[]publishedAt
stringnullable

When a paper was published (ISO-8601).

Pagination state for the current page.

datapagehasMore
boolean

Whether another page is available.

datapagenextCursor
stringnullable

Cursor to pass in the next request when more pages exist; null on the last page.

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/collections?query=gemma&limit=3" \
  -H "x-api-key: YOUR_API_KEY"

Responses

Collection page.