Hugging Face model search

GET https://api.api.sh/huggingface/v1/models
1 credit / call reference try it in the playground →

Models on the Hugging Face Hub matching a search and any Hub filter: id, link, author, likes, trending score, downloads in the last month, task (pipeline tag), library, inference status, licenses, languages, base models, training datasets, arXiv ids, tags, gated flag and dates. Filter by parameter count with min_params/max_params. Pass next_cursor back as cursor; null on the last page.

Every response includes credits_used: the credits this call cost.

Parameters

nametypedescription
q string Words in the model id, e.g. llama, whisper. Example: llama
author string Only models of this user or organization, e.g. meta-llama.
task string Pipeline tag, e.g. text-generation, text-to-image, automatic-speech-recognition, feature-extraction. Also accepted as pipeline_tag. Example: text-generation
library string Library, e.g. transformers, diffusers, gguf, mlx, sentence-transformers.
language string Language codes, comma-separated, e.g. en,fr.
license string License ids, comma-separated, e.g. apache-2.0, mit.
dataset string Trained on this dataset id, e.g. HuggingFaceFW/fineweb.
base_model string Derived from this model id (fine-tunes, quantizations, adapters).
min_params string Only models with at least this many parameters, e.g. 1B, 500M, 7.5B.
max_params string Only models with at most this many parameters, e.g. 3B, 70B.
tags string Any other Hub tags, comma-separated, e.g. gguf,conversational.
inference warm
provider string Only models served by this inference provider, e.g. together, groq.
gated true | false true or false: only gated or only open models.
sort trending | downloads | likes | created | modified Order: trending (default), downloads, likes, created or modified (newest first). Example: downloads
limit integer Results per page (default 20, max 100). Example: 20
cursor string next_cursor from the previous page; null on the last page.

Every endpoint also takes fresh, raw, fields (see lean responses and caching).

Example

curl "https://api.api.sh/huggingface/v1/models?q=llama" \
  -H "x-api-key: $APISH_KEY"

Response

A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).

The fastest way to see the full response is the playground: it runs this endpoint with your account and shows the exact JSON.