Discover/Hugging Face API
live

Hugging Face APIhuggingface.co

Retrieve ranked Hugging Face Spaces by likes, trending score, or recency. Filter by search query, paginate with offset, and get SDK, tags, and author data.

This API takes change requests — .
Endpoint health
verified 2h ago
list_top_spaces
1/1 passing latest checkself-healing
Endpoints
1
Updated
3h ago

What is the Hugging Face API?

The Hugging Face Spaces API exposes 1 endpoint — list_top_spaces — that returns an array of Space objects covering 9 fields including title, author, like count, SDK, tags, and timestamps. You can sort results by trending score, likes, or creation date, and narrow them with a free-text search filter to find specific demos or tools published on huggingface.co.

Try it
Ranking criterion for the returned list.
Number of Spaces to return per page (1–100).
Number of items to skip for pagination.
Free-text filter applied to Space names and descriptions. Omit to return all Spaces.
Sort direction: -1 for descending, 1 for ascending.
api.parse.bot/scraper/a413b030-7c3f-46ee-9e26-18d1ac91d384/<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/a413b030-7c3f-46ee-9e26-18d1ac91d384/list_top_spaces?sort=likes&limit=20&offset=0&search=chat&direction=-1' \
  -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-co-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: huggingface_co_api SDK — bounded, re-runnable; every call capped."""
from parse_apis.huggingface_co_api import HuggingFace, Sort, Direction, InvalidInput

client = HuggingFace()

# List top Spaces by likes (default sort), capped at 3 items.
for space in client.spaces.list(sort=Sort.LIKES, direction=Direction.DESCENDING, limit=3):
    print(space.title, space.likes, space.sdk)

# Search for chat-related Spaces, take the first result.
top_chat = client.spaces.list(search="chat", limit=1).first()
if top_chat:
    print(top_chat.id, top_chat.author, top_chat.created_at)

# Typed error: catch an invalid-input error around a bad sort value.
try:
    for s in client.spaces.list(sort="bad_value", limit=1):
        print(s.title)
except InvalidInput as e:
    print("invalid input:", e)

print("exercised: spaces.list")
All endpoints · 1 totalmissing one? ·

List Spaces ranked by the chosen sort criterion. Each Space includes its identifier, title, author, like count, SDK, tags, and timestamps. Results are returned as a single page; pass offset to advance manually. When sort is trendingScore, each item also carries its trending_score.

Input
ParamTypeDescription
sortstringRanking criterion for the returned list.
limitintegerNumber of Spaces to return per page (1–100).
offsetintegerNumber of items to skip for pagination.
searchstringFree-text filter applied to Space names and descriptions. Omit to return all Spaces.
directionstringSort direction: -1 for descending, 1 for ascending.
Response
{
  "type": "object",
  "fields": {
    "spaces": "array of Space objects sorted by the chosen criterion"
  },
  "sample": {
    "spaces": [
      {
        "id": "enzostvs/deepsite",
        "sdk": "docker",
        "tags": [
          "docker",
          "region:us"
        ],
        "likes": 16617,
        "title": "Generate any application by Vibe Coding it",
        "author": "enzostvs",
        "created_at": "2025-03-26T19:26:05.000Z",
        "last_modified": "2026-02-06T12:47:43.000Z"
      }
    ]
  }
}

About the Hugging Face API

What the API Returns

The list_top_spaces endpoint returns a paginated list of Hugging Face Spaces, each represented as a Space object. Each object includes the Space's unique identifier, display title, author username, like count, SDK (e.g. Gradio, Streamlit, Docker, or static), an array of tags, and created/updated timestamps. When you sort by trendingScore, each item also carries a trending_score numeric field that reflects the platform's trending algorithm output.

Sorting, Filtering, and Pagination

The sort parameter accepts values like likes, trendingScore, or createdAt, letting you target whichever ranking axis matters for your use case. Pair sort with direction (-1 for descending, 1 for ascending) to flip the order. The search parameter applies a free-text filter against Space names and descriptions — omit it to return the full ranked list. Results are returned as a single page; use limit (1–100) and offset to advance through the list manually.

Coverage and Scope

The API covers publicly visible Spaces on huggingface.co. Each response reflects the current state of the Space index: like counts and trending scores change as community activity shifts. The sdk field tells you whether a Space runs on Gradio, Streamlit, Docker, or a static deployment, which is useful for filtering by interaction type. Tags vary widely — from NLP and computer-vision to audio and code — and are returned as a raw array for downstream filtering.

Reliability & maintenanceVerified

The Hugging Face API is a managed, monitored endpoint for huggingface.co — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when huggingface.co 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.co 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
1/1 endpoint 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
  • Track which ML demo Spaces are gaining traction by sorting on trendingScore and polling daily.
  • Build a directory of Gradio-based Spaces by filtering the sdk field from list_top_spaces results.
  • Identify prolific authors by aggregating the author field across the top-liked Spaces.
  • Discover recently published Spaces by sorting on createdAt in descending order.
  • Search for domain-specific tools (e.g. 'speech' or 'diffusion') using the search parameter.
  • Monitor like count growth over time by storing snapshots of top Spaces and comparing like fields.
  • Categorize Spaces by tag for a curated ML tools index using the tags array in each response.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min

One credit = one API call regardless of which marketplace API you call. 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 provides an official Hub API documented at https://huggingface.co/docs/hub/api. It covers models, datasets, Spaces, and more, and requires a Hugging Face account token for most write operations.
What does the trendingScore field represent and when does it appear?+
The trending_score field is a numeric value reflecting Hugging Face's internal ranking of Space momentum. It only appears in response objects when you set the sort parameter to trendingScore. For other sort values, the field is absent from each Space object.
Does the API expose model cards, Space README content, or app metadata beyond tags?+
Not currently. The API returns the Space identifier, title, author, like count, SDK, tags, and timestamps. README content and detailed app metadata are not included in the response. You can fork this API on Parse and revise it to add an endpoint that fetches per-Space detail content.
How does pagination work, and is cursor-based pagination supported?+
Pagination is offset-based. Pass an integer to the offset parameter to skip that many items, and use limit to control page size (max 100). Cursor-based pagination is not supported. Results are returned as a single flat array, so you advance manually by incrementing offset by the limit value.
Can I retrieve Spaces from a specific organization or user profile?+
Not currently. The list_top_spaces endpoint returns Spaces across the entire public index and does not accept an author or organization filter. You can filter the returned author field client-side, or fork this API on Parse and revise it to add an author-scoped endpoint.
Page content last updated . Spec covers 1 endpoint from huggingface.co.
Related APIs in Developer ToolsSee all →
toolify.ai API
Search and browse premium .ai domain names available on the Toolify marketplace, filtering by keywords, categories, prices, and domain attributes to find the perfect domain for your project. Explore curated domain listings organized by category to discover valuable .ai domains suited to your needs.
modelscope.cn API
Browse and retrieve top-performing AI models and explore curated datasets from ModelScope.cn, China's premier AI model community. Discover the latest models ranked by popularity and access comprehensive dataset collections for your machine learning projects.
devpost.com API
Search and discover hackathons on Devpost by filtering based on status, keywords, and sorting options like prize money or submission deadlines. Find the perfect hackathon competition that matches your interests and timeline.
explodingtopics.com API
Discover rapidly growing trends, emerging startups, and top-performing websites by filtering through trending topics by category and volatility. Programmatically access detailed trend analysis, related topics, blog coverage, and curated highlights to stay ahead of market movements.
latent.space API
Access Latent Space podcast episodes, newsletters, and full transcripts through search and browsing capabilities. Get detailed information about posts, including transcripts and homepage content, to stay updated on the latest discussions and insights.
openai.com API
Access data from openai.com.
peerspace.com API
Search and explore Peerspace venue listings by location and activity type. Retrieve paginated search results with pricing, ratings, capacity, and amenities, then fetch full listing details including equipment, host information, and availability.
theresanaiforthat.com API
Search and discover AI tools across different tasks, get detailed information about specific tools, browse available deals, and stay updated on the latest tools. Find the perfect AI solution for your needs by filtering by task category or checking featured and trending tools.