Discover/Hugging Face API
live

Hugging Face APIhuggingface.com ↗

Search Hugging Face public model repositories by keyword, tag, and author. Fetch full metadata including stats, license, architecture, and MoE config fields.

Endpoint health
verified 2h ago
search_models
get_model
2/2 passing latest checkself-healing
Endpoints
2
Updated
3h ago

What is the Hugging Face API?

This API exposes 2 endpoints covering the Hugging Face public model hub: search_models for filtering and paginating model repositories by keyword, tag, author, and sort order, and get_model for retrieving full metadata on a single repository. A single get_model response includes over 15 distinct fields — commit SHA, like count, safetensors parameter counts, license, language list, gating status, architecture details, and MoE-specific config values such as num_experts_per_tok.

This call costs1 credit / call— charged only on success
Try it
Ranking key for the result stream.
Comma-separated hub tag filters that every returned model must carry, e.g. text-generation,moe. Tags include pipeline tasks (text-generation), libraries (transformers), languages (en) and license:<id>. Omitted = no tag filter.
Models per page, 1-100; larger values are clamped to 100.
Free-text search matched against model names (e.g. moe, mixtral). Omitted = no keyword restriction.
Restrict results to models owned by this user or organization (e.g. mistralai). Omitted = all authors.
Opaque continuation token from a previous response's next_cursor. Omitted = first page.
Sort direction.
→ api.parse.bot/scraper/935de92c-492e-4400-b2e5-7079e64018cd/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/935de92c-492e-4400-b2e5-7079e64018cd/search_models?tags=text-generation&limit=5&query=moe' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace huggingface-com-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""Walkthrough: Hugging Face Models API — search, drill down, point lookup."""
from parse_apis.huggingface_com_api import HuggingFace, ModelSort, SortDirection, ModelNotFound

client = HuggingFace()

# Search for mixture-of-experts text-generation models, sorted by downloads.
for summary in client.model_summaries.search(
    query="moe", tags="text-generation", sort=ModelSort.DOWNLOADS,
    direction=SortDirection.DESC, limit=5,
):
    print(summary.model_id, summary.downloads, summary.likes)

# Drill down: take the top hit and fetch its full metadata.
top = client.model_summaries.search(
    query="moe", tags="text-generation", sort=ModelSort.DOWNLOADS, limit=1,
).first()
if top is not None:
    model = top.details()
    print(model.model_id, model.license, model.model_type)
    print("architectures:", model.architectures)
    print("params:", model.safetensors_total_params)
    print("files:", model.files[:5])

# Point lookup by a known repository id discovered above.
if top is not None:
    try:
        full = client.models.get(model_id=top.model_id)
        print(full.model_id, full.author, full.downloads, full.used_storage_bytes)
    except ModelNotFound:
        print("model not found or private")

print("exercised: model_summaries.search / details / models.get")
All endpoints · 2 totalmissing one? ·

Searches public model repositories on the Hugging Face hub. One round trip returns up to `limit` model summaries (name substring match on `query`, optional tag filters and author restriction), ordered by the chosen sort key. Results are cursor-paginated: when more models exist, `next_cursor` is set and `has_more` is true; pass `next_cursor` back as `cursor` with the same other parameters to fetch the following page. Omitting `cursor` returns the first page. A query with no matching models returns an empty `models` list with `has_more` false. `trending_score` is the hub's trending metric and may be 0.

Input
ParamTypeDescription
sortstringRanking key for the result stream.
tagsstringComma-separated hub tag filters that every returned model must carry, e.g. text-generation,moe. Tags include pipeline tasks (text-generation), libraries (transformers), languages (en) and license:<id>. Omitted = no tag filter.
limitintegerModels per page, 1-100; larger values are clamped to 100.
querystringFree-text search matched against model names (e.g. moe, mixtral). Omitted = no keyword restriction.
authorstringRestrict results to models owned by this user or organization (e.g. mistralai). Omitted = all authors.
cursorstringOpaque continuation token from a previous response's next_cursor. Omitted = first page.
directionstringSort direction.
Response
{
  "type": "object",
  "fields": {
    "count": "number of models in this page",
    "models": "array of model summaries: model_id (repo id usable with get_model), author, pipeline_tag, library_name, tags (array of hub tag strings), downloads (last-30-day count), likes, trending_score, gated (boolean or null), private, created_at / last_modified (ISO 8601 UTC), url",
    "has_more": "boolean, true when next_cursor is set",
    "next_cursor": "opaque token for the next page, or null when exhausted"
  },
  "sample": {
    "data": {
      "count": 1,
      "models": [
        {
          "url": "https://huggingface.co/Qwen/Qwen1.5-MoE-A2.7B",
          "tags": [
            "transformers",
            "safetensors",
            "qwen2_moe",
            "text-generation",
            "pretrained",
            "moe",
            "conversational",
            "en",
            "license:other",
            "endpoints_compatible",
            "region:us"
          ],
          "gated": false,
          "likes": 229,
          "author": "Qwen",
          "private": false,
          "model_id": "Qwen/Qwen1.5-MoE-A2.7B",
          "downloads": 508459,
          "created_at": "2024-02-29T04:52:16.000Z",
          "library_name": "transformers",
          "pipeline_tag": "text-generation",
          "last_modified": "2024-04-18T11:58:22.000Z",
          "trending_score": 0
        }
      ],
      "has_more": true,
      "next_cursor": "eyIkb3IiOlt7..."
    },
    "status": "success"
  }
}

About the Hugging Face API

Searching Models

The search_models endpoint accepts up to seven parameters. The query string matches against model names — useful for terms like mixtral or moe. The tags parameter takes a comma-separated list of hub tag strings (e.g. text-generation,moe), and every returned model must carry all of them. author restricts results to a specific user or organization such as mistralai. The sort and direction parameters control ranking order, and limit caps page size between 1 and 100. Each page response includes a models array of summaries with model_id, author, pipeline_tag, library_name, tags, and download/like counts.

Pagination

Results are cursor-paginated. When has_more is true, the response carries a next_cursor token. Pass that token as the cursor parameter on the next call to retrieve the following page. When next_cursor is null, the result set is exhausted. This design works well for iterating large tag-filtered sets (e.g. all public MoE models) without offset drift.

Full Model Metadata

The get_model endpoint takes a model_id in <author>/<name> form — exactly as returned by search_models — and returns a detailed record. Fields cover hub statistics (likes, sha, url), content (files, tags, license, private, gated), provenance (author, spaces — up to 50 Space IDs using this model), and architecture data from the repo config. For mixture-of-experts models, num_experts_per_tok is populated; for all others it is null.

Reliability & maintenanceVerified

The Hugging Face API is a managed, monitored endpoint for huggingface.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when huggingface.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official huggingface.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
2h ago
Latest check
2/2 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Cataloging all public MoE models by filtering search_models with the moe tag and iterating with cursor pagination
  • Building a model leaderboard by sorting search_models results by downloads or likes across a specific author
  • Auditing license compliance by bulk-fetching license fields via get_model for a list of model IDs
  • Tracking which Spaces depend on a given model using the spaces array returned by get_model
  • Identifying gated or private models in a curated list by checking the gated and private fields from get_model
  • Filtering text-generation models from a specific organization for a model picker UI using author and tags together in search_models
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo2005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min
Team$300/mo20,000300 req/min
Company$1,000/mo100,000500 req/min

Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does Hugging Face have an official developer API?+
Yes. Hugging Face publishes an official Hub REST API documented at https://huggingface.co/docs/hub/api. It covers model, dataset, and Space repositories with authentication for private resources.
What does `get_model` return for mixture-of-experts models specifically?+
For MoE architectures, the get_model response populates num_experts_per_tok from the repo config. For all other model types this field is null. Other architecture fields such as model type are returned regardless of architecture.
Does `search_models` return dataset or Space repositories in addition to models?+
No — search_models returns model repositories only. The model_id, pipeline_tag, and library_name fields are model-hub specific. Dataset and Space repository search are not currently covered. You can fork this API on Parse and revise it to add endpoints for those repository types.
Is there a limit on how many Spaces are listed per model in `get_model`?+
The spaces array returns at most 50 Space IDs that reference the model. Models used by more than 50 Spaces will have the list truncated at that cap.
Does the API expose model card content such as README text or evaluation results tables?+
Not currently. The API returns structured metadata fields including license, tags, files, and architecture config, but the free-text model card body and embedded evaluation tables are not included. You can fork this API on Parse and revise it to add a model card content endpoint.
Page content last updated . Spec covers 2 endpoints from huggingface.com.
Related APIs in Developer ToolsSee all →
huggingface.co API
Discover and browse the most popular Hugging Face Spaces ranked by likes, trending score, or recent updates to find the best machine learning demos and tools for your needs. Filter through top-performing projects to quickly identify trending applications and highly-rated community contributions.
fal.ai API
Access data from fal.ai.
ollama.com API
Search and discover AI models from Ollama's library, finding specific variants, their sizes, context windows, and ready-to-use pull commands. Get detailed information about any model to quickly understand its capabilities and requirements before running it locally.
thingiverse.com API
Search and explore millions of 3D printable models on Thingiverse, view detailed information about designs including specifications and metadata, and discover trending tags to find popular printing categories. Quickly identify the best models for your projects by browsing comprehensive design details and analyzing what the community is printing most.
sketchfab.com API
Search and browse 3D models on Sketchfab, including filtering by category, license, animation, and downloadability. Retrieve detailed model metadata, creator profiles, collections, thumbnails, tags, and viewer configuration options.
openrouter.ai API
Access data from openrouter.ai.
furnimesh.com API
Browse and download free 3D furniture models from FurniMesh's extensive library by searching for specific items or exploring curated collections. Access detailed model information and instantly integrate high-quality furniture assets into your design projects.
duck.ai API
Retrieve real-time information about Duck.ai's available AI models, their capabilities, access tiers, and supported tools to understand what's currently available. Check the service status to ensure Duck.ai's AI chat service is running smoothly before integrating it into your application.