# Hugging Face Model Intelligence (`atesen-software/huggingface-model-intel`) Actor

Collect public Hugging Face model data: downloads, likes, trending score, license, task, library, languages and model card excerpts. Filter and sort via the official Hub API. No login, no proxy.

- **URL**: https://apify.com/atesen-software/huggingface-model-intel.md
- **Developed by:** [Atesen Software](https://apify.com/atesen-software) (community)
- **Categories:** AI, Developer tools, Automation
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.50 / 1,000 model rows

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 Model Intelligence do?

Hugging Face Model Intelligence collects **public model data from the official [Hugging Face Hub API](https://huggingface.co/docs/hub/api)** and returns it as a clean dataset you can export or schedule. Filter by library, task, license, language and search text, sort by downloads, likes, last update or **trending score**, and get one row per model with:

- model id and public URL
- library, task (pipeline tag), declared license and card languages
- downloads, likes and the upstream `trendingScore`
- last modified date
- an optional short plain-text model card excerpt when the API explicitly reports an ungated repository and a supported standard repository license declaration, with common contact patterns removed

No Hugging Face login, no browser, no paid proxy, no inference service, and no model weights are downloaded.

### Why use it?

- **Spot rising models early**: sort by `trendingScore` and run daily to see what the community is picking up this week.
- **Shortlist by license**: list `apache-2.0` or `mit` text-generation models in a given language before you commit to a stack.
- **Market and investor research**: track adoption (downloads, likes) of a library or task over time by scheduling snapshots.
- **Competitive and ecosystem monitoring**: watch new and recently updated models for a task such as `text-to-image` or `automatic-speech-recognition`.
- **Feed your own tools**: push the dataset to Google Sheets, a database, Slack alerts or an LLM pipeline through Apify integrations and webhooks.

Downloads and likes are upstream popularity signals, not verified users, revenue or quality, and nothing here is investment advice.

### How to collect Hugging Face models

1. Open the **Input** tab.
2. Set optional filters, for example library `transformers`, task `text-generation`, license `apache-2.0`, language `en`. The Hub API combines them; leave a filter empty to broaden the search.
3. Pick a **Sort by** value and bound the work with **Max models** and **Max API pages**.
4. Click **Start**, then download the dataset as JSON, CSV, Excel or HTML. The `SUMMARY` record in the key-value store shows counts, errors and why the run stopped.

### Input

| Field | Default | What it does |
| --- | --- | --- |
| `search` | empty | Text matched against model names. |
| `library` | empty | Library tag such as `transformers`, `diffusers`, `gguf`. |
| `task` | empty | Task tag such as `text-generation`, `text-to-image`. |
| `license` | empty | License id without the `license:` prefix, such as `apache-2.0`. |
| `language` | empty | Language tag such as `en` or `tr`. |
| `maxModels` | 20 | 1 to 10,000 model rows. |
| `pageSize` | 20 | Models per API page, 1 to 100. |
| `maxPages` | 10 | Safety limit on API pages, 1 to 1,000. |
| `sort` | `downloads` | `downloads`, `likes`, `lastModified` or `trendingScore`, always descending. |
| `includeCardSummary` | true | Fetch an eligible public README only (see rights policy below). Turn off for metadata-only runs. |
| `summaryMaxChars` | 600 | Excerpt length, 100 to 2000. |
| `requestDelayMillis` | 500 | Pause before every request, 100 to 10,000. |

Pagination follows the API's cursor `Link` headers and duplicate model ids are removed. Example input:

```json
{
  "library": "transformers",
  "task": "text-generation",
  "license": "apache-2.0",
  "language": "en",
  "sort": "trendingScore",
  "maxModels": 5
}
```

### Output

Each dataset row is one model. Real local result on 2026-10-22 for input `{"search":"all-MiniLM-L6-v2","maxModels":2}` (counts change over time, excerpt shortened):

```json
{
  "modelId": "sentence-transformers/all-MiniLM-L6-v2",
  "modelUrl": "https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2",
  "library": "sentence-transformers",
  "task": "sentence-similarity",
  "license": "apache-2.0",
  "languages": ["en"],
  "downloads": 198627085,
  "likes": 5996,
  "trendingScore": 22,
  "lastModified": "2026-06-01T06:29:13.000Z",
  "cardSummary": "all-MiniLM-L6-v2 This is a sentence-transformers model: It maps sentences & paragraphs to a 384 dimensional dense vector space ...",
  "cardStatus": "available",
  "fetchedAt": "2026-10-22T18:14:52.442Z"
}
```

| Field | Type | Meaning |
| --- | --- | --- |
| `modelId`, `modelUrl` | string | Repository id and public page |
| `library`, `task`, `license` | string or null | Upstream declarations |
| `languages` | string array | Languages declared on the model card |
| `downloads`, `likes` | number or null | Current Hub counts |
| `trendingScore` | number or null | Upstream score; never invented when absent |
| `lastModified` | string or null | Hub timestamp |
| `cardSummary` | string or null | Truncated README excerpt, not an AI summary |
| `cardStatus` | string | `available`, `unavailable` (404), `error`, `disabled`, `restricted` or `rights-unclear` |
| `fetchedAt` | string | UTC collection time |

### How much does it cost?

The Actor uses pay-per-event pricing: **$0.0015 per model row ($1.50 per 1,000 models)**, with no start fee. Rows for valid models whose card is unavailable still count as one result; error details go only to the `SUMMARY` record and are not billed. For comparison, other Hugging Face scrapers on the Store listed about $1 to $3 per 1,000 results when checked on 2026-10-22. The Pricing tab on the Store page is authoritative for the current price. Use the maximum cost per run setting to cap spend; the Actor stops cleanly when the limit is reached. Apify platform usage is included in the event price.

### FAQ

**Which API does it use?**
The public Hub API (`/api/models`) for the list and the public `raw/main/README.md` file of each model for the card excerpt. Nothing private is requested.

**Does it cover datasets or Spaces?**
Not yet. This version returns models only.

**What is `trendingScore`?**
The value Hugging Face reports for how fast a model is gaining attention. Sort by it to see what is rising. It is `null` when the API does not return one.

**Why is `cardSummary` empty for some models?**
A missing README (404) is `unavailable`. Gated or unknown gate status is `restricted`; an absent, custom or unsupported license declaration is `rights-unclear`. These skipped cards are not requested, but their public API metadata can still be returned. HTTP 401/403/429 and detected access challenges stop the run before the affected row or any further request. Models with an empty eligible README return `null`.

**Does it collect personal data?**
No. Model cards are public text, but common e-mail and phone patterns and URL targets are removed from excerpts. The Actor is not designed to collect contact information.

**What happens on errors or rate limits?**
HTTP 401/403/429 and detected access challenges (including challenge pages returned as HTTP 200 or 503) fail the run immediately without retry, fallback, further public requests or emission of the affected row. Existing rows and deduplication state are retained; `STATE` records `access-denied` and `SUMMARY` records the failure. Ordinary card 404 and other non-denial failures remain partial results; list failures fail the run. Transport errors and non-challenge 5xx responses are retried once. Each request has a 20-second timeout.

**Can I schedule it?**
Yes. Use Apify schedules to snapshot downloads and trending scores daily or weekly. Each run starts a fresh collection; the same run restores its `STATE` checkpoint after a restart and skips previously emitted models. `STATE` is saved at page boundaries, charge limits, access denials and on abort.

**Is it legal?**
It reads public Hub endpoints. Public registry metadata is not a download or license grant for model weights, and metadata eligibility does not require an open weight license. Private models are skipped; no private/gated card or weights endpoint is requested.

For optional card text, the conservative policy requires `gated: false` and a declared repository license of `mit`, `apache-2.0`, `bsd-2-clause`, `bsd-3-clause`, `cc0-1.0` or `cc-by-4.0`, without custom `license_name`/`license_link` overrides. Other cards are not downloaded or excerpted. This is a declaration-based filter, not verification that every README is licensed identically to the model. Keep the returned `license`, source `modelUrl` and card status with any excerpt; verify the source license, notices, attribution and modification requirements before further redistribution. Set `includeCardSummary: false` for metadata only.

The [Hugging Face terms](https://huggingface.co/terms-of-service) retain accompanying license conditions and references; the [model-card documentation](https://huggingface.co/docs/hub/model-cards) describes declared and custom license metadata. Accessibility alone is not a blanket reuse license. Declared licenses and languages can be incomplete and are not legal advice.

**Can I call it from code?**
Yes, through the API tab or the Apify client libraries for JavaScript and Python.

### Local development and support

Node.js 22 or later: `npm ci --ignore-scripts`, `npm test` (offline behavioral tests), `apify validate-schema`, and `apify run --input-file input.json`. Dependencies are pinned in the lockfile; an indirect SDK FTP dependency is overridden to `basic-ftp` 6.2.3 for GHSA-c475-qrg2-pj4r.

Report reproducible problems in the Store Issues tab with the input you used. This Actor is independent and is not affiliated with or endorsed by Hugging Face.

# Actor input Schema

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

Optional text matched against model names, for example `llama` or `whisper`. Leave empty to browse all models.

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

Optional library tag, for example `transformers`, `diffusers`, `gguf`, `sentence-transformers`, `onnx`.

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

Optional task tag, for example `text-generation`, `text-to-image`, `automatic-speech-recognition`, `sentence-similarity`.

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

Optional license id without the `license:` prefix, for example `apache-2.0`, `mit`, `cc-by-4.0`, `llama3`.

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

Optional language tag from the model card, for example `en`, `tr`, `de`, `zh`.

## `maxModels` (type: `integer`):

Maximum number of model rows to return. Each row is billed as one result.

## `pageSize` (type: `integer`):

Models requested per API page (1 to 100). Usually leave at the default.

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

Safety limit on API pages per run. The run stops at whichever comes first: maxModels or maxPages.

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

Descending sort used by the Hugging Face API. `trendingScore` surfaces models that are rising right now.

## `includeCardSummary` (type: `boolean`):

Fetch a short public README excerpt only for explicitly ungated repositories with a supported standard license declaration. Gated/unknown or unclear-rights cards are skipped; denials stop the run. Turn off for metadata only.

## `summaryMaxChars` (type: `integer`):

Maximum characters of the model card excerpt (100 to 2000).

## `requestDelayMillis` (type: `integer`):

Pause before every request to the Hugging Face API. Raise it if you see rate-limit (429) errors.

## Actor input object example

```json
{
  "search": "",
  "library": "transformers",
  "task": "text-generation",
  "license": "",
  "language": "",
  "maxModels": 10,
  "pageSize": 20,
  "maxPages": 10,
  "sort": "downloads",
  "includeCardSummary": true,
  "summaryMaxChars": 600,
  "requestDelayMillis": 500
}
```

# Actor output Schema

## `dataset` (type: `string`):

Successful model rows

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

Counts, limits and errors

# 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 = {
    "search": "",
    "library": "transformers",
    "task": "text-generation",
    "maxModels": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("atesen-software/huggingface-model-intel").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 = {
    "search": "",
    "library": "transformers",
    "task": "text-generation",
    "maxModels": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("atesen-software/huggingface-model-intel").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 '{
  "search": "",
  "library": "transformers",
  "task": "text-generation",
  "maxModels": 10
}' |
apify call atesen-software/huggingface-model-intel --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,atesen-software/huggingface-model-intel"
        }
    }
}
```

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/1Kq0wUmP38UC8QFPt/builds/FHOi4BwYVRJydFEi5/openapi.json
