Search Hugging Face repository text
Search the text of Hugging Face READMEs and code files.
Headers
Get your API keyAPI key (`sfk_...`)
Search text.
min 1 chars · max 200 chars
Only this kind of repository.
one of: model, dataset, space
Items per page, 1-100. A page can hold fewer. Default: 20.
≥ 1 · ≤ 100
Page number (1-based), `limit` hits a page. Default: 1. At most 500 hits can be skipped, so deeper pages are not offered.
≥ 1
Endpoint-specific response payload.
Whether the item was found.
one of: found, not_found
Estimated number of matching files.
Matches on this page.
Repository id, `owner/name`.
Repository type.
one of: model, dataset, space
Repository page URL.
File that matched.
Whether the match is in the README.
Likes on the repository.
When the repository last changed (ISO-8601).
The repository's tags, comma-separated.
Matching text, with the match wrapped in `**`: about 300 characters either side of the first match, with `…` where the file continues.
Line of the file where `snippet` starts. Null when unknown (only README hits carry it).
Pagination state. The search reaches at most 500 skipped hits plus one page.
Whether another page is available.
Page number to pass as `page` for the next page; null on the last page.
Offset for the next page; null on the last page.
Metadata describing the request and billing outcome.
Unique request identifier for tracing this API call.
min 1 chars
Credits charged for this request.
≥ 0
Public API version that served the response.
one of: v1
Code example
curl "https://api.socialfetch.dev/v1/hugging-face/search/readmes?query=bert" \
-H "x-api-key: YOUR_API_KEY"Responses
Text search page.