# Hugging Face Model Scraper (`parseforge/hugging-face-model-scraper`) Actor

Scrapes Hugging Face model cards by task, library, license, language, or keyword search. Returns each model as a flat row with downloads, likes, author, tags, and last-modified date.

- **URL**: https://apify.com/parseforge/hugging-face-model-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** AI, Developer tools
- **Stats:** 35 total users, 5 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $4.45 / 1,000 records

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

[![ParseForge](https://raw.githubusercontent.com/ParseForge/apify-assets/main/banner-v4.webp)](https://apify.com/parseforge?fpr=vmoqkp)

### Hugging Face Model Scraper

**Scrape Hugging Face model metadata by task, library, license, or keyword, up to a million models per run.** Every model comes with its downloads, likes, author, tags, and last-modified date. No API token required. Export to CSV, JSON, Excel, or XML.

The Hugging Face Hub lists over a million models, but the web UI limits you to browsing one page at a time. This Actor reads the public model index directly, filtering by pipeline task, library, license, language, or free-text query, and returns every match in a flat, analysis-ready schema. No API key, no OAuth, no rate-limit headaches.

| Who uses it | What they scrape Hugging Face for |
|---|---|
| ML engineers | Find the most-downloaded text-generation models under the Apache 2.0 license. |
| Product managers | Track which model architectures and tasks are gaining traction week over week. |
| Venture capital analysts | Map the open-source AI landscape by library adoption and author activity. |
| Academic researchers | Build a corpus of model cards for a specific language or multimodal task. |

### What it does

This Actor collects Hugging Face model cards by task, library, license, language, or keyword search, and returns each model as a flat row with its metadata and popularity signals.

- 🔍 **Keyword search:** free-text query across model IDs and descriptions.
- 🏷️ **Pipeline task filter:** restrict to text-classification, image-generation, text-generation, and more.
- 📚 **Library filter:** isolate models built with transformers, diffusers, timm, or other frameworks.
- 📜 **License filter:** collect only models with a specific license identifier like mit or apache-2.0.
- 🌐 **Language filter:** narrow results to a primary language tag such as en, zh, or multi.
- 📊 **Popularity sorting:** order by downloads, likes, last-modified date, or trending score.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

### What you can do with Hugging Face data

**📈 Monitor open-source AI trends.**

An ML engineer runs the Actor weekly with task=text-generation and sort=trending to spot which new models are gaining traction before they appear in benchmarks.

**⚖️ Audit license compliance.**

A legal team scrapes all models matching a company's tech stack, filters by license=apache-2.0, and exports the list for due diligence.

**🌍 Map multilingual model coverage.**

A researcher collects every model tagged language=zh or language=multi to analyze the state of Chinese-language NLP on the Hub.

**🏗️ Build a model discovery tool.**

A startup scrapes the full model index, enriches it with computed signals, and powers an internal search engine for their engineering team.

### Why choose this scraper

|  | What you get |
|---|---|
| **No API token** | Reads the public model index; no Hugging Face account or token needed. |
| **Fixed flat schema** | Every model returns the same columns, ready for pandas, Excel, or a database. |
| **Up to 1M rows** | Collect as many models as you need in a single run. |
| **Sort by popularity** | Order results by downloads, likes, last-modified, or trending score. |

### How it compares

No other Store actor targets Hugging Face the same way, so the honest comparison is with the alternatives teams actually weigh.

| | Hugging Face Model Scraper | Build it in-house | By hand |
|---|---|---|---|
| Setup | Run it now, zero config | Days of engineering | None, but hours per pull |
| When Hugging Face changes | Maintained for you | You fix it | You re-learn the page |
| Proxies, retries, anti-bot | Built in | Your problem | Browser only |
| Output | Fixed JSON schema, CSV/Excel export | Whatever you build | Copy-paste |
| Cost | Pay per result | Engineering time | Analyst hours |

### Configure the run

Drive the Actor from a keyword query, pipeline task, library, license, and language, alone or together, and filters run as each model is read so only matches reach your dataset. The Input tab lists every parameter.

A first run with the defaults:

```json
{
  "maxItems": 10
}
```

A larger pull:

```json
{
  "maxItems": 200
}
```

### Pricing

Pay-per-result: **$0.005 per result** collected. You pay only for the results written to your dataset.

| Results collected | Approximate cost |
|---|---|
| 100 results | $0.50 |
| 1,000 results | $5.00 |
| 10,000 results | $50.00 |

New Apify accounts start with $5 in free credit.

### Free users

Free-plan runs return up to 10 results as a preview. [Upgrade your Apify plan](https://console.apify.com/sign-up?fpr=vmoqkp) to collect up to 1,000,000 results per run.

### Run it

1. [Create a free Apify account with $5 in credit](https://console.apify.com/sign-up?fpr=vmoqkp).
2. Open the [Hugging Face Model Scraper](https://apify.com/parseforge/hugging-face-model-scraper?fpr=vmoqkp).
3. Set your inputs and any filters, then click **Start**.
4. Export the results as CSV, Excel, JSON, or XML from the **Dataset** tab.

Run it programmatically through the [Apify API](https://docs.apify.com/api/v2) (`run-sync-get-dataset-items`) or the [ApifyClient](https://docs.apify.com/api/client/js) for JavaScript and Python.

### Use with AI agents (MCP)

Give an AI agent live access to Hugging Face through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/hugging-face-model-scraper"
```

Then prompt it in plain language to run the scraper and read back the results.

### Troubleshooting

**Why am I getting zero results?**

Check that your filters are not too restrictive. Try running with only a query or only a task first. If you combine task, library, and license, the Hub must match all three.

**The run stopped before reaching my maxItems.**

The Hub returned fewer models than your limit. Your filter combination may have exhausted all available matches. Try broadening the filters or removing one.

**Some model fields are empty in my dataset.**

Not every model card fills in every field. Author, license, or language may be blank when the uploader left them unspecified. This is expected.

**The sort order does not look right.**

Confirm you set both 'sort' and 'direction'. The default is downloads descending. If you set direction to 'asc', the least-downloaded models appear first.

### FAQ

| Question | Answer |
|---|---|
| Do I need a Hugging Face API token? | No. This Actor reads the public model listing pages. No account, token, or login is required. |
| How many models can I scrape in one run? | You can set maxItems up to 1,000,000. The Actor will paginate through results until it reaches your limit or the Hub runs out of matches. |
| Can I filter by multiple tasks or libraries at once? | Each filter field accepts a single value per run. To cover multiple tasks, run the Actor once per task and merge the datasets. |
| What does the 'trending' sort option mean? | Trending is a Hugging Face computed score that weights recent downloads and likes more heavily. It surfaces models gaining momentum right now. |
| Does this Actor download model weights or files? | No. It scrapes only the metadata from the model card listing: author, downloads, likes, tags, license, and last-modified date. It does not touch model binaries. |
| Can I scrape private models? | No. This Actor only accesses publicly listed models on the Hugging Face Hub. Private or gated models are not visible. |
| What export formats are supported? | You can export your dataset to CSV, JSON, Excel, or XML from the Apify platform. |
| How do I search for a specific model name? | Use the 'query' field. It performs a free-text search across model IDs and descriptions, so 'llama' will match meta-llama/Llama-3-8B and similar. |

### Related actors

Browse the full [ParseForge collection](https://apify.com/parseforge?fpr=vmoqkp) for more scrapers.

🆘 **Need help?** Email parseforge@protonmail.com with your run ID, your input, and what you expected.

⚠️ **Disclaimer.** This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by Hugging Face, Inc. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

# Actor input Schema

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

Free text search across model IDs and descriptions.

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

Pipeline tag (e.g., text-classification, image-classification, text-generation).

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

Primary library (e.g., transformers, diffusers, timm).

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

License identifier (e.g., apache-2.0, mit, cc-by-4.0).

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

Primary language tag (e.g., en, zh, multi).

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

Sort field: downloads | likes | lastModified | trending.

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

Sort order: desc (-1) or asc (1).

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

How many models to collect per run.

## Actor input object example

```json
{
  "maxItems": 10
}
```

# Actor output Schema

## `results` (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 = {
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/hugging-face-model-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 = { "maxItems": 10 }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parseforge/hugging-face-model-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/yGlIxHKeElRNRSZeX/builds/JtiZnd4vf176nCgZX/openapi.json
