+Hugging Face API
Hugging Face models, datasets, Spaces, papers and profiles as clean JSON, with filters for task, license and size.
The API.SH Hugging Face API returns public Hub metadata as JSON. Search models by task, library, license, language, dataset, base model and parameter count, and read a model's downloads, likes, trending score, tags, architectures, files and card metadata. Do the same for datasets and Spaces, browse collections and Daily Papers, read a paper with its abstract, AI summary and citing models, and look up a user or organization profile.
- 11 endpoints
- from $1 / 1,000 calls
- 1,000 free credits / month
- failed calls free
GET https://api.api.sh/huggingface/v1/ datasets
{ "success": true } What you can build with the Hugging Face API
Model discovery and comparison
Filter models by task, library, license, language and parameter count, sorted by downloads, likes or trending score.
Dataset search
Find datasets by task, language, license, modality, format and size, and read card metadata, splits and row counts.
Trending and market tracking
Track which models, datasets and Spaces are gaining likes and downloads, and which organizations publish them.
Research paper monitoring
Follow the Daily Papers list by day, week or month, search papers, and see which models, datasets and Spaces cite each one.
Demo and Space analysis
List ML demo apps by SDK, model or dataset and read each Space's runtime stage, hardware and linked models.
Curated collections and AI agents
Read curated collections and their items, or give an agent Hub search so it can pick models for a task.
Hugging Face data you get
Field names from real responses. Numbers come parsed, URLs absolute, dates in ISO 8601.
Hugging Face API endpoints and prices
Every Hugging Face endpoint costs 1 credit per call: credits are $1 per 1,000 on a monthly plan, $2 pay-as-you-go. Pricing
| Hugging Face dataset search /huggingface/ | $1 · $2 PAYG 1 credit |
| Hugging Face model search /huggingface/ | $1 · $2 PAYG 1 credit |
| Hugging Face paper search /huggingface/ | $1 · $2 PAYG 1 credit |
| Hugging Face Spaces search /huggingface/ | $1 · $2 PAYG 1 credit |
| Hugging Face user or organization /huggingface/ | $1 · $2 PAYG 1 credit |
| Hugging Face collections /huggingface/ | $1 · $2 PAYG 1 credit |
| Hugging Face dataset /huggingface/ | $1 · $2 PAYG 1 credit |
| Hugging Face model /huggingface/ | $1 · $2 PAYG 1 credit |
| Hugging Face paper /huggingface/ | $1 · $2 PAYG 1 credit |
| Hugging Face Daily Papers /huggingface/ | $1 · $2 PAYG 1 credit |
| Hugging Face Space /huggingface/ | $1 · $2 PAYG 1 credit |
Call the Hugging Face API
Hugging Face dataset search: GET https://api.api.sh/huggingface/
curl "https://api.api.sh/huggingface/v1/datasets?q=squad" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/huggingface/v1/datasets",
params={"q": "squad"},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json() const url = new URL("https://api.api.sh/huggingface/v1/datasets");
url.searchParams.set("q", "squad");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json(); # Google Sheets (API.SH add-on)
=APISH("/huggingface/v1/datasets", "q", "squad")
# Zapier, Make, n8n (verified node): pick the API.SH app,
# choose "Hugging Face" and "Hugging Face dataset search".
# AI agents (Claude, ChatGPT, Cursor): add the
# API.SH MCP server https://api.sh/mcp - Create a free accountConfirm your email and get 1,000 free credits every month. No card needed.
- Create an API keyOne key works for all 483 platforms.
- Send the requestJSON back in one call. Add
output=csvoroutput=ndjsonfor files.
Why API.SH for Hugging Face data
- Public data only: no Hugging Face login, cookies or account needed
- One key and one response shape for Hugging Face and 482 other platforms
- Built and maintained by API.SH, not third-party publishers
- Pay per call; errors on our side cost nothing
- Live status for every endpoint
API.SH vs the official Hugging Face API
Hugging Face has official, documented Hub API endpoints and a separate Inference Providers API for running models with an access token. API.SH covers the first kind of data only: it returns Hub metadata as JSON with no token and does not run models.
Skip writing your own Hub scraper or paginating raw Hub calls and Apify actors: API.SH gives you one key and a fixed price per call.
Hugging Face API questions
What Hugging Face data can I get?+
Model search and detail (/huggingface/v1/models, /huggingface/v1/model), datasets (/huggingface/v1/datasets, /huggingface/v1/dataset), Spaces (/huggingface/v1/spaces, /huggingface/v1/space), Daily Papers and paper search (/huggingface/v1/papers, /huggingface/v1/papers/search, /huggingface/v1/paper), collections (/huggingface/v1/collections) and user or organization profiles (/huggingface/v1/profile).
How much does the Hugging Face API cost?+
Every Hugging Face endpoint costs 1 credit per call. On a monthly plan 1,000 credits cost $1 (Starter is $50/month for 50,000 credits). Pay-as-you-go is $2 per 1,000 credits, with top-ups from $15 that never expire.
Is there a free trial?+
Yes. Every account gets 1,000 free credits every month. That is 1,000 calls to /huggingface/v1/collections at 1 credit each.
Is there an official Hugging Face API?+
Yes. Hugging Face documents Hub API endpoints and a separate Inference Providers and Inference Endpoints service for running models, which use access tokens. API.SH only returns public Hub metadata such as models, datasets, Spaces and papers, and does not run models.
Do I need a Hugging Face account or access token?+
No. API.SH reads public Hugging Face pages and Hub data only. No endpoint uses a login, an access token or anyone's account.
How do I get started?+
1. Sign up at api.sh. 2. Copy your API key. 3. Call /huggingface/v1/models with q set to a model name or task. Request examples and every parameter are in the docs at https://api.sh/docs. You can also use the JS or Python SDK, Google Sheets, Zapier, Make, n8n or the MCP server at https://api.sh/mcp.
Is there a free Hugging Face API, and is this the Inference API?+
This is not the Inference API: it does not run models or generate text or images. It returns Hub metadata about models, datasets, Spaces and papers. Every account gets 1,000 free credits every month. That is 1,000 calls to /huggingface/v1/collections at 1 credit each.
Can I filter Hugging Face models by license, size or task?+
Yes. /huggingface/v1/models filters by task, library, language, license, dataset, base model, minimum and maximum parameter count and tags, with sorting and cursor paging. /huggingface/v1/datasets filters by task, language, license, modality, format and size.