Hugging Face Scraper — Models, Datasets & Spaces avatar

Hugging Face Scraper — Models, Datasets & Spaces

Pricing

from $6.00 / 1,000 results

Go to Apify Store
Hugging Face Scraper — Models, Datasets & Spaces

Hugging Face Scraper — Models, Datasets & Spaces

All-in-one Hugging Face Hub scraper. Paste any URL or text query — auto-detects model, dataset, space, paper, user, org, or collection. Deep model card, lineage, evaluation results, dataset configs. MCP-ready. $0.006 per result.

Pricing

from $6.00 / 1,000 results

Rating

0.0

(0)

Developer

Khadin Akbar

Khadin Akbar

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

8 days ago

Last modified

Share

Hugging Face Scraper is an Apify Actor for structured Hugging Face Hub lookups. Paste a Hugging Face URL or a text query, and the Actor auto-detects the target type and returns one record per resolved entity. For a single model, dataset, space, or paper URL, that means one deep record with fields such as downloads, likes, license, tags, language, lastModified, README text, lineage, evaluation results, or dataset config details. For user, org, and collection targets, it returns a bounded list of portfolio or collection records. The Actor is usable through Apify MCP.

Best fit and connected workflows

This Actor fits workflows where Hugging Face data needs to stay structured and machine-readable.

Use it when you want to:

  • inspect a specific model, dataset, space, paper, user, organization, or collection from its canonical URL,
  • search by text such as a model name, task, or library and get ranked results,
  • review a Hugging Face user or organization together with portfolio counts and listed entities,
  • open a collection and retrieve the collection metadata plus its items,
  • extract paper metadata including authors, ArXiv ID, publication date, upvotes, and comment count.

Practical scenario

A machine learning engineer receives a link to https://huggingface.co/meta-llama/Llama-3.1-8B and wants to decide whether to add it to an internal registry. They run this Actor with that URL as the target. The returned record includes the model ID, author namespace, downloads, likes, pipeline tag, library name, license, base-model lineage, dataset citations, and model-index evaluation data. With those fields, they can verify the model identity, review its provenance, and continue with their registry import or review step.

Input

FieldTypePurpose
targetsarray of stringsHugging Face URLs or plain-text queries. Each item is auto-detected as a model, dataset, space, paper, user, org, collection, or search target.
entityTypestringEntity type for text queries: models, datasets, spaces, papers, or all. Ignored for URLs.
resultsPerTargetintegerMaximum records per target. Single entity URLs return one deep record. Search, user, org, and collection targets return up to this cap.
sortBystringSort order for queries and portfolio listings: downloads, likes, modified, or trending.
filterTaskstringFilters model search queries by pipeline tag such as text-generation.
filterLibrarystringFilters model search queries by library name such as transformers.
filterLanguagestringFilters model and dataset queries by language code such as en or multilingual.
includeReadmebooleanWhen true, includes full Markdown README text for models, datasets, and spaces.
responseFormatstringconcise returns a compact record shape. detailed returns the full parsed record.
proxyConfigurationobjectApify proxy settings. The default Apify datacenter pool works for this Actor.

Focused JSON input example

{
"targets": [
"https://huggingface.co/meta-llama/Llama-3.1-8B",
"qwen 3 instruct"
],
"entityType": "models",
"resultsPerTarget": 10,
"sortBy": "downloads",
"filterTask": "text-generation",
"filterLibrary": "transformers",
"filterLanguage": "en",
"includeReadme": true,
"responseFormat": "detailed",
"proxyConfiguration": {
"useApifyProxy": true
}
}

Output

Each dataset item includes an itemType discriminator so consumers can branch by entity shape.

FieldTypeMeaning
itemTypestringEntity type such as model, dataset, space, paper, user, org, collection, collection_item, or search_result.
idstring or nullCanonical Hugging Face ID.
urlstringCanonical Hugging Face URL.
authorstring or nullNamespace or author.
downloadsinteger or nullDownload count for models and datasets.
likesinteger or nullCommunity likes count.
trendingScorenumber or nullHugging Face trending score.
pipelineTagstring or nullModel task tag.
libraryNamestring or nullML library name.
licensestring or nullLicense identifier.
tagsarray of stringsHugging Face tags.
languagearray of stringsLanguage codes.
lastModifiedstring or nullISO 8601 timestamp.
createdAtstring or nullISO 8601 creation timestamp.
privateboolean or nullVisibility flag.
gatedstring, boolean, or nullGating status.
disabledboolean or nullDisabled flag.
siblingsarray of objectsRepo files for models and datasets.
modelIndexarray or nullParsed evaluation results from model cards.
baseModelsarray of stringsParent or base model IDs.
adapterChildrenarray of stringsKnown adapter or finetune descendants.
quantizedChildrenarray of stringsKnown quantized descendants.
datasetsUsedarray of stringsDataset IDs cited in model card metadata.
taskCategoriesarray of stringsDataset task categories.
sizeCategoriesarray of stringsDataset size buckets.
configsarray of objectsDataset configs and splits with row counts.
sdkstring or nullSpace SDK.
hardwarestring or nullSpace runtime hardware.
runtimeStagestring or nullSpace runtime stage.
titlestring or nullPaper title or display name for users, orgs, and collections.
summarystring or nullPaper abstract or collection description.
authorsarray of objectsPaper authors with HF user links when available.
arxivIdstring or nullArXiv ID.
publishedAtstring or nullPaper publication date.
upvotesinteger or nullPaper upvotes.
commentsCountinteger or nullPaper discussion count.
fullnamestring or nullUser display fullname.
avatarUrlstring or nullAvatar or logo URL.
followersinteger or nullFollower count.
followinginteger or nullFollowing count.
isProboolean or nullPRO subscriber flag.
orgsarray of stringsOrganizations the user belongs to.
modelsCountinteger or nullNumber of models in a portfolio.
datasetsCountinteger or nullNumber of datasets in a portfolio.
spacesCountinteger or nullNumber of spaces in a portfolio.
collectionSlugstring or nullCollection slug.
itemsarray of objectsCollection items.
readmestring or nullFull Markdown README when included.
cardDataobject or nullParsed YAML front matter.
_warningsarray of stringsNon-fatal extraction notes.

Illustrative JSON output record

{
"itemType": "model",
"id": "meta-llama/Llama-3.1-8B",
"url": "https://huggingface.co/meta-llama/Llama-3.1-8B",
"author": "meta-llama",
"downloads": 12345678,
"likes": 4321,
"pipelineTag": "text-generation",
"libraryName": "transformers",
"license": "llama3.1",
"tags": ["llama-3", "text-generation", "facebook"],
"language": ["en"],
"lastModified": "2026-04-22T18:51:00.000Z",
"private": false,
"gated": false,
"disabled": false,
"siblings": [{ "rfilename": "config.json", "size": 1234, "lfs": null }],
"modelIndex": [{ "name": "...", "results": [] }],
"baseModels": [],
"adapterChildren": ["someone/llama-3.1-8b-lora-medical"],
"quantizedChildren": ["bartowski/Meta-Llama-3.1-8B-GGUF"],
"datasetsUsed": ["allenai/c4", "EleutherAI/pile"],
"readme": "# Model Card for Llama 3.1 8B..."
}

How it works

The Actor uses Hugging Face public API endpoints and raw README fetches to build structured records. It auto-detects entity type from each target path when a URL is provided. For text queries, it searches the entity type you select and can return models, datasets, spaces, papers, or the combined model, dataset, and space union when entityType is set to all. For model records, it also parses lineage and evaluation metadata from the card. For datasets, it returns configs, splits, and row counts. For spaces, it captures SDK, hardware, and runtime stage. For users, orgs, and collections, it returns portfolio or item lists with the same record structure.

Pricing

This Actor uses Apify's Pay per event pricing model plus standard Apify platform usage. The primary billed event is each Result record pushed to the dataset. Actor start is also billed as a one-time event based on the Actor's memory allocation.

For example, if a run returns ten records, the execution includes ten Result events plus one Actor Start event.

For the current live pricing details, open the Pricing tab in the Apify Console.

Use with AI agents (MCP)

This Actor is available through Apify MCP as a structured Hugging Face data tool. The exact Actor identity is khadinakbar/huggingface-all-in-one-scraper.

Tool description: fetch canonical Hugging Face metadata, portfolio records, collection items, and deep card fields for URLs or search queries, with compact or detailed record shapes.

Fetch the Hugging Face model card for https://huggingface.co/meta-llama/Llama-3.1-8B, include the full README, and return a concise record with downloads, likes, license, pipeline tag, lineage, and evaluation fields.

Output interpretation:

  • itemType tells the agent which schema branch to read.
  • id and url identify the entity.
  • downloads, likes, and lastModified support ranking and freshness checks.
  • modelIndex, baseModels, adapterChildren, quantizedChildren, and datasetsUsed are the model provenance fields.
  • configs and taskCategories are the dataset-specific fields.
  • sdk, hardware, and runtimeStage are the Space-specific fields.
  • readme contains the source card text when requested.
  • _warnings can surface partial extraction notes.

Pagination and cost guidance:

  • Single entity URLs return one deep record.
  • Search, user, org, and collection targets can return multiple records up to resultsPerTarget.
  • responseFormat: "concise" keeps records smaller for agent loops.
  • includeReadme: false reduces per-record fetch work for bulk search tasks.

Use from code

JavaScript

const { ApifyClient } = require('apify-client');
const client = new ApifyClient({
token: process.env.APIFY_TOKEN
});
const run = await client.actor('khadinakbar/huggingface-all-in-one-scraper').call({
targets: [
'https://huggingface.co/meta-llama/Llama-3.1-8B',
'qwen 3 instruct'
],
entityType: 'models',
resultsPerTarget: 5,
responseFormat: 'concise'
});
const items = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.items);

Python

from apify_client import ApifyClient
client = ApifyClient(token=os.environ["APIFY_TOKEN"])
run = client.actor("khadinakbar/huggingface-all-in-one-scraper").call(
run_input={
"targets": [
"https://huggingface.co/datasets/squad",
"image classification"
],
"entityType": "all",
"resultsPerTarget": 50,
}
)
dataset_items = list(client.dataset(run["defaultDatasetId"]).iterate_items())
print(dataset_items)

Best results and outcome guidance

Use URLs when you already know the exact Hugging Face entity and want one deep record. Use text queries when you want discovery across models, datasets, spaces, or papers. Set entityType to match the query intent, and use all when you want the combined model, dataset, and space search union. For model searches, filterTask, filterLibrary, and filterLanguage help narrow the result set. For bulk runs, responseFormat: "concise" keeps the items compact for downstream processing.

Focused standalone workflow

This Actor is designed as a focused standalone workflow.

Design note

I found that the dataset schema treats gated defensively as string | boolean | null, which matches the live contract and explains why the output parser normalizes that field carefully.

FAQ

When should I use a model URL versus a text query?
Use a model URL when you already know the exact repository and want one deep record. Use a text query when you want search results or want to compare candidates.

How does this Actor handle Hugging Face users and organizations?
It returns profile metadata plus portfolio listings. For those targets, sortBy affects the returned portfolio order.

What comes back for a collection target?
You get the collection metadata and the items inside it. Each item is represented in the same structured dataset format.

Can I request only models, datasets, or spaces from the dataset output?
Yes. The dataset output includes filtered views for models, datasets, and spaces.

Can I use this through Apify MCP?
Yes. It is an Apify Actor usable through Apify MCP, and the MCP-facing response shape is designed to stay compact when responseFormat is set to concise.

Responsible use

Use the Actor in line with Hugging Face's public access terms and the licenses attached to the entities you retrieve. The Actor works with public URLs and queries exposed by Hugging Face. For higher-volume usage, keep query scopes narrow and set resultsPerTarget thoughtfully so the returned dataset stays aligned with your downstream task.