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

Trending, most-downloaded or newest Hugging Face models, datasets and Spaces as flat rows: task, library, downloads, likes, trending score, parameter count, license, languages, gated, base models. Filters and a new-repo monitor.

- **URL**: https://apify.com/hydrocore/huggingface-hub-scraper.md
- **Developed by:** [Hydrocore Data](https://apify.com/hydrocore) (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 $3.60 / 1,000 model saveds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Hub Scraper: Models, Datasets & Spaces

Get trending, most-downloaded, most-liked or newest **Hugging Face models, datasets and Spaces** as one clean table. Each row has task, library, 30-day and all-time downloads, likes, trending score, parameter count, license, languages, gated status, base models and dates, in the same columns for all three repo types. It uses the public Hub API, so you need no token. Sorting happens on Hugging Face, so "top 50 by downloads" is the real top 50 (any extra filters you set, such as min likes, are applied to that ranked list). Turn on monitor mode to get a daily feed of new or newly trending repos.

### ✅ What you get

- Models, datasets and Spaces in one run, one schema (`recordType` tells them apart)
- Native sort: trending, downloads (30 days), likes, newest, recently updated
- Filters: search, author/org, task, library, language, license, created in the last N days, min downloads/likes, skip gated
- Parameter count from safetensors metadata; base models parsed from tags
- Space SDK, runtime status and hardware
- Monitor mode: only repos not returned before
- No login or Hugging Face token

### 💡 Use cases

**Apify Store use cases:** Market research · Developer & security tooling · Feed AI agents & RAG

- AI teams and agents choosing a model: top permissive-license text-generation models by downloads
- Market and VC research: track trending models and the orgs behind them
- Dataset discovery for training and evaluation
- Newsletters and dashboards: daily new trending models/Spaces feed

### 🚀 How to use

1. Pick models, datasets and/or Spaces.
2. Optionally set search, author, task, license or other filters and a sort.
3. Run, then export JSON/CSV/Excel or call via API / MCP.
4. For a feed, enable monitor mode and schedule daily.

### ⚙️ Input

| Field | What it does |
|---|---|
| `repoTypes` | model, dataset, space (default models + datasets). |
| `search / author` | Name search; owner or org. |
| `task / library / language / license` | Hub filters (library: models only; language: models and datasets). |
| `createdWithinDays` | Only repos created recently. |
| `minDownloads / minLikes / excludeGated / excludeKeywords` | Quality filters (never charged when dropped). |
| `sortBy` | trending, downloads, likes, newest, updated. |
| `maxResultsPerType / maxPagesPerType` | Caps (defaults 30 / 10). |
| `onlyNew / monitorKey` | Monitor mode. |

Example input:

```json
{
  "repoTypes": [
    "model"
  ],
  "task": "text-generation",
  "license": "apache-2.0",
  "sortBy": "downloads",
  "minLikes": 100,
  "excludeGated": true,
  "maxResultsPerType": 50
}
```

### ⬆️ Output

One row per model, dataset or Space. Every row has the same keys in the same order; missing values are `null`.

Overview fields:

| Field | Type | Example | Description |
|---|---|---|---|
| `recordType` | string | "model" | model, dataset or space. |
| `repoId` | string | "openai/gpt-oss-20b" | owner/name. Dedupe key (with type). |
| `task` | string | "text-generation" | Model pipeline tag or first dataset task. |
| `library` | string | "transformers" | Model library (transformers, gguf...). |
| `downloads` | integer | 5773637 | Downloads in the last 30 days (models/datasets). |
| `likes` | integer | 5294 | Hub likes. |
| `trendingScore` | number | 21 | Hugging Face trending score. |
| `parameterCount` | integer | 20914757184 | Total parameters from safetensors metadata (models). |
| `license` | string | "apache-2.0" | License id. |
| `createdAt` | string | "2025-08-04T22:33:29.000Z" | Creation time (ISO 8601 UTC). |
| `url` | string | "https://huggingface.co/openai/gpt-oss-20b" | Hub page. |

All 29 fields (in order): `recordType`, `repoId`, `author`, `name`, `title`, `url`, `task`, `library`, `downloads`, `downloadsAllTime`, `likes`, `trendingScore`, `parameterCount`, `license`, `languages`, `isGated`, `gatedMode`, `sizeCategory`, `spaceSdk`, `spaceStatus`, `spaceHardware`, `baseModels`, `tags`, `tagCount`, `createdAt`, `lastModifiedAt`, `description`, `searchQuery`, `scrapedAt`.

Real row from a test run of the current build (the `tags` list is shortened here; `tagCount` shows the full number):

```json
{
  "recordType": "model",
  "repoId": "openai/gpt-oss-20b",
  "author": "openai",
  "name": "gpt-oss-20b",
  "title": null,
  "url": "https://huggingface.co/openai/gpt-oss-20b",
  "task": "text-generation",
  "library": "transformers",
  "downloads": 5773637,
  "downloadsAllTime": 108587332,
  "likes": 5294,
  "trendingScore": 21,
  "parameterCount": 20914757184,
  "license": "apache-2.0",
  "languages": null,
  "isGated": false,
  "gatedMode": null,
  "sizeCategory": null,
  "spaceSdk": null,
  "spaceStatus": null,
  "spaceHardware": null,
  "baseModels": null,
  "tags": [
    "transformers",
    "safetensors",
    "gpt_oss",
    "text-generation",
    "vllm",
    "conversational",
    "arxiv:2508.10925",
    "license:apache-2.0"
  ],
  "tagCount": 15,
  "createdAt": "2025-08-04T22:33:29.000Z",
  "lastModifiedAt": "2025-08-26T17:25:47.000Z",
  "description": null,
  "searchQuery": null,
  "scrapedAt": "2026-11-10T12:43:08.567Z"
}
```

Views: **Overview**, **Model details**, **Spaces & datasets**, **Detailed (all fields)**. Export as JSON, CSV, Excel, XML or HTML from the Storage tab or the API (`/datasets/{id}/items?format=csv&view=overview`). A run summary with per-type status (pages read, rows returned, filtered and already-seen counts, errors) is saved as the `OUTPUT` record in the key-value store.

### 💰 Pricing

Pay per result: **$0.0042 per repo** on the Free plan ($0.004 Bronze, $0.0038 Silver, $0.0036 Gold and above), plus a $0.0005 Actor start. 100 repos ≈ $0.42. Filtered and already-seen repos are free.

### 🔁 Integrations

Works with the Apify API, MCP (AI agents), Make, n8n, Zapier, Google Sheets and webhooks. Field names are stable camelCase, so mappings do not break between runs.

### ❓ FAQ

**Are downloads all-time or monthly?**

`downloads` is the last 30 days as reported by Hugging Face; `downloadsAllTime` is filled when the Hub returns it.

**Why is parameterCount empty for some models?**

It comes from safetensors metadata. Models stored in other formats (GGUF, PyTorch .bin) often do not report it.

**Does it download model files?**

No. It reads only public metadata from the Hub API.

### 🛟 Support

Found a problem or need a field? Open an issue on the Issues tab; we read every issue.

### Changelog

- 1.0 (2026-11-10): first release.

### Ready-made examples

Open one, click **Try for free** and change the inputs to your own:

- [Trending text-generation models on Hugging Face](https://apify.com/hydrocore/huggingface-hub-scraper/examples/trending-text-generation-models-hugging-face)

# Actor input Schema

## `repoTypes` (type: `array`):

Models, datasets and/or Spaces.

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

Text search on repo names, e.g. llama, whisper, ocr. Empty = everything.

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

Only repos from this user or org, e.g. Qwen, meta-llama, google.

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

Model pipeline tag or dataset task, e.g. text-generation, automatic-speech-recognition, image-to-3d.

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

e.g. transformers, gguf, diffusers, mlx, sentence-transformers.

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

ISO code, e.g. en, de, ja. Models and datasets only (Spaces have no language tag).

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

Exact license id, e.g. apache-2.0, mit, cc-by-4.0.

## `createdWithinDays` (type: `integer`):

Only repos created within this many days. 0 = any age.

## `minDownloads` (type: `integer`):

Models/datasets only. Example: 1000.

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

Minimum likes. Example: 50.

## `excludeGated` (type: `boolean`):

Drop repos that require accepting terms.

## `excludeKeywords` (type: `array`):

Drop repos whose id, title or description contains any of these.

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

Hugging Face's own server-side sort, so the top N is exact (extra filters are applied to that ranked list). Spaces have no downloads and use likes.

## `maxResultsPerType` (type: `integer`):

Cap for each of models / datasets / Spaces. Example: 25.

## `maxPagesPerType` (type: `integer`):

100 repos per page; limits how far filters scan.

## `onlyNew` (type: `boolean`):

Return only repos not returned before with the same monitor key, e.g. a daily feed of newly trending models.

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

Separate monitors by key. Example: daily-watch-1.

## Actor input object example

```json
{
  "repoTypes": [
    "model",
    "dataset"
  ],
  "excludeGated": false,
  "sortBy": "trending",
  "maxResultsPerType": 30,
  "maxPagesPerType": 10,
  "onlyNew": false,
  "monitorKey": "default"
}
```

# Actor output Schema

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

Type, repo, task, downloads, likes, trending, parameters, license, dates and link.

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

Base models, library, gated status, languages and tags.

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

Space SDK, status and hardware; dataset size and description.

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

Every field for each row.

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

Run summary: per-type status (pages read, rows returned, errors) and counts of filtered/already-seen rows (never charged).

# 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 = {
    "repoTypes": [
        "model",
        "dataset"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("hydrocore/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 = { "repoTypes": [
        "model",
        "dataset",
    ] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hydrocore/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/gcSIA430dDgumIDWA/builds/pVTcCEIcctShp9Xcs/openapi.json
