# Hugging Face Models, Datasets and Spaces Scraper (`properscraper/hugging-face-scraper`) Actor

Export models, datasets or Spaces from the Hugging Face Hub by search term, author or tag: downloads, likes, task, licence, languages, tags and dates. Uses the official public Hub API, with no login.

- **URL**: https://apify.com/properscraper/hugging-face-scraper.md
- **Developed by:** [jake mcclure](https://apify.com/properscraper) (community)
- **Categories:** AI, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 result saveds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Hugging Face Models, Datasets and Spaces Scraper

Export models, datasets or Spaces from the Hugging Face Hub by search term, author or tag. For each one you get its downloads, likes, task, licence, languages, tags and dates.

It uses the official public Hugging Face Hub API. No login and no API key are needed.

Use it to:

- track which models are growing fastest for a task such as text generation or speech recognition
- list everything a company or lab has published, and watch for new releases
- find models or datasets with a licence you can use commercially
- build a market map of open models: who publishes what, in which languages, with how much adoption
- feed a weekly report or dashboard by running it on a schedule

### Input

| Field | What it does |
|---|---|
| **What to export** | Models, datasets or Spaces. |
| **Search terms** | One per line, matched against names: `whisper`, `llama`. |
| **Authors** | One per line: a user or organisation such as `openai`, or a link to its page. |
| **Only with these tags** | Only results with every tag listed: `text-generation`, `transformers`, `en`, `license:mit`. |
| **Order** | Most downloaded, most liked, trending, recently updated or newest. |
| **Maximum results per search or author** | Stop after this many for each. Default 100. |

Leave both **Search terms** and **Authors** empty to list the whole Hub in the chosen order, for example the 500 most downloaded text-generation models.

```json
{
    "type": "models",
    "searches": ["whisper"],
    "authors": ["openai"],
    "tags": ["automatic-speech-recognition"],
    "sortBy": "downloads",
    "maxItemsPerSearch": 200
}
```

### Output

One record per model, dataset or Space. A model:

```json
{
    "source": "whisper",
    "type": "model",
    "id": "openai/whisper-base",
    "name": "whisper-base",
    "author": "openai",
    "url": "https://huggingface.co/openai/whisper-base",
    "likes": 313,
    "downloads": 5039568,
    "downloadsAllTime": 55774482,
    "task": "automatic-speech-recognition",
    "library": "transformers",
    "parameterCount": 72593920,
    "languages": ["en", "zh", "de", "es"],
    "baseModels": [],
    "trainedOn": [],
    "gated": false,
    "license": "apache-2.0",
    "tags": ["transformers", "pytorch", "safetensors", "whisper", "automatic-speech-recognition", "license:apache-2.0"],
    "createdAt": "2022-09-26T06:50:46.000Z",
    "lastModified": "2024-02-29T10:26:57.000Z",
    "trendingScore": 0,
    "scrapedAt": "2026-11-12T19:00:00.000Z"
}
```

- `source` is the search term or author the result was found under.
- `downloads` is the count for the last 30 days, as shown on Hugging Face. `downloadsAllTime` is the total.
- `parameterCount` is the model's size in parameters, when its files state it.
- `gated` is `true` when you must accept conditions on Hugging Face before downloading.

A dataset has `title`, `description`, `tasks`, `sizeCategory` and `languages` in place of the model fields. A Space has `title`, `description`, `sdk`, `status`, `hardware`, `appUrl` (the running app) and `models` (the models it uses), and no download counts.

A `SUMMARY` record in the run's key-value store lists, for each search term or author, how many results were saved and any error.

### Pricing

Pay per result. You are charged once for each model, dataset or Space saved to the dataset, at the per-result price shown on this page.

Searches and authors with no results cost nothing. The run stops as soon as it reaches the maximum charge you set for it.

### Limits

- Search matches names, the same way the search box on Hugging Face does. It does not search the text of model cards.
- Fields come from what each author filled in. Licence, languages and parameter count are empty where the author did not state them.
- Only public repositories are listed.
- The Actor reads listings. It does not download model weights, dataset files or the full text of model cards.
- Requests are kept within Hugging Face's published limit for visitors who are not logged in. If the Hub asks the Actor to slow down, it waits.

### Is this allowed?

The Actor uses the public API that Hugging Face provides for listing public repositories, without logging in. You are responsible for how you use the data, including the licence of each model or dataset and Hugging Face's terms of service.

# Actor input Schema

## `type` (type: `string`):

Models, datasets or Spaces (hosted demo apps).

## `searches` (type: `array`):

One per line. Each is matched against names, such as whisper or llama. Leave this and Authors empty to list the whole Hub in the chosen order.

## `authors` (type: `array`):

One per line. A user or organisation name such as openai, or a link to its Hugging Face page. Everything that author has published is listed.

## `tags` (type: `array`):

Only return results that have every tag listed, written as on Hugging Face: a task such as text-generation, a library such as transformers, a language such as en, or a licence such as license:mit.

## `sortBy` (type: `string`):

Which results come first. Spaces have no download count, so for Spaces "Most downloaded" means most liked.

## `maxItemsPerSearch` (type: `integer`):

Stop after this many results for each search term or author.

## Actor input object example

```json
{
  "type": "models",
  "searches": [
    "whisper"
  ],
  "sortBy": "downloads",
  "maxItemsPerSearch": 100
}
```

# Actor output Schema

## `items` (type: `string`):

Every model, dataset or Space saved by the run, one record each.

## `summary` (type: `string`):

Totals for the run and, for each search or author, how many results were saved and any error.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searches": [
        "whisper"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("properscraper/hugging-face-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "searches": ["whisper"] }

# Run the Actor and wait for it to finish
run = client.actor("properscraper/hugging-face-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searches": [
    "whisper"
  ]
}' |
apify call properscraper/hugging-face-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,properscraper/hugging-face-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/WWfat4TBut4k6kdjS/builds/Jxc01sAcauzQ2JoIL/openapi.json
