# Hugging Face Models, Datasets & Spaces Scraper (`negligible_carrageen/huggingface-hub-scraper`) Actor

Trending, most-downloaded or newest Hugging Face models, datasets and Spaces via the official Hub API: likes, downloads, task, library, license, base model, arXiv papers.

- **URL**: https://apify.com/negligible_carrageen/huggingface-hub-scraper.md
- **Developed by:** [Hussain Ali](https://apify.com/negligible_carrageen) (community)
- **Categories:** AI, Developer tools, Open source
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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 & Spaces Scraper

Export **trending, most downloaded, most liked or newest Hugging Face models, datasets and Spaces** to JSON, CSV, Excel or Google Sheets. Each row has likes, 30-day and all-time downloads, trending score, task (pipeline tag), library, license, languages, base model, parameter count, linked arXiv papers and timestamps.

- Uses the **official public Hugging Face Hub API**. No login, no API token, no cookies, no proxies, no browser.
- Fast: about 100 repos per request, thousands of rows in under a minute.
- Filter by **search text, author or organization, task, and any Hub tag** (gguf, license:mit, language:ur, library:diffusers...).
- Sort by **trending**, downloads, likes, newest or recently updated.

### What can you use it for?

- **AI market research:** track which open models, tasks and libraries are trending this week, and how fast they grow.
- **Model discovery:** find the most downloaded speech recognition, text-to-image or embedding models for a language or license.
- **Competitive tracking:** monitor every model, dataset and Space an organization (meta-llama, mistralai, Qwen, google) publishes.
- **Fine-tune and quantization research:** list all derivatives of a base model through the `baseModels` field.
- **Newsletters and dashboards:** a daily feed of trending AI repos for your newsletter, Slack channel or BI dashboard. Schedule it on Apify.
- **Lead generation:** find active AI teams and builders by what they publish.
- **Dataset sourcing:** find datasets for a task or language, with license and download counts.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `repoType` | select | `model` | `model`, `dataset` or `space` |
| `sort` | select | `trendingScore` | `trendingScore`, `downloads`, `likes`, `createdAt`, `lastModified` (descending) |
| `search` | string | | Text search on repo names, e.g. `llama`, `whisper`, `urdu` |
| `author` | string | | Only repos from this user or organization, e.g. `google` |
| `task` | string | | Models only. Pipeline tag such as `text-generation`, `text-to-image`, `automatic-speech-recognition` |
| `filterTags` | string list | \[] | Tags that must all match, e.g. `gguf`, `license:apache-2.0`, `ur` |
| `minLikes` | integer | 0 | Skip repos with fewer likes |
| `maxItems` | integer | 100 | Stop after this many rows (up to 10,000) |

#### Example input: top trending models

```json
{ "repoType": "model", "sort": "trendingScore", "maxItems": 200 }
```

#### Example input: most downloaded Urdu speech models

```json
{ "repoType": "model", "task": "automatic-speech-recognition", "filterTags": ["ur"], "sort": "downloads", "maxItems": 50 }
```

#### Example input: every dataset from an organization

```json
{ "repoType": "dataset", "author": "HuggingFaceFW", "sort": "downloads", "maxItems": 500 }
```

### Output

| Field | Description |
|---|---|
| `repoType` | model, dataset or space |
| `id`, `name`, `author` | Repo id (owner/name), name, owner |
| `url` | Hugging Face page |
| `likes` | Total likes |
| `downloads` | Downloads in the last 30 days (models and datasets) |
| `downloadsAllTime` | All-time downloads |
| `trendingScore` | Hub trending score at scrape time |
| `task` | Pipeline task (models) or task category (datasets) |
| `library` | transformers, diffusers, gguf, mlx, sentence-transformers... |
| `license` | License id |
| `languages` | Language codes |
| `baseModels` | Base model(s) a fine-tune, quantization, adapter or merge comes from |
| `arxivIds` | Linked arXiv paper ids |
| `datasets` | Training datasets listed in tags |
| `parameters` | Parameter count from safetensors metadata, when published |
| `gated` | false, auto or manual |
| `sdk`, `spaceTitle`, `spaceStage`, `hardware` | Space SDK, title, runtime stage and hardware |
| `description` | Space short description or dataset description (first 500 chars) |
| `tags` | All Hub tags |
| `createdAt`, `lastModified`, `scrapedAt` | ISO timestamps |

#### Example output item

```json
{
  "repoType": "model",
  "id": "openai/whisper-large-v3",
  "name": "whisper-large-v3",
  "author": "openai",
  "url": "https://huggingface.co/openai/whisper-large-v3",
  "likes": 6778,
  "downloads": 3515562,
  "downloadsAllTime": 153221053,
  "trendingScore": 33,
  "task": "automatic-speech-recognition",
  "library": "transformers",
  "license": "apache-2.0",
  "languages": ["en", "zh", "de", "ur"],
  "baseModels": [],
  "arxivIds": ["2212.04356"],
  "parameters": 1543490560,
  "gated": false,
  "createdAt": "2023-11-07T18:41:14.000Z"
}
```

### How much does it cost?

It makes only light API calls and needs no proxy, so platform usage is minimal. A run of a few hundred rows finishes in seconds.

### FAQ

**Do I need a Hugging Face account or token?** No. It reads public data from the official Hub API.

**Can I get private or gated model files?** No. It only returns public metadata. Gated repos are listed with their gating mode, but no files are downloaded.

**Why is `parameters` empty for some models?** Hugging Face only reports parameter counts for repos with safetensors weights. GGUF-only or older repos often have none.

**Why are Space download counts empty?** The Hub does not publish download counts for Spaces. Sort Spaces by trending or likes.

**Can I run it every day?** Yes. Create a schedule in Apify Console and export each run to Google Sheets, a webhook or your database.

**Is this allowed?** It uses Hugging Face's documented public API and only public metadata, at a gentle request rate.

### Related actors

- [Hacker News Who's Hiring Jobs](https://apify.com/negligible_carrageen/hn-hiring-jobs)
- [Show HN & Launch HN Startup Launches](https://apify.com/negligible_carrageen/show-hn-launches)
- [npm & PyPI Package Stats](https://apify.com/negligible_carrageen/npm-pypi-package-stats)

# Actor input Schema

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

Models, datasets or Spaces.

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

Order of results (always descending). Spaces cannot sort by downloads.

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

Text search on repo names, e.g. 'llama', 'whisper', 'urdu'. Leave empty for all.

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

Only repos owned by this user or org, e.g. 'google', 'mistralai'.

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

Pipeline tag, e.g. text-generation, text-to-image, automatic-speech-recognition, image-text-to-text, feature-extraction.

## `filterTags` (type: `array`):

Hub tags that must all be present, e.g. 'gguf', 'license:mit', 'language:ur', 'library:diffusers'.

## `minLikes` (type: `integer`):

Skip repos with fewer likes.

## `maxItems` (type: `integer`):

Stop after this many results.

## Actor input object example

```json
{
  "repoType": "model",
  "sort": "trendingScore",
  "search": "",
  "author": "",
  "task": "",
  "filterTags": [],
  "minLikes": 0,
  "maxItems": 100
}
```

# Actor output Schema

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

One item per Hugging Face repo (model, dataset or Space) in the default dataset.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("negligible_carrageen/huggingface-hub-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("negligible_carrageen/huggingface-hub-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 '{}' |
apify call negligible_carrageen/huggingface-hub-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,negligible_carrageen/huggingface-hub-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/6qUXZ8zesNysKZcV8/builds/QgMZd6RC9GcL5aheX/openapi.json
