# Hugging Face Models Scraper — Search, Downloads, Likes, Tags (`seemuapps/huggingface-models-scraper`) Actor

Search Hugging Face for models by task, tag, or keyword and export downloads, likes, library, license, and tags to a clean dataset.

- **URL**: https://apify.com/seemuapps/huggingface-models-scraper.md
- **Developed by:** [Andrew](https://apify.com/seemuapps) (community)
- **Categories:** Developer tools, AI, Agents
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 models

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Hugging Face Models Scraper — Search, Downloads, Likes, Tags

Search the Hugging Face Hub for machine learning models by task, library, or keyword and export downloads, likes, license, and tags to a clean dataset. No login required.

### What you get

- Model ID, author, model name, and direct Hugging Face URL for every result
- Pipeline task tag (text-generation, text-to-image, summarization, etc.) and library name (transformers, diffusers, sentence-transformers, peft, timm…)
- All Hub tags — useful for filtering by license, language, base model, dataset, or framework
- 30-day download count, likes count, and trending score
- Gated / private flags so you can spot restricted models
- Created and last-modified timestamps for freshness tracking
- Direct export to JSON, CSV, Excel, or Google Sheets

### Use cases

- ML / model market research — measure popularity and adoption of open-source models
- Competitor tracking — monitor downloads and likes for models in your space (LLMs, image generation, embeddings, etc.)
- Build a model catalog — power an internal tool, blog post, or product comparison with up-to-date Hub metadata
- Lead generation — discover authors and organizations publishing in a specific task or library
- License audit — surface every tag (`license:apache-2.0`, `license:mit`, `license:llama3`, …) across a curated list

### How to use

1. Enter a **Search query** (e.g. `llama`, `stable-diffusion`, `whisper`) — or leave empty to browse the whole Hub
2. Optionally pick a **Pipeline task** to narrow to a single task type
3. Optionally enter a **Library filter** (`transformers`, `diffusers`, `sentence-transformers`, `peft`, `timm`, …)
4. Pick a **Sort by** field (Downloads, Likes, Recently updated, Recently created, Trending) and a **Sort direction**
5. Set **Max items** — the actor auto-paginates the Hugging Face Hub API to collect them
6. Run the actor — one model per row in the **Dataset** tab

### Output format

One model per dataset row — perfect for direct CSV, Excel, or Google Sheets export:

```json
{
  "id": "meta-llama/Llama-3.1-8B",
  "author": "meta-llama",
  "modelName": "Llama-3.1-8B",
  "huggingfaceUrl": "https://huggingface.co/meta-llama/Llama-3.1-8B",
  "pipelineTag": "text-generation",
  "libraryName": "transformers",
  "tags": ["transformers", "safetensors", "llama", "text-generation", "en", "license:llama3.1"],
  "downloads": 2845123,
  "likes": 5421,
  "gated": "manual",
  "private": false,
  "createdAt": "2024-07-22T18:30:00.000Z",
  "lastModified": "2025-09-14T10:12:33.000Z",
  "trendingScore": 87.4,
  "scrapedAt": "2026-05-23T12:34:56.000Z"
}
````

### Input options

| Field | Type | Description |
|-------|------|-------------|
| Search query | string | Free-text search across model IDs and descriptions — optional |
| Pipeline task | enum | Restrict to a Hugging Face pipeline tag (text-generation, text-to-image, …) — optional |
| Library filter | string | Restrict to a single library (`transformers`, `diffusers`, `sentence-transformers`, …) — optional |
| Sort by | enum | Downloads, Likes, Recently updated, Recently created, Trending — default Downloads |
| Sort direction | enum | Descending (most first) or Ascending (least first) — default Descending |
| Max items | integer | Total models to collect across paginated calls — default 100, max 5000 |

# Actor input Schema

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

Free-text search across model IDs and descriptions. Leave empty to list every model in the Hub (filtered by task/library if set).

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

Restrict results to a Hugging Face pipeline task tag.

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

Restrict to models that declare a specific library — e.g. transformers, diffusers, sentence-transformers, peft, timm. Leave empty for any library.

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

Field to sort the results by.

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

Descending (-1) returns the most downloads/likes/etc. first; ascending (1) returns the least.

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

Total number of models to fetch across paginated calls. Hugging Face returns 100 per page; this actor follows the Link header automatically.

## Actor input object example

```json
{
  "query": "llama",
  "task": "",
  "sort": "downloads",
  "direction": "-1",
  "maxItems": 100
}
```

# Actor output Schema

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

One row per model: id, author, modelName, huggingfaceUrl, pipelineTag, libraryName, tags, downloads (30-day), likes, gated, private, createdAt, lastModified, trendingScore, scrapedAt.

# 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 = {
    "query": "llama"
};

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

# Run the Actor and wait for it to finish
run = client.actor("seemuapps/huggingface-models-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "query": "llama"
}' |
apify call seemuapps/huggingface-models-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=seemuapps/huggingface-models-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Hugging Face Models Scraper — Search, Downloads, Likes, Tags",
        "description": "Search Hugging Face for models by task, tag, or keyword and export downloads, likes, library, license, and tags to a clean dataset.",
        "version": "1.0",
        "x-build-id": "huLthO7ZObrHgg2Tl"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/seemuapps~huggingface-models-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-seemuapps-huggingface-models-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/seemuapps~huggingface-models-scraper/runs": {
            "post": {
                "operationId": "runs-sync-seemuapps-huggingface-models-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/seemuapps~huggingface-models-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-seemuapps-huggingface-models-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "query": {
                        "title": "Search query",
                        "type": "string",
                        "description": "Free-text search across model IDs and descriptions. Leave empty to list every model in the Hub (filtered by task/library if set)."
                    },
                    "task": {
                        "title": "Pipeline task",
                        "enum": [
                            "",
                            "text-generation",
                            "text-classification",
                            "text-to-image",
                            "image-classification",
                            "object-detection",
                            "automatic-speech-recognition",
                            "translation",
                            "summarization",
                            "question-answering",
                            "feature-extraction",
                            "fill-mask",
                            "zero-shot-classification",
                            "sentence-similarity"
                        ],
                        "type": "string",
                        "description": "Restrict results to a Hugging Face pipeline task tag.",
                        "default": ""
                    },
                    "library": {
                        "title": "Library filter",
                        "type": "string",
                        "description": "Restrict to models that declare a specific library — e.g. transformers, diffusers, sentence-transformers, peft, timm. Leave empty for any library."
                    },
                    "sort": {
                        "title": "Sort by",
                        "enum": [
                            "downloads",
                            "likes",
                            "lastModified",
                            "createdAt",
                            "trendingScore"
                        ],
                        "type": "string",
                        "description": "Field to sort the results by.",
                        "default": "downloads"
                    },
                    "direction": {
                        "title": "Sort direction",
                        "enum": [
                            "-1",
                            "1"
                        ],
                        "type": "string",
                        "description": "Descending (-1) returns the most downloads/likes/etc. first; ascending (1) returns the least.",
                        "default": "-1"
                    },
                    "maxItems": {
                        "title": "Max items",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Total number of models to fetch across paginated calls. Hugging Face returns 100 per page; this actor follows the Link header automatically.",
                        "default": 100
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
