Skip to main content
POST
/
api
/
huggingface
/
models
/
search
/huggingface/models/search
curl --request POST \
  --url https://api.anysite.io/api/huggingface/models/search \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "count": 2,
  "timeout": 300,
  "search": "llama",
  "author": "meta-llama",
  "filter": [
    "text-generation",
    "transformers"
  ],
  "direction": 0,
  "full": false
}
'
[
  {
    "id": "<string>",
    "url": "<string>",
    "@type": "@huggingface_model",
    "author": "<string>",
    "sha": "<string>",
    "download_count": 123,
    "like_count": 123,
    "trending_score": 123,
    "pipeline_tag": "<string>",
    "library_name": "<string>",
    "tags": [],
    "gated": true,
    "is_private": false,
    "is_disabled": false,
    "mask_token": "<string>",
    "created_at": "<string>",
    "last_modified": "<string>",
    "used_storage": 123,
    "card_data": {},
    "config": {},
    "transformers_info": {},
    "model_index": [
      "<unknown>"
    ],
    "safetensors": {},
    "widget_data": [
      "<unknown>"
    ],
    "siblings": [],
    "spaces": []
  }
]

Authorizations

access-token
string
header
required

API token from the dashboard

Headers

access-token
string
required

Body

application/json
count
integer
required

Max result count

Required range: x >= 1
timeout
integer
default:300

Max scrapping execution timeout (in seconds)

Required range: 20 <= x <= 1500
search
string | null

Free-text search keyword

Example:

"llama"

author
string | null

Filter by author (org or user)

Example:

"meta-llama"

filter
string[] | null

Tag filters (repeatable): pipeline tag, library, language, license, etc.

Example:
["text-generation", "transformers"]
sort
enum<string> | null

Sort field

Available options:
downloads,
likes,
lastModified,
createdAt,
trendingScore
direction
integer | null

Sort direction: -1 descending, 1 ascending

Required range: -1 <= x <= 1
full
boolean
default:false

Include files and card data in each result

Response

Successful Response

id
string
required
url
string
required
@type
string
default:@huggingface_model
author
string | null
sha
string | null
download_count
integer | null
like_count
integer | null
pipeline_tag
string | null
library_name
string | null
tags
string[]
gated
is_private
boolean
default:false
is_disabled
boolean
default:false
mask_token
string | null
created_at
string | null
last_modified
string | null
used_storage
integer | null
card_data
Card Data · object
config
Config · object
transformers_info
Transformers Info · object
model_index
any[] | null
safetensors
Safetensors · object
widget_data
any[] | null
siblings
HuggingfaceModelFile · object[]
spaces
string[]