Hugging Face Spaces API
Find demos by keyword, author, SDK or tag, with run state and repository stats on every row.
GET /v1/hugging-face/spaces1 credit Failed requests are free
About this endpoint
GET /v1/hugging-face/spaces returns a page of Spaces in results. Use query, author, sdk (gradio, streamlit, docker or static), tags, sort, order, limit and cursor.
Each row carries id, url, author, sdk, spaceStage, likes, downloads, trendingScore, tags and lastModified. Sort by downloads, likes, likes7d, likes30d, trending, created or updated, and keep asking with page.nextCursor while page.hasMore is true.
Hugging Face Spaces API FAQ
Which SDKs can I filter by?
sdk accepts gradio, streamlit, docker or static. Omit it to search every Space.
What is spaceStage?
It is the Space's run state, for example RUNNING, SLEEPING or BUILDING. The detail endpoint gives the fuller runtime block.
Can I find Spaces by what they do rather than a keyword?
Yes. GET /v1/hugging-face/spaces/semantic-search ranks Spaces by how well they match a plain-language description.
How much does a Space search cost?
Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged: that field is the billing source of truth. Each paginated page is a separate billed request.
Other Hugging Face endpoints
- Search modelsGET /v1/hugging-face/models
- Get modelGET /v1/hugging-face/models/{owner}/{name}
- Search datasetsGET /v1/hugging-face/datasets
- Get datasetGET /v1/hugging-face/datasets/{owner}/{name}
- Get SpaceGET /v1/hugging-face/spaces/{owner}/{name}
- READMEGET /v1/hugging-face/repos/{repoType}/{owner}/{name}/readme
- FilesGET /v1/hugging-face/repos/{repoType}/{owner}/{name}/files
- CommitsGET /v1/hugging-face/repos/{repoType}/{owner}/{name}/commits