Better Fetch

Hugging Face Models Scraper

Search public Hugging Face Hub models or fetch one model repo's public metadata through the Hugging Face Hub API, returning normalized model IDs, authors, tasks, libraries, downloads, likes, licenses, tags, timestamps, URLs, and filenames.

Overview

Hugging Face Models Scraper gives agents a structured route into public Hugging Face Hub model metadata. Search models by keyword and sort by downloads, likes, created date, update time, or trending score, or fetch one exact model repo by ID or URL. The tool normalizes model IDs, authors, Hub URLs, pipeline tasks, library names, license hints, download counts, likes, public/private and gated labels, tags, created and last-modified timestamps, and sibling filenames. It is designed for AI model discovery, LLM ecosystem monitoring, open-source competitive research, model catalog enrichment, leaderboard preparation, DevRel research, and RAG-ready AI tooling inventories.

Last validated: Jul 3, 2026

Playground

search = search public Hub models; details = fetch one exact model repo.

Sort field for search mode.

Maximum model rows to return.

Search query for search mode, such as llama, bert, diffusion, or sentence-transformers.

Model ID or Hugging Face model URL for details mode, such as bert-base-uncased or meta-llama/Llama-3.1-8B-Instruct.

Sort direction for search mode.

Sign in to run this tool

~1 credit per run · runs against your account

Input

mode"search" | "details"default: "search"

search = search public Hub models; details = fetch one exact model repo.

sort"downloads" | "likes" | "lastModified" | "createdAt" | "trendingScore"default: "downloads"

Sort field for search mode.

limitintegerdefault: 10

Maximum model rows to return.

querystring

Search query for search mode, such as llama, bert, diffusion, or sentence-transformers.

model_idstring

Model ID or Hugging Face model URL for details mode, such as bert-base-uncased or meta-llama/Llama-3.1-8B-Instruct.

direction"desc" | "asc" | "-1" | "1"default: "desc"

Sort direction for search mode.

Output

modestringrequired

Mode used for this run

countintegerrequired

Number of model rows returned

modelobject

Exact public Hugging Face model metadata

model.idstring

Model repository ID

model.rankinteger

Result rank

model.tagsstring

Comma-separated tags

model.gatedstring

Gated label when returned

model.likesinteger

Like count

model.authorstring

Author or namespace

model.licensestring

License tag hint

model.privateboolean

Private flag when returned

model.siblingsstring

Comma-separated public sibling filenames

model.downloadsinteger

Download count

model.model_urlstring

Hugging Face model URL

model.created_atstring

Created timestamp

model.library_namestring

Library name

model.pipeline_tagstring

Pipeline/task tag

model.last_modifiedstring

Last modified timestamp

querystring

Search query used

modelsobject[]

Public Hugging Face model rows

model_idstring

Exact model ID used

source_urlstringrequired

Hugging Face Hub API URL fetched

Examples

llama-search

{
  "mode": "search",
  "sort": "downloads",
  "limit": 3,
  "query": "llama",
  "direction": "desc"
}

bert-details

{
  "mode": "details",
  "model_id": "bert-base-uncased"
}

Use cases

Model discovery

Search the Hugging Face Hub by keyword and rank public models by downloads, likes, freshness, or trending score.

AI ecosystem monitoring

Track popular model families, tasks, libraries, tags, and license hints for research, DevRel, and competitive intelligence workflows.

Agent catalog enrichment

Fetch exact model metadata and filenames before deciding which model card, weights, or repository files an agent should inspect next.

FAQ

Does Hugging Face Models Scraper require a Hugging Face token?

No. Version 0.1 uses public Hugging Face Hub API endpoints and only returns public metadata visible without account-specific access.

Does it download model weights?

No. It returns metadata and public sibling filenames. It does not download model files, bypass gated repositories, or access private models.

Is this tool affiliated with Hugging Face?

No. Better Fetch is not affiliated with or endorsed by Hugging Face. The logo mark is used only to identify the public target service.

Use it anywhere

MCP (Claude, Cursor, any client)

# Add the Better Fetch MCP connector (or paste the URL into
# Claude → Settings → Connectors → Add custom connector):
claude mcp add --transport http better-fetch https://betterfetch.co/api/mcp \
  --header "Authorization: Bearer bf_your_key_here"

# Then ask for the tool by name: huggingface_models_scraper

REST

curl -sS -X POST "https://betterfetch.co/api/tools/huggingface_models_scraper/run" \
  -H "Authorization: Bearer bf_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"input": {"mode":"search","sort":"downloads","limit":3,"query":"llama","direction":"desc"}}'

Run locally

git clone https://github.com/better-fetch/tools/tree/main/tools/huggingface-models-scraper && cd huggingface-models-scraper && npm i
BETTER_FETCH_API_KEY=bf_your_key_here npx bf-tool run --input '{"mode":"search","sort":"downloads","limit":3,"query":"llama","direction":"desc"}'