Scraper APIHugging Face
huggingface.search
A page of the models or Spaces (apps) of the Hugging Face Hub for words or an owner, most downloaded, liked, trending, updated or newest first: owner, likes, downloads, task, library or SDK, licence, tags and dates.
- Id
huggingface.search- Version
- 1
- Billed per
- request — 1 unit for a charged run
- Runs
- within one request
Start it with POST /v1/scrapers/huggingface.search/runs. How runs work is in Running a scraper; what a run costs is in Usage and units.
Inputs
The fields of input. A field that is not listed here is refused.
| Field | Type | Description |
|---|---|---|
kind | "model" | "space" | What to list: model (default) or space (apps).Default: "model". |
query | string | Words the repository's id must contain. Leave it out to list everything.Limit: at least 1 characters, at most 200 characters. |
author | string | Only the repositories of this user or organisation, e.g. openai, meta-llama.Limit: matches ^[A-Za-z0-9][A-Za-z0-9._-]{0,95}$. |
sort | "downloads" | "likes" | "trending" | "updated" | "newest" | The order: downloads (default; most liked for Spaces), likes, trending, updated or newest.Default: "downloads". |
max_results | integer | Repositories a page; 100 at most.Limit: 1 to 100. Default: 20. |
cursor | string | The next_cursor a previous page returned, to read the page after it with the same query.Limit: at most 2000 characters. |
start | integer | How many repositories the pages before this one held, so positions run on (leave 0 for the first page).Limit: 0 to 1000000. Default: 0. |
Record fields
Every record of a run has these fields. A value that is not known is null — never an empty string and never 0.
| Field | Type | Notes |
|---|---|---|
kind | string | What the repository is: model or space (an app). |
repo_id | string | The repository's id, owner/name. huggingface.repo takes it. |
url | string | The repository's page on huggingface.co. |
author | string or null | The user or organisation that owns it. |
name | string | The repository's name, without its owner. |
title | string or null | A Space's title, as its card states it. |
likes | integer or null | How many people liked it. |
downloads | integer or null | A model's downloads in the last 30 days, as the Hub counts them; null for a Space. |
pipeline_tag | string or null | A model's task, e.g. text-generation, fill-mask. |
library | string or null | The library a model is for, e.g. transformers, diffusers. |
sdk | string or null | What a Space runs on: gradio, streamlit, docker or static. |
license | string or null | The licence it declares, e.g. apache-2.0. |
tags | array of string | The Hub's tags for it: frameworks, languages, papers (arxiv:...). |
gated | boolean or null | True when its files are shown only to people who accept its conditions. |
created_at | string (date-time) or null | When it was created, in UTC. |
updated_at | string (date-time) or null | When it was last changed, in UTC. |
fetched_at | string (date-time) | When the Hub answered, in UTC. |
position | integer | Its place in the list, from 1, across the pages read with next_cursor. |
status | string or null | A Space's state, e.g. RUNNING, SLEEPING. |
Example request
# Start a run and wait up to 60 seconds for it to finish
curl -X POST "https://api.enrichednow.com/v1/scrapers/huggingface.search/runs?wait=60" \
-H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":{"query":"whisper","max_results":3}}'
# Read its records, with the id the first call answered
curl "https://api.enrichednow.com/v1/runs/$RUN_ID/records?limit=100" \
-H "Authorization: Bearer $ENRICHEDNOW_API_KEY"from enrichednow import EnrichedNow
client = EnrichedNow() # reads ENRICHEDNOW_API_KEY
# Start a run, wait for it to end, and get its records
result = client.scrape("huggingface.search", {
"query": "whisper",
"max_results": 3,
})
print(result.run.id, result.run.status, result.run.record_count)
# Read its records: pages are fetched as you go
for record in result.records:
print(record)Install it with pip install enrichednow, then save as run.py and run python3 run.py
import EnrichedNow from "enrichednow";
const client = new EnrichedNow(); // reads ENRICHEDNOW_API_KEY
// Start a run, wait for it to end, and get its records
const { run, records } = await client.scrape("huggingface.search", { query: "whisper", max_results: 3 });
console.log(run.id, run.status, run.record_count);
// Read its records: pages are fetched as you go
for await (const record of records) console.log(record);Install it with npm install enrichednow, then save as run.mjs and run node run.mjs
package main
import (
"context"
"fmt"
"log"
"time"
enrichednow "github.com/enrichednow/enrichednow-go"
)
func main() {
client, err := enrichednow.NewClient() // reads ENRICHEDNOW_API_KEY
if err != nil {
log.Fatal(err)
}
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
defer cancel()
// Start a run, wait for it to end, and get its records
run, records, err := client.Scrape(ctx, "huggingface.search", map[string]any{"query": "whisper", "max_results": 3})
if err != nil {
log.Fatal(err)
}
fmt.Println(run.ID, run.Status, run.RecordCount)
// Read its records: pages are fetched as you go
for records.Next() {
fmt.Println(string(records.Current()))
}
if err := records.Err(); err != nil {
log.Fatal(err)
}
}Install it with go get github.com/enrichednow/enrichednow-go@latest, then save as run.go and run go run run.go
import com.enrichednow.EnrichedNowClient;
import com.enrichednow.ScrapeResult;
import java.util.Map;
public class Run {
public static void main(String[] args) {
EnrichedNowClient client = EnrichedNowClient.fromEnv(); // reads ENRICHEDNOW_API_KEY
// Start a run, wait for it to end, and get its records
ScrapeResult result = client.scrape("huggingface.search", Map.of("query", "whisper", "max_results", 3));
System.out.println(result.run().id() + " " + result.run().status() + " " + result.run().recordCount());
// Read its records: pages are fetched as you go
for (Map<String, Object> record : result.records()) {
System.out.println(record);
}
}
}Add com.enrichednow:enrichednow-java:0.4.0 to your Maven or Gradle build, then save as Run.java
enrichednow run huggingface.search --input query=whisper --input max_results=3Install it with curl -fsSL https://raw.githubusercontent.com/enrichednow/enrichednow-cli/main/install.sh | sh
It starts a run with this scraper’s example input, waits for it to finish and reads its records a page at a time. The key is read from ENRICHEDNOW_API_KEY.
The body on its own:
{
"input": {
"query": "whisper",
"max_results": 3
}
}Example response
The run, once it has ended. A run that has not ended within wait comes back with 202 and the status queued or running.
{
"id": "run_841742f37553189ff9c27ba1",
"scraper_id": "huggingface.search",
"scraper_version": 1,
"status": "ok",
"reason": null,
"input": {
"query": "whisper",
"max_results": 3
},
"record_count": 1,
"units": 1,
"units_per_request": 1,
"units_per_record": null,
"units_per_page": null,
"diagnostics": {
"requests": 1,
"bytes": 259214,
"wall_ms": 885,
"facts": {}
},
"created_at": "2026-11-16T22:37:50.170950Z",
"started_at": "2026-11-16T22:37:50.178331Z",
"finished_at": "2026-11-16T22:37:51.066313Z"
}Its records, from GET /v1/runs/{id}/records. The record is a real one: this scraper's own parser read it from a page recorded from the site.
{
"records": [
{
"kind": "model",
"repo_id": "argmaxinc/whisperkit-coreml",
"url": "https://huggingface.co/argmaxinc/whisperkit-coreml",
"author": "argmaxinc",
"name": "whisperkit-coreml",
"title": null,
"likes": 276,
"downloads": 101073863,
"pipeline_tag": "automatic-speech-recognition",
"library": "whisperkit",
"sdk": null,
"license": "mit",
"tags": [
"whisperkit",
"coreml",
"whisper"
],
"gated": false,
"created_at": "2024-02-28T08:05:21Z",
"updated_at": "2026-08-19T16:57:48Z",
"fetched_at": "2026-11-24T20:16:18.321171Z",
"position": 1,
"status": null
}
],
"next_cursor": null
}What was done to the record for this page, and nothing else — the API returns every value whole. A text that was cut ends with … [truncated].
- Shortened:
tags: 8 items, the first 3 shown.
A run does not always end ok. Results and statuses lists every status and the reasons every scraper shares; the reasons of the Hugging Face scrapers are in their own section there.