# Hugging Face Model Monitor - Hub SHA Watchlist (`technicaldost/huggingface-model-watchlist-monitor`) Actor

Re-check a caller-owned Hugging Face Hub model watchlist for SHA, downloads, license and visibility changes. Uses the public Hub API. Does not download model weights. You only pay for successful checks you receive.

- **URL**: https://apify.com/technicaldost/huggingface-model-watchlist-monitor.md
- **Developed by:** [Technical Dost Solutions](https://apify.com/technicaldost) (community)
- **Categories:** Developer tools, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 1,000 successful watchlist results

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 Model Monitor - Hub SHA Watchlist

**Re-check the Hugging Face Hub models you already care about. Get SHA, downloads, license and visibility changes — and skip the rows that did not move.**

This Actor takes a caller-owned list of Hub model IDs, reads the public Hub API, and writes one structured row per model. Pass the previous run's snapshot back in and you get `INITIAL`, `UNCHANGED` or `CHANGED` on every successful check. No Hub token. No weight downloads. No Hub crawl.

***

### What this Actor does

You already know the model IDs (`gpt2`, `owner/name`). You want a scheduled check that tells you when the commit SHA, license, gated flag, download count or visibility moved — without paying a start fee every morning and without pulling gigabytes of weights.

That is the job: a **watchlist monitor**, not a Hub dump scraper.

***

### What you get

```json
{
  "schemaVersion": 1,
  "id": "gpt2",
  "status": "ok",
  "modelId": "gpt2",
  "pipelineTag": "text-generation",
  "libraryName": "transformers",
  "downloads": 18423011,
  "likes": 2144,
  "sha": "607a30d783dfa663caf39e06633721c8d4cfcd7e",
  "lastModified": "2026-04-17T17:44:44.000Z",
  "gated": false,
  "disabled": false,
  "license": "mit",
  "author": "openai-community",
  "changeType": "INITIAL",
  "changedFields": [],
  "checkedAt": "2026-09-06T12:00:00.000Z",
  "sourceUrl": "https://huggingface.co/api/models/gpt2",
  "error": null
}
```

`gpt2` is a public example identifier, not a customer or endorsement. Missing source strings are `null` — never `"N/A"`.

***

### Main use cases

- **Model-card drift.** Catch SHA and license changes on models your product actually loads.
- **Gated / disabled alerts.** See when a watched model becomes gated or disabled.
- **Download and like movement.** Treat Hub counters as a change signal, not a ranking.
- **Scheduled MLOps.** Put the Actor on your own cadence and keep the snapshot in your workflow state.
- **n8n / MCP / backend jobs.** Start the run from a server that holds `APIFY_TOKEN`.

***

### Quick start

```json
{
  "models": ["gpt2"],
  "maxItems": 1
}
```

Run it, open the dataset, and save `NEXT_SNAPSHOT` from the default key-value store.

***

### Repeat workflow

1. Keep one Hub model watchlist per customer or project (1–50 IDs).
2. Start a bounded run. Schedule it yourself if you need a cadence.
3. Save the returned `NEXT_SNAPSHOT` JSON in **your** private state.
4. On the next run pass it as `previousSnapshot` and set `onlyChanges: true`.
5. Route `changeType: CHANGED` rows (SHA, visibility, downloads, license) for review.

No schedules are enabled by default. Snapshots use the run's default storage, never a shared named store. A repeated check without a supplied snapshot is a new initial check.

***

### Input

| Field | Type | Default | What it does |
|---|---|---|---|
| `models` | array | — | 1–50 Hub IDs (`name` or `owner/name`). Duplicates checked once. Letters, digits, `.`, `_`, `-` only. |
| `maxItems` | integer | `50` | 1–50. Must cover all unique IDs; a smaller value is rejected rather than silently dropping IDs. |
| `onlyChanges` | boolean | `false` | Suppress unchanged successful records without charging them. The first observation is still emitted. |
| `previousSnapshot` | object | — | Prior `NEXT_SNAPSHOT` with `schemaVersion: 1`, `kind: "hf-model"`, and a `records` map. |

***

### Pricing

| Event | Price | When it happens |
|---|---|---|
| **Successful watchlist result** | **$0.003** | One successful model check written to the dataset |
| Actor start | none | No custom start fee |

**You are not charged for:** failed requests, parse failures, retries, duplicate IDs, invalid input, or unchanged records suppressed by `onlyChanges`. With `onlyChanges: false`, an unchanged successful refresh is delivered work and is charged. The run stops when `eventChargeLimitReached` is true.

**Worked example.** 50 models every weekday, `onlyChanges: true` after the first run, 4 changed rows/day → about `(4 × $0.003) = $0.012` per run, roughly **$0.26/month** in Actor event charges if that pattern holds.

#### How this compares

| Actor | Price per result | Per-run start | Weights downloaded |
|---|---|---|---|
| **This Actor** | **$0.003** | **none** | No |
| `parseforge/huggingface-model-scraper` (Store card, 2026-09-06) | $0.005 | $0.005 | Dump-oriented listing |

Competitor list prices change. Check the current Store cards before relying on this table. This Actor is a **caller-owned watchlist**, not a Hub catalogue dump.

***

### Using the API

Keep `APIFY_TOKEN` on a protected backend. Set `maxItems` and `maxTotalChargeUsd`.

```bash
curl --fail -X POST "https://api.apify.com/v2/acts/technicaldost~huggingface-model-watchlist-monitor/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"models":["gpt2"],"maxItems":1}'
```

**JavaScript**

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('technicaldost/huggingface-model-watchlist-monitor').call({
    models: ['gpt2'],
    maxItems: 1,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

**Python**

```python
from apify_client import ApifyClient
import os

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("technicaldost/huggingface-model-watchlist-monitor").call(run_input={
    "models": ["gpt2"],
    "maxItems": 1,
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["modelId"], row["sha"], row["changeType"])
```

**n8n.** HTTP Request → `POST https://api.apify.com/v2/acts/technicaldost~huggingface-model-watchlist-monitor/runs` with header `Authorization: Bearer {{$credentials.apifyToken}}`. Poll the run, then read the default dataset and `NEXT_SNAPSHOT`.

**MCP / agents.** Call the Actor asynchronously from a server tool. Do not put the token in the browser or in a public agent transcript.

***

### Limitations

- Public Hub metadata only. Private repositories are written as errors, not guessed.
- Weights, datasets, Spaces and files are out of scope.
- Hub availability and freshness govern results. This is not a ranking, safety, or license-compliance opinion.
- One request at a time, 20 seconds per request, 1.5 MB per response, no automatic retries.
- At most 1,000 snapshot records are retained; `SUMMARY.snapshotPruned` reports eviction.

Not affiliated with or endorsed by Hugging Face.

***

### Related Actors

- [Software End-of-Life Monitor](https://apify.com/technicaldost/software-end-of-life-monitor) — support-window changes on products you already run.
- [crt.sh Certificate Monitor](https://apify.com/technicaldost/crtsh-new-certificate-monitor) — new public TLS certificates for hostnames you already own.

***

### Changelog

See `CHANGELOG.md`. Release 1.0.0 (2026-09-06): caller-owned Hub watchlists, SHA/visibility deltas, isolated snapshots, $0.003 per successful result, no start fee.

# Actor input Schema

## `models` (type: `array`):

One to 50 Hub model IDs (name or owner/name). Duplicates are checked once. Private models are reported as unavailable, not guessed.

## `onlyChanges` (type: `boolean`):

Suppress unchanged successful records without charging them. The first observation is emitted.

## `previousSnapshot` (type: `object`):

Copy the previous run NEXT\_SNAPSHOT JSON here. Keep one snapshot per customer watchlist; no shared server state.

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

Bound successful checks plus item errors to at most this many records.

## Actor input object example

```json
{
  "models": [
    "gpt2"
  ],
  "onlyChanges": false,
  "maxItems": 50
}
```

# Actor output Schema

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

No description

## `nextSnapshot` (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 = {
    "models": [
        "gpt2"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("technicaldost/huggingface-model-watchlist-monitor").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 = { "models": ["gpt2"] }

# Run the Actor and wait for it to finish
run = client.actor("technicaldost/huggingface-model-watchlist-monitor").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 '{
  "models": [
    "gpt2"
  ]
}' |
apify call technicaldost/huggingface-model-watchlist-monitor --silent --output-dataset

```

## MCP server setup

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

```

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/Rl9mOBw6F59o1SaQA/builds/lKrwQXWtWEZHxDOls/openapi.json
