Hugging Face Scraper - Models, Datasets & Spaces API
Pricing
from $1.50 / 1,000 result items
Hugging Face Scraper - Models, Datasets & Spaces API
All Hugging Face Hub repo types in one run — models, datasets & Spaces with likes, downloads, trending score, license and tags. Only-new mode for schedules. $1.50 / 1,000 results.
Pricing
from $1.50 / 1,000 result items
Rating
0.0
(0)
Developer
John Huang
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
11 days ago
Last modified
Categories
Security
Limited permissionsShare
Hugging Face Hub Scraper - Models, Datasets & Spaces
Extract public metadata for Hugging Face models, datasets and Spaces in one run — likes, downloads, trending score, pipeline task, license, tags, created/updated dates. Built on the official Hub JSON API. No login, no browser.
Pay-per-event pricing (when enabled by the owner): $1.50 / 1,000 results (result event) + default Actor start ($0.00005). Platform usage is not charged on top when PPE is configured without "+ usage".
Why this Actor
| Capability | Included |
|---|---|
| Models + datasets + Spaces, unified schema | ✅ |
| Sort by trending / likes / downloads / date | ✅ |
| Filter by author, keyword, tags | ✅ |
| Only-new-since-last-run (schedule-friendly) | ✅ |
| Official Hub API, polite rate limit + 429 retry | ✅ |
Use cases
AI trend monitoring · open-model selection · license compliance screening · newsletter / research feeds · investment research.
Input
| Field | Description |
|---|---|
repoTypes | models, datasets, spaces (any combination). Prefill scrapes all three. |
search / author / filterTags | Optional filters (e.g. llama, google, text-generation, license:apache-2.0) |
sort | trendingScore (default), likes, downloads, lastModified, createdAt |
maxItemsPerType | Cap per type (default 50; paginates 100/page via Link header) |
onlyNew | Remember seen IDs in KV store hf-hub-state and return only new repos |
Example:
{ "repoTypes": ["models", "datasets", "spaces"], "sort": "trendingScore", "maxItemsPerType": 50 }
Output
One dataset row per repo: repoType, id, author, url, likes, downloads, trendingScore, pipelineTag, libraryName, sdk, license, gated, tags, createdAt, lastModified, scrapedAt. Views: Overview, Trending leaderboard, License screening, All fields. Run counters and warnings: key-value record RUN_STATS. See sample-output.json.
Pricing notes
- Event
result: one Hub repo (model / dataset / Space) with public metadata — $0.0015 each ($1.50 / 1,000). - Event
apify-actor-start: default start charge. - Respects the run's Max cost per run — the Actor stops when the budget is reached.
- Do not enable both
resultandapify-default-dataset-item(would double-charge).
Use via Apify MCP (Claude, Cursor, Windsurf, Copilot)
This Actor is a normal Store Actor with pay-per-event pricing, so it works with Apify's hosted MCP server and with agentic payments (prepaid tokens / Skyfire-style pay-per-request). Monetization stays on Apify — no Smithery listing required.
Pin this Actor as a tool (recommended for agents):
https://mcp.apify.com?tools=infinite_seascape/hf-hub-trending-scraper
Or let the agent discover it with the default search-actors / call-actor tools at https://mcp.apify.com.
Example agent input (keep maxItemsPerType ≤ 20 — call-actor waits ~30s by default):
{ "repoTypes": ["models"], "sort": "trendingScore", "maxItemsPerType": 10, "filterTags": ["text-generation"] }
After call-actor returns, read rows with get-dataset-items using the run's datasetId. Cap spend with callOptions.maxTotalChargeUsd (not an Actor input field).
Docs: https://docs.apify.com/mcp · Configurator: https://mcp.apify.com/
Run locally
npm install# edit storage/key_value_stores/default/INPUT.jsonnpm start # or: apify run
Compliance
Uses the documented public Hub API (/api/models, /api/datasets, /api/spaces). huggingface.co/robots.txt allows /. 500 ms delay between pages; retry/backoff on 429. No personal data beyond public usernames/org names. Review https://huggingface.co/terms-of-service before commercial use. Not affiliated with Hugging Face.
Tutorial: build a daily AI trend radar from Hugging Face in 10 minutes
Goal: every morning, get the Hugging Face models, datasets and Spaces that started trending since yesterday — as JSON/CSV, a Google Sheet, or a Slack message.
Actor: Hugging Face Hub Scraper - Models, Datasets & Spaces (infinite_seascape/hf-hub-trending-scraper). Pricing: $1.50 per 1,000 results (+ $0.00005 per run start).
1. First run: see what's trending
Input:
{ "repoTypes": ["models", "datasets", "spaces"], "sort": "trendingScore", "maxItemsPerType": 20 }
You get 60 rows (20 per type) with repoType, id, likes, downloads, trendingScore, pipelineTag, license, tags, lastModified, url. Open the Overview view in the Output tab.
Cost: 60 results × $0.0015 ≈ $0.09.
2. Narrow it down
- Only text-generation models with a permissive license:
{ "repoTypes": ["models"], "filterTags": ["text-generation", "license:apache-2.0"], "sort": "trendingScore", "maxItemsPerType": 50 }
- One organisation:
"author": "google"(a fullhttps://huggingface.co/googleURL also works). - Keyword:
"search": "embedding". Tip: the Hub API is sometimes slow for trending + search; the Actor automatically retries sorted by likes and tells you in the log.
3. Turn on "only new"
{ "repoTypes": ["models", "datasets", "spaces"], "sort": "trendingScore", "maxItemsPerType": 50, "onlyNew": true }
The Actor remembers every repo it has returned (key-value store hf-hub-state) and on the next run outputs only repos it hasn't seen. You pay only for new results.
4. Schedule it
Console → Schedules → Create → cron 0 7 * * * (daily 07:00) → add this Actor with the input above.
5. Send results somewhere
Actor → Integrations: Slack, Google Sheets, Zapier, Make, n8n or a webhook on Run succeeded. Or call the API:
curl "https://api.apify.com/v2/acts/infinite_seascape~hf-hub-trending-scraper/run-sync-get-dataset-items?token=<YOUR_TOKEN>" \-H 'Content-Type: application/json' -d '{"repoTypes":["models"],"maxItemsPerType":10}'
6. Keep costs predictable
Set Max cost per run (e.g. $0.20). The Actor stops cleanly when the budget is reached and says so in the status message.
Good to know
- Data comes from the official public Hub API; no login, no private repos.
downloadsis the Hub's recent-downloads figure (not shown for Spaces).- Not affiliated with Hugging Face.