Hugging Face Hub API
Pricing
from $0.01 / 1,000 results
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
Actor stats
0
Bookmarked
3
Total users
1
Monthly active users
6 days ago
Last modified
Categories
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}
Trending Models
{"task": "trending_models","limit": 20,"demoMode": false}
Trending Datasets
{"task": "trending_datasets","limit": 20,"demoMode": false}
Input Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
task | string | required | Task to perform (see task list) |
apiToken | string | - | HF token (optional, for private repos) |
query | string | - | Search query |
repoId | string | - | Repository ID (org/model-name) |
taskType | string | - | Filter by ML task (pipeline_tag) |
library | string | - | Filter by framework |
filter | string | - | Additional filter criteria |
sort | string | - | Sort field (downloads, likes, trending) |
direction | string | "desc" | Sort direction (asc, desc) |
limit | number | 20 | Max results to return |
includeCardData | boolean | false | Include full card data |
webhookUrl | string | - | Webhook URL for results |
demoMode | boolean | true | Return sample data |
Available Tasks
| Task | Description |
|---|---|
search_models | Search for ML models |
get_model | Get model details |
search_datasets | Search for datasets |
get_dataset | Get dataset details |
search_spaces | Search for ML demos |
get_space | Get space details |
list_model_files | List files in model repo |
get_model_card | Get model documentation |
trending_models | Get trending models |
trending_datasets | Get trending datasets |
Common Task Types (pipeline_tag)
| Task Type | Description |
|---|---|
text-generation | LLMs, chatbots |
text-classification | Sentiment, spam detection |
translation | Language translation |
summarization | Text summarization |
question-answering | Q&A from context |
text-to-image | Image generation |
image-classification | Image categorization |
object-detection | Object detection |
automatic-speech-recognition | Speech-to-text |
text-to-speech | Speech synthesis |
Common Libraries
| Library | Description |
|---|---|
transformers | Hugging Face Transformers |
diffusers | Diffusion models (SD, etc.) |
pytorch | PyTorch models |
tensorflow | TensorFlow models |
sentence-transformers | Embeddings |
spacy | spaCy 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}
Trending Models
{"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)
| Event | Description | Price |
|---|---|---|
api_request | Per 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}
Scenario 3: Monitor Trending AI
{"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
- Create a webhook trigger
- Copy the URL to
webhookUrl - 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
| Actor | Best For |
|---|---|
| Hugging Face Master | Running inference on models |
| Hugging Face Text | Text model inference |
| Hugging Face Image | Image model inference |
| Hugging Face Audio | Audio model inference |
| Hugging Face Hub | Discovering models & datasets |
FAQ
Q: Do I need an API token?
A: No for public repos and search. Yes for private repos or authenticated features.
Q: How often is trending data updated?
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

