{
  "openapi": "3.0.1",
  "info": {
    "title": "HuggingFace Hub Scraper",
    "description": "Scrape Hugging Face Hub, search and fetch models, datasets, and spaces with full metadata: downloads, likes, license, pipeline tag, library, tags, files, and more. Pure HTTP, no auth required.",
    "version": "1.0",
    "x-build-id": "AQLTOZVthiw6aG2tP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~huggingface-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-huggingface-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/crawlerbros~huggingface-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-huggingface-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/crawlerbros~huggingface-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-huggingface-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "byModel",
              "byDataset",
              "bySpace",
              "byUser",
              "trending",
              "byUrl"
            ],
            "type": "string",
            "description": "What to fetch from the Hub. Use `search` for free-text discovery, `byModel`/`byDataset`/`bySpace` for specific repos, or `byUrl` to auto-detect from a Hugging Face URL.",
            "default": "search"
          },
          "entityType": {
            "title": "Entity type (mode=search / trending)",
            "enum": [
              "models",
              "datasets",
              "spaces"
            ],
            "type": "string",
            "description": "Which Hub catalog to search or browse: models, datasets, or spaces.",
            "default": "models"
          },
          "searchQuery": {
            "title": "Search query (mode=search)",
            "type": "string",
            "description": "Free-text search; matches repo name, description, and tags.",
            "default": "bert"
          },
          "repoIds": {
            "title": "Repo IDs (mode=byModel / byDataset / bySpace)",
            "type": "array",
            "description": "Hub repo IDs like `bert-base-uncased`, `google-bert/bert-base-uncased`, or full URLs.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "username": {
            "title": "Username (mode=byUser)",
            "type": "string",
            "description": "Hugging Face username (or organization name)."
          },
          "startUrls": {
            "title": "Start URLs (mode=byUrl)",
            "type": "array",
            "description": "Full huggingface.co URLs (model, dataset, space, or user pages).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "pipelineTag": {
            "title": "Pipeline tag (models only)",
            "enum": [
              "",
              "text-generation",
              "text-classification",
              "token-classification",
              "fill-mask",
              "question-answering",
              "summarization",
              "translation",
              "text2text-generation",
              "feature-extraction",
              "sentence-similarity",
              "zero-shot-classification",
              "table-question-answering",
              "automatic-speech-recognition",
              "audio-classification",
              "text-to-speech",
              "text-to-audio",
              "audio-to-audio",
              "voice-activity-detection",
              "image-classification",
              "image-segmentation",
              "image-to-image",
              "image-to-text",
              "object-detection",
              "depth-estimation",
              "video-classification",
              "text-to-video",
              "text-to-image",
              "image-to-video",
              "image-text-to-text",
              "visual-question-answering",
              "document-question-answering",
              "any-to-any",
              "tabular-classification",
              "tabular-regression",
              "time-series-forecasting",
              "reinforcement-learning",
              "robotics",
              "graph-ml",
              "mask-generation",
              "zero-shot-image-classification",
              "zero-shot-object-detection",
              "unconditional-image-generation"
            ],
            "type": "string",
            "description": "Filter models by their primary task tag (e.g. text-generation, image-classification). Applied as a server-side filter on `mode=search`/`trending`; otherwise post-filter.",
            "default": ""
          },
          "libraryName": {
            "title": "Library (models only)",
            "enum": [
              "",
              "transformers",
              "diffusers",
              "sentence-transformers",
              "timm",
              "spacy",
              "stable-baselines3",
              "ml-agents",
              "keras",
              "fastai",
              "tensorflow",
              "pytorch",
              "jax",
              "onnx",
              "safetensors",
              "gguf",
              "peft",
              "adapters"
            ],
            "type": "string",
            "description": "Filter models by their primary library / framework.",
            "default": ""
          },
          "authorFilter": {
            "title": "Author / organization",
            "type": "string",
            "description": "Constrain results to a specific author / org slug (e.g. `google`, `meta-llama`)."
          },
          "license": {
            "title": "License filter",
            "enum": [
              "",
              "apache-2.0",
              "mit",
              "cc-by-4.0",
              "cc-by-sa-4.0",
              "cc-by-nc-4.0",
              "cc-by-nc-sa-4.0",
              "cc-by-nd-4.0",
              "cc0-1.0",
              "openrail",
              "openrail++",
              "creativeml-openrail-m",
              "bigscience-openrail-m",
              "bigscience-bloom-rail-1.0",
              "bigcode-openrail-m",
              "llama2",
              "llama3",
              "llama3.1",
              "llama3.2",
              "llama3.3",
              "gemma",
              "afl-3.0",
              "gpl-3.0",
              "lgpl-3.0",
              "agpl-3.0",
              "bsd-3-clause",
              "bsd-2-clause",
              "wtfpl",
              "unlicense",
              "other"
            ],
            "type": "string",
            "description": "Filter to a specific license (post-fetch filter).",
            "default": ""
          },
          "language": {
            "title": "Language filter",
            "type": "string",
            "description": "Filter records whose tags contain this 2-letter language code (e.g. `en`, `fr`, `zh`)."
          },
          "sort": {
            "title": "Sort by (mode=search)",
            "enum": [
              "",
              "trendingScore",
              "downloads",
              "likes",
              "lastModified",
              "createdAt"
            ],
            "type": "string",
            "description": "Server-side sort key. Leave blank for relevance-based sort.",
            "default": ""
          },
          "direction": {
            "title": "Sort direction",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Direction for the `sort` key.",
            "default": "desc"
          },
          "minDownloads": {
            "title": "Min downloads (post-filter)",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Drop records with fewer downloads than this."
          },
          "minLikes": {
            "title": "Min likes (post-filter)",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Drop records with fewer likes than this."
          },
          "includeFullDetails": {
            "title": "Include full repo details",
            "type": "boolean",
            "description": "Request `?full=true` from the Hub API to include sibling files, cardData, config, and tags. Heavier payloads but richer records.",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard cap on emitted records.",
            "default": 50
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}