# Hugging Face Scraper — Models, Datasets & Licenses (`felixgoldwin/hugging-face-scraper`) Actor

Extract public Hugging Face model and dataset metadata: downloads, likes, tasks, tags, licenses and update dates. Search by keyword or owner. No account required.

- **URL**: https://apify.com/felixgoldwin/hugging-face-scraper.md
- **Developed by:** [Felix GoldWin](https://apify.com/felixgoldwin) (community)
- **Categories:** 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 $1.00 / 1,000 repositories

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

### What does Hugging Face Scraper do?

Search and export **public Hugging Face model and dataset metadata** for AI research, catalog building, and popularity monitoring. Find repositories by name, owner, or tags; compare downloads and likes; and collect task, library, license, language, and update information.

No Hugging Face account or API token is required. The Actor collects catalog metadata through the public Hub API. It does **not** download model weights, dataset rows, or repository files. Results can be downloaded as JSON, CSV, or Excel, scheduled in Apify, or accessed through the Apify API.

**Price: $1 per 1,000 delivered repository records, plus $0.005 per run. Platform usage is included.**

### What data can you extract?

Each dataset row represents one model or dataset repository. Fields absent from the source are `null` or empty arrays.

| Fields | Description |
| --- | --- |
| `resourceType`, `repositoryId`, `name` | Repository type, full Hub identifier, and name |
| `author`, `url` | Public owner name and repository page |
| `downloads`, `likes` | Hub-reported downloads over the rolling 30-day window, and current likes |
| `pipelineTag`, `libraryName` | Model task and library when available |
| `tags`, `licenses`, `languages` | Source labels and extracted license/language tags |
| `taskCategories`, `sizeCategories` | Dataset classification labels when available |
| `gated`, `private`, `disabled` | Source access and availability flags |
| `createdAt`, `lastModified`, `revision` | Source timestamps and revision identifier |
| `fileCount` | Number of file entries reported by the catalog, when provided |
| `scrapedAt` | UTC time when the record was collected |

Metadata for publicly listed gated repositories is included by default. This does not grant access to their files. Set `excludeGated` to remove records marked as gated. License values are labels reported by the source, not a determination of permission to use a model or dataset. This is an independent tool, not an official Hugging Face product.

### How to scrape Hugging Face

1. Choose models, datasets, or both.
2. Enter an optional repository search term, owner, or tags.
3. Choose a sort order and result limit.
4. Run the Actor and inspect the dataset and `SUMMARY` coverage record.
5. Download the results or connect them to your workflow through Apify integrations.

The default input collects up to 1,000 public models ordered by downloads, highest first.

### Input examples

Find Qwen models:

```json
{
  "resourceType": "models",
  "search": "Qwen",
  "sortBy": "downloads",
  "order": "desc",
  "maxItems": 1000,
  "maxPages": 150
}
```

Find English-language datasets with an Apache 2.0 license tag:

```json
{
  "resourceType": "datasets",
  "tags": ["language:en", "license:apache-2.0"],
  "excludeGated": true,
  "maxItems": 500,
  "maxPages": 150
}
```

Monitor recently updated repositories of both types:

```json
{
  "resourceType": "both",
  "sortBy": "lastModified",
  "order": "desc",
  "maxItems": 2000,
  "maxPages": 150
}
```

These examples request maximum counts; they do not guarantee that enough matching repositories exist.

### Input fields

| Input | Default | Details |
| --- | --- | --- |
| `resourceType` | `"models"` | `models`, `datasets`, or `both` |
| `search` | `""` | Repository search text, up to 200 characters; empty lists matching repositories |
| `author` | `""` | Exact Hub owner name, up to 96 letters, numbers, underscores or hyphens, beginning with a letter or number |
| `tags` | `[]` | Exact source tags; all specified tags must match |
| `sortBy` | `"downloads"` | `downloads`, `likes`, or `lastModified` |
| `order` | `"desc"` | `desc` for highest/newest first, or `asc` for lowest/oldest first |
| `excludeGated` | `false` | Exclude repositories marked as gated |
| `minDownloads` | `0` | Minimum reported downloads; zero disables this filter |
| `minLikes` | `0` | Minimum reported likes; zero disables this filter |
| `maxItems` | `1000` | Global maximum unique output records, from 1 through 10,000 |
| `maxPages` | `150` | Global maximum logical search requests, from 1 through 500 |

Search text, owner names, and tags are trimmed. Tags preserve their case and are deduplicated. Each tag must be nonempty, at most 100 characters, and contain no commas or control characters. Up to 50 unique tags are allowed, with at most 1,000 input entries before deduplication. Minimum counts must be integers from 0 through 1,000,000,000,000. Unknown input fields and incorrect types are rejected.

Tags use **AND** matching: `language:en` together with `license:apache-2.0` requires both labels. Search, owner, and tag filters are combined. Minimum downloads, minimum likes, and gated filtering are applied by the Actor while scanning source results. Filtered records are not charged as results. The Actor continues scanning until a run limit or the source end; it does not assume a low count means all later records will fail the filter.

In `both` mode, the Actor alternates pages between models and datasets, starting with models. `maxItems` and `maxPages` apply across both types together. Ordering is preserved within each source result stream, but the combined dataset is not a single global ranking, and it does not guarantee an equal number of models and datasets. With a small result limit, the first model page may fill the entire export.

### Pagination and coverage

The Actor follows the Hub API's cursor pagination, so exports can exceed 1,000 repositories when enough matching records are accessible. `maxItems` remains a limit, not a promised count. Filters, source availability, rate limits, the request budget, and your Apify spending limit may produce fewer results.

`maxPages` counts search requests across both resource types, including pages scanned to find matching records. HTTP retries do not consume an additional logical page. Restrictive count or gated filters can require many pages; check the summary before raising limits.

The Hub catalog changes while a run is in progress. Deduplication prevents repeated repository records within a run, including resumed runs, but no live traversal can guarantee a perfectly complete snapshot. Source errors, repeated pages or cursors, and request limits are reported in `SUMMARY`. The Actor respects source rate limits and may stop with partial results if the source remains unavailable.

### Output and diagnostics

The default dataset contains repository records. The `SUMMARY` record in the default key-value store reports saved records, scanned pages, input duplicates removed, and per-resource counts for scanned, filtered, duplicate, and saved records. It also reports errors and stop reasons. Inspect it whenever a run returns fewer results than expected.

Repository metadata describes the Hub's current public catalog. Download and like counts can change, tags may be incomplete, and a license or file-count field may be unavailable.

### Pricing

The price is **$0.001 per repository record delivered**, plus **$0.005 for starting a run**, with platform usage included.

- 100 delivered records: **$0.105**.
- 1,000 delivered records: **$1.005**.
- Empty results: **$0.005**, with no result charge.

Filtered records, duplicates removed within a run, failed requests, and the summary are not charged as results. Each new scheduled run is charged for the records it delivers, even if an earlier run delivered the same repositories. Use Apify's spending limit to control the maximum charge.

### FAQ and support

#### Does this download models or datasets?

No. It exports catalog metadata only. It does not download weights, data rows, or repository files, and it does not access private repositories or bypass gated access.

#### Can I schedule monitoring or use an API?

Yes. Use Apify schedules for repeated snapshots and the Actor's **API** tab for integration examples. Export JSON, CSV, or Excel, or connect results to other tools through Apify integrations.

#### Why did I receive fewer records than requested?

Your filters may match fewer repositories, many scanned records may fail the minimum-count filters, or a source, page, or spending limit may stop the run. Inspect `SUMMARY` for the recorded reason.

#### How do I report a problem?

Open the Actor's **Issues** tab with the run URL, relevant input filters, and the result you expected. Do not include tokens, credentials, or private repository data.

# Actor input Schema

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

Choose models, datasets, or both. Both alternates one page of models and one page of datasets; all limits are global.

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

Optional search text matched against repository names by Hugging Face. Leave empty to browse the catalog.

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

Optional Hugging Face username or organization, for example Qwen or google-bert. This filters repositories and does not collect user profiles.

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

Exact source tags, all required (AND). Examples: text-generation, license:apache-2.0, or language:en for datasets. Up to 50 unique tags. Do not put commas inside one tag.

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

Source ordering within each repository type. Downloads are the source-reported recent download count.

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

Descending puts largest counts or most recently modified repositories first; ascending reverses the order.

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

Only include repositories explicitly marked as ungated. The Actor always retrieves public metadata only, never gated files.

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

Minimum source-reported download count. Applied to retrieved metadata; zero disables the filter. Scanning filtered rows still uses the page budget.

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

Minimum source-reported likes. Applied to retrieved metadata; zero disables the filter. Missing counts do not match a positive minimum.

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

Maximum unique repository metadata records across the entire run, including both types. A limit, not a guaranteed count.

## `maxPages` (type: `integer`):

Global logical page-request limit, including pages whose rows are filtered out. Each source page contains up to 100 repositories. HTTP retries do not count.

## Actor input object example

```json
{
  "resourceType": "models",
  "search": "",
  "author": "",
  "tags": [],
  "sortBy": "downloads",
  "order": "desc",
  "excludeGated": false,
  "minDownloads": 0,
  "minLikes": 0,
  "maxItems": 1000,
  "maxPages": 150
}
```

# Actor output Schema

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

No description

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

No description

# 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("felixgoldwin/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 = {}

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

```

## MCP server setup

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