AI & LLM data · Developer tools
HuggingFace Scraper — Models, Datasets & Spaces
Export models, datasets, and Spaces from the HuggingFace Hub API — filter by task, library, or author, with a trending snapshot mode — to JSON or CSV. Richer schema than incumbents: downloads, likes, tags, license, last-modified. No login.
Free Apify credit covers a first run. No credit card to try.
What this Actor scrapes
Three repo types, one HuggingFace scraper:
1. Models — downloads, likes, pipeline tag, library name, tags, safetensors parameter count, GGUF file detection, and size-category bucketing. 2. Datasets — task categories, size categories, and language codes parsed from tag prefixes. 3. Spaces — SDK name and runtime stage (RUNNING / SLEEPING / STOPPED) in detail mode.
What we handle for you
- Three repo types in one Actor:
model,dataset,space— pick via therepoTypeselector. - Five sort fields:
downloads,likes,trending,last_modified,created_at(all descending). - Five filter modes: tag list, free-text search, author/org, single-repo deep fetch, or no filter (trending snapshot).
- Optional
includeDetailsmode — calls the per-repo detail endpoint to enrich with safetensors parameter counts, GGUF file detection, and Space runtime stage. - GGUF detection flag and derived
model_size_categorybucket (<1B / 1B-7B / 7B-13B / 13B+) ready for downstream pricing or hardware-fit dashboards. - Dataset tag prefixes auto-parsed into structured arrays:
size_categories:,task_categories:,language:. - Pydantic v2 input validation — at most one filter may be set; invalid input fails fast with a clear error before any network call.
- Exponential backoff on
429and503; honoursRetry-After; max 5 attempts per endpoint call. - Browser fingerprint impersonation via
curl-cffi— no scraper-detectable headers leave the Actor. - Companion to
llm-pricing-monitoras part of the AI Stack Intelligence suite.
Use cases
- AI researcher trend tracking — pull the trending top-100 models weekly and feed a time-series dashboard tracking which model families dominate the Hub.
- Investor adoption monitoring — measure download velocity for specific model families (
pipeline_tag=text-generation+library_name=transformers) to inform AI infrastructure investment theses. - Fine-tuner catalog survey — enumerate every model under a
pipeline_taglikeimage-segmentationto map the open-weights landscape before choosing a base model. - Dataset discovery — filter datasets by
task_categoriesandlanguageto find labelled training corpora for a downstream NLP/vision/audio model. - Hardware-fit analysis — use
safetensors_total_paramsandmodel_size_categoryto filter models that fit a target memory budget before benchmarking. - GGUF availability tracking — set
includeDetails=trueand filter onhas_gguf=trueto find quantized inference-ready models for llama.cpp or LM Studio. - Space monitoring — capture which Spaces are
RUNNINGvsSLEEPINGfor a creator or topic, useful for community health dashboards. - Content creator coverage — feed every model from a popular org like
openaiormeta-llamainto a content pipeline for blog posts or YouTube videos. - Track HuggingFace model downloads over time — schedule recurring runs to build a time-series of download counts and detect fast-movers before they hit mainstream coverage.
Input
Paste this into the Apify Console, or send it as the run input over the API. Proxy settings are on by default; you rarely need to touch them.
| Field | Type | Required | What it does |
|---|---|---|---|
repoType | string | yes | Which HuggingFace Hub repo type to scrape: model, dataset, or space. |
sort | string | no | Sort the list endpoint by this field. trending maps to the HF trendingScore param; last_modified → lastModified; created_at → createdAt. |
filterTags | array | no | Optional tag filter — joined with comma for the HF filter= query param. Example: ["text-generation", "transformers"]. Mutually exclusive with the other three filter inputs. |
searchQuery | string | no | Optional free-text search via the HF search= query param. Mutually exclusive with the other three filter inputs. |
author | string | no | Optional org or user slug via the HF author= query param (e.g. openai). Mutually exclusive with the other three filter inputs. |
repoId | string | no | Optional single-repo deep-fetch in owner/name format. Skips the list endpoint and calls the per-repo detail endpoint directly. Forces detail mode. Mutually exclusive with the other three filter inputs. |
maxResults | integer | no | Maximum number of rows emitted. Ignored in repoId mode (always 1 row). |
includeDetails | boolean | no | If enabled, calls the per-repo detail endpoint for each row to enrich safetensors / siblings / runtime fields. Charged as result-row-detailed ($0.005/row). |
useProxy | boolean | no | Route requests through Apify Proxy (BUYPROXIES94952). The HuggingFace Hub API does not block datacenter IPs — leave disabled unless you are behind a restrictive ISP. |
{
"repoType": "model",
"sort": "downloads",
"maxResults": 100,
"includeDetails": false,
"useProxy": false
} Output
One row per result, schema-validated before it is written. Export JSON, CSV, Excel or XML from the run, or read it over the API.
repo_typerepo_idrepo_ownerrepo_namerepo_urldownloadslikescreated_atlast_modifiedtagsgatedprivatepipeline_taglibrary_namesafetensors_total_paramsmodel_size_category
{
"repo_type": "model",
"repo_id": "openai/whisper-large-v3",
"repo_owner": "openai",
"repo_name": "whisper-large-v3",
"repo_url": "https://huggingface.co/openai/whisper-large-v3",
"downloads": 4932732,
"likes": 5690,
"created_at": "2023-11-07T18:41:14.000Z",
"last_modified": "2024-08-12T10:20:10.000Z",
"tags": [
"transformers",
"safetensors",
"whisper",
"automatic-speech-recognition"
],
"gated": false,
"private": false,
"pipeline_tag": "automatic-speech-recognition",
"library_name": "transformers",
"safetensors_total_params": 1543490560,
"model_size_category": "1B-7B",
"has_gguf": false,
"dataset_size_categories": null,
"dataset_task_categories": null,
"dataset_languages": null,
"space_sdk": null,
"space_runtime_stage": null,
"scraped_at": "2026-05-16T12:00:00+00:00"
} Pricing
| Event | Price | When |
|---|---|---|
| Actor start | $0.20 | Once per run, covers warm-up and proxy session setup. |
| Repo row (list mode) | $0.0020 | Per result written to the dataset. |
| Repo row (detail mode) | $0.0050 | Per result written to the dataset. |
You pay only for results that land. Cap any run with maxTotalChargeUsd. See pricing & billing for worked examples.
Limitations
- Private and gated repos are not accessible. The unauthenticated public API only returns publicly visible data.
- Rate limit: 500 requests per 5 minutes (verified 2026-05-16 via
ratelimit-policyheader). At default page size 100, this allows ~10,000 list rows per 5-min window. Detail mode adds one request per row, halving throughput to ~250 enriched rows per minute. - Spaces never have a
downloadsmetric. The field is alwaysnullforrepo_type=space— verified on both list and detail endpoints. - Sparse Spaces list:
repo_owner,last_modified, andspace_runtime_stagerequire detail mode for Spaces. - Safetensors and GGUF fields need detail mode.
safetensors_total_params,model_size_category, andhas_ggufare only populated whenincludeDetails=true. - No cross-run deduplication. Re-running the same input returns the same repos with refreshed metadata. Use a downstream dedupe pass if you need uniqueness across runs.
- No model card or dataset card markdown content. Only structured metadata fields; the README body is excluded as too noisy for a structured dataset.
- No HuggingFace Inference API calls or model benchmarking. This Actor only scrapes catalog metadata, not model outputs.
- The Apify FREE tier retains run-scoped storage for 7 days only. For longer retention, export your dataset immediately or upgrade to a paid Apify plan.
- Use a trending snapshot weekly to track the rapidly-evolving model leaderboard. Set up an Apify Schedule for a recurring run.
- Cap
maxResultsto what you actually need. The HF Hub has 1M+ models; setting a sensible cap keeps cost and runtime predictable. - Use detail mode sparingly. It is 2.5x the per-row cost and roughly 4x the per-row latency. Prefer list mode for catalog snapshots; flip to detail mode only when you need safetensors, GGUF, or runtime stage.
- Combine with
llm-pricing-monitorto correlate open-weights releases on the Hub with hosted-API price moves.
FAQ
Do I need a HuggingFace account or API token?
What is the difference between list mode and detail mode?
includeDetails=false, $0.002/row) makes one API request per page of 100 rows and returns repo_id, owner, downloads, likes, tags, pipeline_tag, library_name, gated flag, and timestamps. Detail mode (includeDetails=true, $0.005/row) additionally calls the per-repo endpoint to fetch safetensors parameter counts, GGUF file detection, Space runtime stage, and dataset card data. Use detail mode when you need those enriched fields; otherwise list mode gives you 2.5x cheaper rows and faster throughput.How do I get trending models — huggingface trending models export?
filterTags, searchQuery, author, repoId) blank, keep the default sort=downloads, and set maxResults to the top-N you want (e.g. 100). To use the HF native "trending" score instead of download count, set sort=trending.Can I do a HuggingFace dataset export or scrape Spaces too?
repoType input to dataset or space. The same filtering, pagination, and detail-mode features apply across all three repo types. Note that Spaces never carry a downloads count and need detail mode for repo_owner / last_modified / runtime_stage.Why are some fields null on my rows?
repo_owner, last_modified, and runtime entirely — detail mode populates them. The null values are accurate, not bugs.What is GGUF and why detect it?
.gguf sibling file, it can run on consumer hardware without a GPU. Set includeDetails=true and filter your dataset on has_gguf=true to list all inference-ready open-weights models.Is this an HuggingFace API wrapper — how does it differ from `huggingface_hub`?
huggingface_hub Python library is excellent for one-off queries inside your own code. This Actor is designed for the *batched, scheduled, cross-author snapshot* use case: large paginated exports, recurring runs on Apify Schedules, clean CSV/JSON for BI tools and dashboards — without writing or maintaining any scraping infrastructure yourself.Is scraping the HuggingFace Hub legal?
huggingface.co/terms-of-service and your local data-protection rules before using scraped data commercially.Ready to run it?
Open the listing on Apify, paste the input above, and watch rows land. If it ever breaks, it is our problem before it is yours.
Related Actors