> **For coding agents and LLMs:** This is one Social Fetch marketing page (markdown export). For API orientation start with [`/llms.txt`](https://www.socialfetch.dev/llms.txt); for auth and crawl rules use [`/agents.txt`](https://www.socialfetch.dev/agents.txt); for every operation use [`/llms-endpoints.txt`](https://www.socialfetch.dev/llms-endpoints.txt).

## This page

- **On-site (HTML):** <https://www.socialfetch.dev/platforms/hugging-face>
- **Markdown (.mdx) URL:** <https://www.socialfetch.dev/platforms/hugging-face.mdx>

---

# Hugging Face API. Models, datasets and papers as JSON.

Search the model and dataset catalogue, get one repository with its card and README, read dataset rows, follow papers and collections, and track accounts. One typed API, one envelope.

- Models, datasets & Spaces
- Papers & collections
- 1 credit per request

Social Fetch exposes 42 routes under `/v1/hugging-face`. The core routes cover the model, dataset and Space catalogue: `GET /v1/hugging-face/models`, `/datasets` and `/spaces` search with keyword, author, tag, licence and size filters, and the detail routes return one repository with its card metadata, likes, downloads and commit. Repository routes add the README as markdown, the file tree with optional last commits, the commit history, discussions and pull requests with their timelines, and the accounts that liked a repository.

Account routes cover a user or organization, the repositories it owns, followers and following, likes, recent activity, organization members, public storage buckets and profile details. Paper routes cover the daily list, search, one paper with its authors and citing repositories, the citing models, datasets and Spaces, and the full text as markdown. The rest of the catalogue adds collections, the social posts feed, the official and community blog, trending repositories, a site-wide search that groups results by kind, full-text search inside repository files, semantic Space search, tag values, hosted inference models with prices, recently changed pages, and dataset rows with their information and per-column statistics.

Every response uses the `{ data, meta }` envelope with `data.lookupStatus`, so a missing or private repository, account or paper comes back as a typed `not_found` instead of an error. Lists page with an opaque `cursor` or a page number, depending on the route, and `meta.creditsCharged` is the billing source of truth.

## What you can get

- Search models, datasets and Spaces by keyword, author, task, library, language, licence, tags, gated access and parameter count.
- Get one repository with its card metadata, safetensors and GGUF facts, base models, evaluation results and hosted providers.
- Read a repository README as markdown, its file tree with optional last commits, its commit history and its discussion timelines.
- Follow accounts: profile, owned repositories, followers and following, likes, recent activity and organization members.
- Work with papers: the daily list, search, authors, citing repositories and the full text as markdown.
- Read dataset rows and per-column statistics, or check up front whether a dataset's rows can be shown and why not.

## Hugging Face endpoints

| Endpoint | Request | Credits | Docs |
| --- | --- | --- | --- |
| Search models | GET /v1/hugging-face/models | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/models/get) |
| Get model | GET /v1/hugging-face/models/{owner}/{name} | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/models/owner/name/get) |
| Search datasets | GET /v1/hugging-face/datasets | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/datasets/get) |
| Get dataset | GET /v1/hugging-face/datasets/{owner}/{name} | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/datasets/owner/name/get) |
| Search Spaces | GET /v1/hugging-face/spaces | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/spaces/get) |
| Get Space | GET /v1/hugging-face/spaces/{owner}/{name} | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/spaces/owner/name/get) |
| README | GET /v1/hugging-face/repos/{repoType}/{owner}/{name}/readme | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/repos/repotype/owner/name/readme/get) |
| Files | GET /v1/hugging-face/repos/{repoType}/{owner}/{name}/files | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/repos/repotype/owner/name/files/get) |
| Commits | GET /v1/hugging-face/repos/{repoType}/{owner}/{name}/commits | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/repos/repotype/owner/name/commits/get) |
| Discussions | GET /v1/hugging-face/repos/{repoType}/{owner}/{name}/discussions | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/repos/repotype/owner/name/discussions/get) |
| Discussion | GET /v1/hugging-face/repos/{repoType}/{owner}/{name}/discussions/{number} | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/repos/repotype/owner/name/discussions/number/get) |
| Likers | GET /v1/hugging-face/repos/{repoType}/{owner}/{name}/likers | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/repos/repotype/owner/name/likers/get) |
| Account | GET /v1/hugging-face/accounts/{name} | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/accounts/name/get) |
| Repositories | GET /v1/hugging-face/accounts/{name}/repos | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/accounts/name/repos/get) |
| Followers | GET /v1/hugging-face/accounts/{name}/followers | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/accounts/name/followers/get) |
| Following | GET /v1/hugging-face/users/{name}/following | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/users/name/following/get) |
| Likes | GET /v1/hugging-face/users/{name}/likes | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/users/name/likes/get) |
| Activity | GET /v1/hugging-face/accounts/{name}/activity | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/accounts/name/activity/get) |
| Members | GET /v1/hugging-face/organizations/{name}/members | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/organizations/name/members/get) |
| Buckets | GET /v1/hugging-face/accounts/{name}/buckets | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/accounts/name/buckets/get) |
| Profile page | GET /v1/hugging-face/accounts/{name}/profile | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/accounts/name/profile/get) |
| Daily papers | GET /v1/hugging-face/papers/daily | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/papers/daily/get) |
| Search papers | GET /v1/hugging-face/papers | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/papers/get) |
| Paper | GET /v1/hugging-face/papers/{arxivId} | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/papers/arxivid/get) |
| Linked repositories | GET /v1/hugging-face/papers/{arxivId}/repos | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/papers/arxivid/repos/get) |
| Full text | GET /v1/hugging-face/papers/{arxivId}/content | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/papers/arxivid/content/get) |
| Search collections | GET /v1/hugging-face/collections | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/collections/get) |
| Collection | GET /v1/hugging-face/collections/{owner}/{slug} | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/collections/owner/slug/get) |
| Social posts | GET /v1/hugging-face/posts | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/posts/get) |
| Blog posts | GET /v1/hugging-face/blog/posts | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/blog/posts/get) |
| Trending | GET /v1/hugging-face/trending | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/trending/get) |
| Search everything | GET /v1/hugging-face/search | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/search/get) |
| Search README text | GET /v1/hugging-face/search/readmes | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/search/readmes/get) |
| Find Spaces by meaning | GET /v1/hugging-face/spaces/semantic-search | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/spaces/semantic-search/get) |
| Tags | GET /v1/hugging-face/tags | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/tags/get) |
| Hosted inference models | GET /v1/hugging-face/inference-providers/models | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/inference-providers/models/get) |
| Recent changes | GET /v1/hugging-face/changes | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/changes/get) |
| Row viewer | GET /v1/hugging-face/datasets/{owner}/{name}/viewer | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/datasets/owner/name/viewer/get) |
| Rows | GET /v1/hugging-face/datasets/{owner}/{name}/rows | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/datasets/owner/name/rows/get) |
| Statistics | GET /v1/hugging-face/datasets/{owner}/{name}/statistics | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/datasets/owner/name/statistics/get) |
| Search kernels | GET /v1/hugging-face/kernels | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/kernels/get) |
| Kernel | GET /v1/hugging-face/kernels/{owner}/{name} | 1 credit Failed requests are free | [docs](https://www.socialfetch.dev/docs/api/v1/hugging-face/kernels/owner/name/get) |

## How to start

1. **Create an API key.** Sign up at Social Fetch and copy a key (`sfk_…`). New accounts get 100 free credits, enough to try a search, a repository detail, a README and a paper lookup.
2. **Pick the route.** Use `/v1/hugging-face/models`, `/datasets` or `/spaces` to search, the matching `/{owner}/{name}` route for one repository, `/repos/{repoType}/{owner}/{name}/readme` for its card, and `/papers/{arxivId}` for a paper. Send `x-api-key` on every request.
3. **Branch on the envelope, then bill.** Check `data.lookupStatus` before storing a row (`found`, `not_found` or `restricted`), keep requesting with `page.nextCursor` while `page.hasMore` is true, and bill from `meta.creditsCharged`.

## Pricing

Every Hugging Face route charges one credit per completed request, shown on each endpoint page. Each page of a list is its own request. Credits never expire on pay-as-you-go packs, and `meta.creditsCharged` on every response is the billing source of truth.

## Compared with the official API

Hugging Face's data has one object shape per kind, and many views need several calls to compose: a repository plus its README, a paper plus its citing repositories, a dataset plus its row facts and rows. Social Fetch gives you one consistent `{ data, meta }` envelope across models, datasets, Spaces, papers, collections and accounts, typed `found`, `not_found` and `restricted` outcomes, cursor and page paging where each route needs it, and full-text search that returns a matched snippet rather than whole files.

## FAQ

### Is there a Hugging Face API for models, datasets and Spaces?

Yes. Social Fetch has routes for the model, dataset and Space catalogue: search with filters, one repository with its card metadata, the README, the file tree, commits, discussions, likers and accounts. Authenticate with your Social Fetch API key in the x-api-key header.

### How do I search models by task or size?

Use GET /v1/hugging-face/models with pipelineTag set to a task such as text-generation, and minParameters or maxParameters set to values such as 500M or 7B. List the valid task ids with GET /v1/hugging-face/tags?group=pipeline_tag.

### What does a model or dataset response include?

On found, a model carries the summary fields (id, url, author, likes, downloads, tags, licence, gated) plus card metadata, safetensors and GGUF facts, base models, evaluation results and hosted inference providers. A dataset carries its description, citation, languages, data sizes and card. include=config, spaces or security adds those model blocks.

### How do I read a repository README or its files?

GET /v1/hugging-face/repos/{repoType}/{owner}/{name}/readme returns the full card as markdown, including its YAML header. The /files route returns the tree with sizes, git ids, large-file details and optional last commits. repoType is models, datasets or spaces.

### Can I read dataset rows and statistics?

Yes. The /viewer route says whether rows can be shown, which subsets and splits exist and why rows are unavailable. The /rows route returns pages of typed values with page numbers, and the /statistics route returns per-column counts, ranges, histograms or label frequencies. Not every dataset has readable rows.

### How deep can full-text search go?

GET /v1/hugging-face/search/readmes searches repository files, mostly READMEs, and returns a snippet of about 300 characters either side of the match. The deepest page starts after 500 skipped hits, because the platform slows down for each skipped hit and gives up after about 12 seconds.

### How do I follow papers and collections?

GET /v1/hugging-face/papers/daily takes one of a day, an ISO week or a month; sending more than one is a 400. GET /papers searches by keyword, /papers/{arxivId} returns authors, links and citing repositories, and /papers/{arxivId}/content returns the full text. GET /collections searches curated lists and /collections/{owner}/{slug} returns every item in order.

### Does HTTP 200 mean the repository or account exists?

No. HTTP 200 means the request finished. Check data.lookupStatus: not_found means no public repository, account or paper is visible under that name, and restricted means a repository exists but its content is gated. A private repository also returns not_found.

### How much does the Hugging Face API cost?

Every route charges one credit per completed request, and each page of a list is billed separately. Check meta.creditsCharged on every response. New accounts start with 100 free credits.

### Can I use Hugging Face routes from agents or MCP?

Yes. The routes are typed MCP tools and are reachable through Ask (POST /v1/ask) in plain English. Use the typed routes for production jobs.

## Related

- [Hugging Face Models API](https://www.socialfetch.dev/platforms/hugging-face/models): Search models by task, library, size and licence (`GET /v1/hugging-face/models`).
- [Hugging Face Model API](https://www.socialfetch.dev/platforms/hugging-face/models-owner-name): One model with card, weights, base models and providers (`GET /v1/hugging-face/models/{owner}/{name}`).
- [Hugging Face Dataset Rows API](https://www.socialfetch.dev/platforms/hugging-face/datasets-owner-name-rows): Pages of typed dataset rows (`GET /v1/hugging-face/datasets/{owner}/{name}/rows`).
- [Hugging Face Paper API](https://www.socialfetch.dev/platforms/hugging-face/papers-arxivid): One paper with authors, citing repositories and optional comments (`GET /v1/hugging-face/papers/{arxivId}`).
- [Hugging Face Search API](https://www.socialfetch.dev/platforms/hugging-face/search): One query across models, datasets, Spaces, papers, accounts and more (`GET /v1/hugging-face/search`).
- [Hugging Face Account API](https://www.socialfetch.dev/platforms/hugging-face/accounts-name): A user or organization with counts and socials (`GET /v1/hugging-face/accounts/{name}`).
- [Ask in plain English](https://www.socialfetch.dev/ask): Route a natural-language question to the matching Hugging Face operation.
- [Hosted MCP](https://www.socialfetch.dev/mcp): Call Hugging Face tools from Cursor or Claude with the same credit metering as REST.
