Hugging Face

Search Hugging Face models

Search and filter Hugging Face models by task, library, language, licence, base model and more.

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

API key (`sfk_...`)

Parameters
17
querystringquery

Search text. Matches repository ids, tags and card text.

min 1 chars · max 200 chars

authorstringquery

Only repositories owned by this user or organization.

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

pipelineTagstringquery

Task, e.g. `text-generation` or `text-to-image`. List them with the tags endpoint.

pattern: ^[a-z0-9-]{1,60}$

librarystringquery

Library tag, e.g. `transformers`, `diffusers` or `gguf`.

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

languagestringquery

Language code tag, e.g. `en` or `ja`.

pattern: ^[A-Za-z0-9_-]{1,20}$

licensestringquery

Licence id, e.g. `apache-2.0` or `mit`.

pattern: ^[A-Za-z0-9_.+-]{1,60}$

tagsstringquery

Comma-separated tags the repository must all have, e.g. `text-classification,pytorch` or `license:mit`.

min 1 chars · max 400 chars · pattern: ^[A-Za-z0-9_.:/+-]+(,[A-Za-z0-9_.:/+-]+)*$

baseModelstringquery

Only models built from this base model. Use with `relation`.

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

relationstringquery

How the models relate to `baseModel`: `finetune`, `adapter`, `merge` or `quantized`.

one of: finetune, adapter, merge, quantized

gatedstringquery

`true` for gated models only, `false` to hide them.

one of: true, false

inferenceProviderstringquery

Only models a hosted inference provider serves: a provider id, or `all` for any provider.

pattern: ^[a-z0-9-]{1,40}$

minParametersstringquery

Smallest parameter count, e.g. `500M` or `7B`.

pattern: ^\d+(?:\.\d+)?[KMBTkmbt]?$

maxParametersstringquery

Largest parameter count, e.g. `500M` or `7B`.

pattern: ^\d+(?:\.\d+)?[KMBTkmbt]?$

sortstringquery

Sort order: `downloads` (last 30 days), `likes`, `likes7d`, `likes30d`, `trending`, `created` or `updated`. Default: `trending`.

one of: downloads, likes, likes7d, likes30d, trending, created, updated

orderstringquery

`desc` (default) or `asc`. `asc` only works with `sort=created`.

one of: asc, desc

limitintegerquery

Items per page, 1-1000. A page can hold fewer. Default: 50.

≥ 1 · ≤ 1000

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
32

Endpoint-specific response payload.

datalookupStatus
string

Whether the item was found.

one of: found, not_found

Repositories on this page.

dataresults[]id
string

Repository id, `owner/name`.

dataresults[]type
string

Repository type.

one of: model, dataset, space

dataresults[]uid
stringnullable

Stable repository id; survives renames.

dataresults[]url
string

Repository page URL.

dataresults[]author
stringnullable

Owner account name.

dataresults[]createdAt
stringnullable

When the repository was created (ISO-8601).

dataresults[]lastModified
stringnullable

When the repository last changed (ISO-8601).

dataresults[]sha
stringnullable

Latest commit on the default branch.

dataresults[]likes
integernullable

Likes.

dataresults[]downloads
integernullable

Downloads in the last 30 days.

dataresults[]downloadsAllTime
integernullable

Downloads since the repository was created.

dataresults[]trendingScore
numbernullable

Trending score.

dataresults[]gated

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

dataresults[]disabled
booleannullable

Whether the repository has been disabled.

Tags: task, library, languages, licence and more.

dataresults[]tags[]
stringoptional
dataresults[]pipelineTag
stringnullable

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

dataresults[]library
stringnullable

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

dataresults[]license
stringnullable

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

dataresults[]sdk
stringnullable

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

dataresults[]parameters
integernullable

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

dataresults[]spaceStage
stringnullable

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

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/models?query=bert&limit=5" \
  -H "x-api-key: YOUR_API_KEY"

Responses

Model search page.