Hugging Face Hub API avatar
Hugging Face Hub API

Pricing

from $0.01 / 1,000 results

Go to Apify Store
Hugging Face Hub API

Hugging Face Hub API

Access the Hugging Face Hub API to search & discover models, datasets & spaces. Search Models: Find ML models by name, task or library Search Datasets: Discover datasets for training & evaluation Search Spaces: Explore ML applications Get Metadata: Retrieve detailed repo information

Pricing

from $0.01 / 1,000 results

Rating

0.0

(0)

Developer

John Rippy

John Rippy

Maintained by Community

Actor stats

0

Bookmarked

3

Total users

1

Monthly active users

7 days ago

Last modified

Share

Hugging Face Hub - Discover Models, Datasets & Spaces from 500K+ AI Resources

Search and explore the world's largest AI resource repository. Find models by task, discover datasets for training, explore ML demo spaces, and track trending AI resources. Perfect for ML research, model selection, and staying current with AI developments. No API token required for basic searches.

Features

  • Search Models - Find ML models by name, task, or framework
  • Search Datasets - Discover training and evaluation datasets
  • Search Spaces - Explore ML demo applications
  • Get Model Details - Retrieve comprehensive model information
  • Get Dataset Details - Full dataset metadata and file lists
  • List Model Files - Browse repository file structure
  • Get Model Cards - Read documentation and usage info
  • Trending Models - See what's popular now
  • Trending Datasets - Track hot datasets
  • Filter by Task - text-generation, image-classification, etc.
  • Filter by Framework - transformers, diffusers, pytorch, etc.
  • Demo Mode - Test with sample data before going live

Who Should Use This Actor?

ML Engineers

Find the best models for your use case. Compare options. Discover new architectures.

Data Scientists

Search datasets for training. Find evaluation benchmarks. Explore data sources.

AI Researchers

Track trending models. Monitor field developments. Find papers and implementations.

Product Managers

Evaluate AI capabilities. Research model options. Understand ML landscape.

Developers

Find models to integrate. Check model requirements. Get implementation examples.

AI Enthusiasts

Explore cutting-edge ML. Try demo spaces. Learn about new models.

Quick Start

Demo Mode (Free Test)

{
"task": "search_models",
"query": "text generation",
"demoMode": true
}

Search Models

{
"task": "search_models",
"query": "sentiment analysis",
"taskType": "text-classification",
"library": "transformers",
"limit": 20,
"demoMode": false
}

Search by Task Type

{
"task": "search_models",
"taskType": "text-to-image",
"sort": "downloads",
"direction": "desc",
"limit": 10,
"demoMode": false
}

Get Model Details

{
"task": "get_model",
"repoId": "meta-llama/Llama-2-7b-hf",
"demoMode": false
}

Search Datasets

{
"task": "search_datasets",
"query": "instruction following",
"limit": 20,
"demoMode": false
}

Get Dataset Details

{
"task": "get_dataset",
"repoId": "tatsu-lab/alpaca",
"demoMode": false
}

Search Spaces (Demos)

{
"task": "search_spaces",
"query": "stable diffusion",
"limit": 10,
"demoMode": false
}

Get Space Details

{
"task": "get_space",
"repoId": "stabilityai/stable-diffusion",
"demoMode": false
}

List Model Files

{
"task": "list_model_files",
"repoId": "meta-llama/Llama-2-7b-hf",
"demoMode": false
}

Get Model Card

{
"task": "get_model_card",
"repoId": "mistralai/Mistral-7B-Instruct-v0.1",
"demoMode": false
}
{
"task": "trending_models",
"limit": 20,
"demoMode": false
}
{
"task": "trending_datasets",
"limit": 20,
"demoMode": false
}

Input Parameters

ParameterTypeDefaultDescription
taskstringrequiredTask to perform (see task list)
apiTokenstring-HF token (optional, for private repos)
querystring-Search query
repoIdstring-Repository ID (org/model-name)
taskTypestring-Filter by ML task (pipeline_tag)
librarystring-Filter by framework
filterstring-Additional filter criteria
sortstring-Sort field (downloads, likes, trending)
directionstring"desc"Sort direction (asc, desc)
limitnumber20Max results to return
includeCardDatabooleanfalseInclude full card data
webhookUrlstring-Webhook URL for results
demoModebooleantrueReturn sample data

Available Tasks

TaskDescription
search_modelsSearch for ML models
get_modelGet model details
search_datasetsSearch for datasets
get_datasetGet dataset details
search_spacesSearch for ML demos
get_spaceGet space details
list_model_filesList files in model repo
get_model_cardGet model documentation
trending_modelsGet trending models
trending_datasetsGet trending datasets

Common Task Types (pipeline_tag)

Task TypeDescription
text-generationLLMs, chatbots
text-classificationSentiment, spam detection
translationLanguage translation
summarizationText summarization
question-answeringQ&A from context
text-to-imageImage generation
image-classificationImage categorization
object-detectionObject detection
automatic-speech-recognitionSpeech-to-text
text-to-speechSpeech synthesis

Common Libraries

LibraryDescription
transformersHugging Face Transformers
diffusersDiffusion models (SD, etc.)
pytorchPyTorch models
tensorflowTensorFlow models
sentence-transformersEmbeddings
spacyspaCy models

Output Format

Search Models

{
"success": true,
"query": "sentiment analysis",
"models": [
{
"id": "distilbert-base-uncased-finetuned-sst-2-english",
"author": "distilbert",
"downloads": 5420000,
"likes": 892,
"tags": ["text-classification", "pytorch", "transformers"],
"pipeline_tag": "text-classification",
"lastModified": "2024-01-15T10:30:00Z"
},
{
"id": "cardiffnlp/twitter-roberta-base-sentiment",
"author": "cardiffnlp",
"downloads": 2100000,
"likes": 543,
"tags": ["text-classification", "pytorch", "transformers", "sentiment"],
"pipeline_tag": "text-classification",
"lastModified": "2024-01-10T08:15:00Z"
}
],
"totalCount": 2
}

Get Model Details

{
"success": true,
"model": {
"id": "meta-llama/Llama-2-7b-hf",
"author": "meta-llama",
"sha": "abc123def456",
"downloads": 5420000,
"likes": 8932,
"private": false,
"tags": ["text-generation", "pytorch", "transformers", "llama", "safetensors"],
"pipeline_tag": "text-generation",
"library_name": "transformers",
"modelCard": "Llama 2 is a collection of pretrained and fine-tuned generative text models...",
"siblings": [
{"rfilename": "config.json", "size": 1024},
{"rfilename": "model.safetensors", "size": 13500000000},
{"rfilename": "tokenizer.json", "size": 2500000}
],
"createdAt": "2023-07-18T00:00:00Z",
"lastModified": "2024-01-15T10:30:00Z"
}
}

Search Datasets

{
"success": true,
"query": "instruction following",
"datasets": [
{
"id": "tatsu-lab/alpaca",
"author": "tatsu-lab",
"downloads": 890000,
"likes": 2341,
"tags": ["text-generation", "instruction-following"],
"lastModified": "2024-01-05T16:00:00Z"
}
],
"totalCount": 1
}
{
"success": true,
"trendingModels": [
{"id": "mistralai/Mixtral-8x7B-Instruct-v0.1", "author": "mistralai", "likes": 4532, "downloads": 890000, "trend": "up"},
{"id": "google/gemma-7b", "author": "google", "likes": 3421, "downloads": 654000, "trend": "up"},
{"id": "Qwen/Qwen-72B-Chat", "author": "Qwen", "likes": 2987, "downloads": 432000, "trend": "up"}
]
}

Model Files

{
"success": true,
"repoId": "meta-llama/Llama-2-7b-hf",
"files": [
{"path": "config.json", "size": 1024, "type": "file"},
{"path": "model.safetensors", "size": 13500000000, "type": "file"},
{"path": "tokenizer.json", "size": 2500000, "type": "file"}
],
"totalSize": 13502502048
}

Pricing (Pay-Per-Event)

EventDescriptionPrice
api_requestPer Hub API request$0.01

Example costs:

  • Search 50 model queries: 50 × $0.01 = $0.50
  • Get 100 model details: 100 × $0.01 = $1.00
  • Daily trending check (30 days): 30 × $0.01 = $0.30
  • Demo mode: $0.00

Common Scenarios

Scenario 1: Find Best Model for Task

{
"task": "search_models",
"taskType": "text-classification",
"library": "transformers",
"sort": "downloads",
"limit": 10,
"demoMode": false
}

Scenario 2: Research Dataset Options

{
"task": "search_datasets",
"query": "code generation python",
"sort": "downloads",
"limit": 20,
"demoMode": false
}
{
"task": "trending_models",
"limit": 25,
"webhookUrl": "https://hooks.zapier.com/...",
"demoMode": false
}

Scenario 4: Evaluate Model Requirements

{
"task": "list_model_files",
"repoId": "stabilityai/stable-diffusion-xl-base-1.0",
"demoMode": false
}

Webhook & Automation Integration

Zapier / Make.com / n8n

  1. Create a webhook trigger
  2. Copy the URL to webhookUrl
  3. Process results in your workflow

Popular automations:

  • Trending models -> Slack notification
  • New datasets -> Research tracking sheet
  • Model updates -> Team alerts
  • Weekly AI digest -> Email newsletter

Hugging Face AI Suite

ActorBest For
Hugging Face MasterRunning inference on models
Hugging Face TextText model inference
Hugging Face ImageImage model inference
Hugging Face AudioAudio model inference
Hugging Face HubDiscovering models & datasets

FAQ

Q: Do I need an API token?

A: No for public repos and search. Yes for private repos or authenticated features.

A: Hugging Face updates trending metrics multiple times daily.

Q: Can I access private models?

A: Yes, with an API token that has access to the private repo.

Q: What's the difference between downloads and likes?

A: Downloads = actual usage count. Likes = community appreciation. Both indicate popularity.

Q: How do I know which model to choose?

A: Sort by downloads for proven reliability, by likes for community preference, by trending for cutting-edge.

Common Problems & Solutions

"Repository not found"

  • Check repo ID format: organization/model-name
  • Verify repo exists and is public
  • For private repos, provide valid API token

"Rate limit exceeded"

  • Reduce request frequency
  • Use API token for higher limits
  • Cache results locally

"No results found"

  • Broaden search terms
  • Remove filters
  • Check spelling

"Demo data showing"

  • Set demoMode: false
  • API token optional for public search

Built by John Rippy | Actor Arsenal