{
  "openapi": "3.0.1",
  "info": {
    "title": "Hugging Face Scraper — Models, Datasets & Spaces with Stats",
    "description": "Hugging Face Hub models, datasets and Spaces: downloads, likes, trending score, task, library, license, tags, gated flag, dates and a card summary. By search, author, task or repo link.",
    "version": "0.1",
    "x-build-id": "xWJezFANllJBjGYaT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/highbrow_fame~hugging-face-hub/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-highbrow_fame-hugging-face-hub",
        "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/highbrow_fame~hugging-face-hub/runs": {
      "post": {
        "operationId": "runs-sync-highbrow_fame-hugging-face-hub",
        "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/highbrow_fame~hugging-face-hub/run-sync": {
      "post": {
        "operationId": "run-sync-highbrow_fame-hugging-face-hub",
        "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": {
          "searchUrls": {
            "title": "Search links",
            "type": "array",
            "description": "Set up a search on huggingface.co/models, /datasets or /spaces with the filters you want (task, library, language, license, sort…) and paste the address. One per line.",
            "items": {
              "type": "string"
            }
          },
          "repos": {
            "title": "Repos",
            "type": "array",
            "description": "Or single repos, one record each: a link (https://huggingface.co/meta-llama/Llama-3.1-8B, …/datasets/openai/gsm8k, …/spaces/…) or an id (meta-llama/Llama-3.1-8B, datasets/openai/gsm8k). A profile link (https://huggingface.co/TheBloke) gives all of that account's models.",
            "items": {
              "type": "string"
            }
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Or search here without a link: words in the repo name (llama, whisper, bert). Each is one search; the type and filters below apply.",
            "items": {
              "type": "string"
            }
          },
          "maxItemsPerSearch": {
            "title": "Max results per search",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stops each search after this many repos.",
            "default": 200
          },
          "authors": {
            "title": "Authors / organizations",
            "type": "array",
            "description": "Accounts whose repos you want (meta-llama, Qwen, HuggingFaceFW). Each is one search; with search terms, every term is searched in every account.",
            "items": {
              "type": "string"
            }
          },
          "repoType": {
            "title": "Models, datasets or Spaces",
            "enum": [
              "model",
              "dataset",
              "space"
            ],
            "type": "string",
            "description": "For the search terms, authors and filters here.",
            "default": "model"
          },
          "task": {
            "title": "Task",
            "type": "string",
            "description": "Optional, as Hugging Face names it: text-generation, text-to-image, automatic-speech-recognition, image-text-to-text, feature-extraction, text-classification… For models the pipeline tag, for datasets the task category; Spaces have none."
          },
          "library": {
            "title": "Library",
            "type": "string",
            "description": "Optional, for models and datasets: transformers, gguf, diffusers, sentence-transformers, mlx, peft, onnx… (datasets: datasets, pandas, polars…)."
          },
          "tags": {
            "title": "Tags",
            "type": "array",
            "description": "Optional: any Hub tags, all of which must match — license:mit, en, conversational, modality:image, language:hu, size_categories:1K<n<10K.",
            "items": {
              "type": "string"
            }
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "trending",
              "downloads",
              "likes",
              "created",
              "modified"
            ],
            "type": "string",
            "description": "For the search terms, authors and filters here (a search link keeps its own sort). Highest or newest first. Spaces have no downloads: they are sorted by likes instead.",
            "default": "trending"
          },
          "includeCardSummary": {
            "title": "Add the card summary",
            "type": "boolean",
            "description": "Reads every repo's card (README) for its first paragraph. One more file per repo, so a little slower.",
            "default": true
          },
          "hfToken": {
            "title": "Hugging Face token (optional)",
            "type": "string",
            "description": "Optional: a read token from huggingface.co/settings/tokens, for the Hub's higher limits for signed-in calls and for your own private repos. It is sent only to huggingface.co and never written to the log or the results."
          },
          "maxConcurrency": {
            "title": "Parallel searches",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many searches to work on at the same time.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Used only when a request fails for network reasons or with a server error: the first try goes out directly. It is never used to get around Hugging Face's rate limits — those are waited for.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}