Hugging Face hub

Hugging Face README API

The full repository card as markdown, with the YAML header intact and the commit it came from.

GET /v1/hugging-face/repos/{repoType}/{owner}/{name}/readme

1 credit Failed requests are free

About this endpoint

GET /v1/hugging-face/repos/{repoType}/{owner}/{name}/readme returns repo and readme. readme.markdown is the file as written, including the YAML header the platform keeps metadata in, and readme.sizeBytes plus readme.revision describe the returned file.

repoType is models, datasets or spaces, and revision selects a branch, tag or commit. A repository with no README is lookupStatus: found with readme: null. A repository that does not exist is not_found.

Hugging Face README API FAQ

Does this include the YAML header?

Yes. readme.markdown keeps the header, so the licence, language and dataset fields are there exactly as the author wrote them.

What does a missing README look like?

lookupStatus is found and readme is null. That is different from a missing repository, which returns lookupStatus not_found.

Which repository types work?

repoType accepts models, datasets and spaces.

How much does a README lookup 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.