{
  "openapi": "3.0.1",
  "info": {
    "title": "HuggingFace Scraper: Hugging Face Models, Datasets & Spaces",
    "description": "HuggingFace Hub scraper. Search Hugging Face models, datasets and Spaces by name, author, task, library, license, language and tags. One row per repository: downloads, likes, trending, license, base model, parameters, architecture, files, storage, inference status. Official Hub API, no key.",
    "version": "0.1",
    "x-build-id": "bG8JkYvnErw2VUEBc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/best_celerytop~huggingface-hub-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-best_celerytop-huggingface-hub-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/best_celerytop~huggingface-hub-scraper/runs": {
      "post": {
        "operationId": "runs-sync-best_celerytop-huggingface-hub-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/best_celerytop~huggingface-hub-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-best_celerytop-huggingface-hub-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",
        "properties": {
          "type": {
            "title": "What to scrape",
            "enum": [
              "models",
              "datasets",
              "spaces"
            ],
            "type": "string",
            "description": "Models, datasets or Spaces (hosted demo apps).",
            "default": "models"
          },
          "queries": {
            "title": "Search queries",
            "type": "array",
            "description": "Words searched in repository names, one search per line, for example `llama`, `whisper`, `stable diffusion`. Leave empty to browse by the filters below.",
            "items": {
              "type": "string"
            }
          },
          "author": {
            "title": "Author or organization",
            "type": "string",
            "description": "Only repositories of this user or organization, for example `meta-llama`, `google`, `openai`."
          },
          "task": {
            "title": "Task",
            "type": "string",
            "description": "Pipeline tag for models (`text-generation`, `image-classification`, `automatic-speech-recognition`...) or task category for datasets (`question-answering`, `text-classification`...)."
          },
          "library": {
            "title": "Library",
            "type": "string",
            "description": "Models only: `transformers`, `diffusers`, `gguf`, `onnx`, `sentence-transformers`, `pytorch`..."
          },
          "license": {
            "title": "License",
            "type": "string",
            "description": "For example `apache-2.0`, `mit`, `llama3.1`, `cc-by-4.0`."
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Two-letter language code, for example `en`, `de`, `zh`, `vi`."
          },
          "tags": {
            "title": "Other tags",
            "type": "array",
            "description": "Any further Hub tags, for example `conversational`, `safetensors`, `region:us`, `arxiv:2307.09288`.",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "downloads",
              "likes",
              "trending",
              "lastModified",
              "createdAt"
            ],
            "type": "string",
            "description": "Order of the results, highest first. Downloads count the last 30 days.",
            "default": "downloads"
          },
          "minDownloads": {
            "title": "Minimum downloads",
            "minimum": 0,
            "type": "integer",
            "description": "Skip repositories with fewer downloads in the last 30 days."
          },
          "minLikes": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Skip repositories with fewer likes."
          },
          "ids": {
            "title": "Repository ids",
            "type": "array",
            "description": "Specific repositories, for example `meta-llama/Llama-3.1-8B-Instruct`. Can be combined with a search.",
            "items": {
              "type": "string"
            }
          },
          "includeDetails": {
            "title": "Include full details",
            "type": "boolean",
            "description": "Add license, languages, base model, parameter count and dtypes, architecture, file list with sizes, storage used, inference status and the number of Spaces using the model. One extra request per repository.",
            "default": true
          },
          "includeReadme": {
            "title": "Include README (model card)",
            "type": "boolean",
            "description": "Add the full README text. One more request per repository; gated repositories return no README.",
            "default": false
          },
          "maxFilesPerItem": {
            "title": "Max files per repository",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap on the file list length.",
            "default": 100
          },
          "maxItems": {
            "title": "Max repositories",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of repositories saved in the run.",
            "default": 100
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}