{
  "openapi": "3.0.1",
  "info": {
    "title": "Hugging Face Hub: Models and Datasets With Download Counts",
    "description": "Public Hugging Face Hub repositories as rows: model or dataset id, owner, task tag, library, licence, languages, 30-day and all-time downloads, likes, trending score, gated status, parameter count and commit dates. Filter by task, licence, owner, size or update window; sort as you need.",
    "version": "0.1",
    "x-build-id": "6CeFdeOmmCQBTdYWg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yadroo~huggingface-hub-models/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yadroo-huggingface-hub-models",
        "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/yadroo~huggingface-hub-models/runs": {
      "post": {
        "operationId": "runs-sync-yadroo-huggingface-hub-models",
        "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/yadroo~huggingface-hub-models/run-sync": {
      "post": {
        "operationId": "run-sync-yadroo-huggingface-hub-models",
        "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": {
          "repoType": {
            "title": "Repositories to list",
            "enum": [
              "models",
              "datasets"
            ],
            "type": "string",
            "description": "One run reads one kind of repository. `models` uses the Hub's model index (task tag, library, parameter count); `datasets` uses the dataset index (task categories, size band, stored bytes, a short card description). The two indexes answer with different fields and different tag spellings, so run the actor twice, or keep two tasks, when you need both. Every row names its own kind in `repoType`.",
            "default": "models"
          },
          "search": {
            "title": "Keyword",
            "type": "string",
            "description": "Free-text term handed to the Hub's own search, which matches it against the repository id and owner (`qwen`, `whisper`, `embedding`, `medical`). It travels exactly as you type it - the Hub decides what matches, so a partial word works and no correction is applied here. Leave it empty to list everything the filters allow, in the order you chose."
          },
          "repoIds": {
            "title": "Exact repository ids",
            "maxItems": 50,
            "type": "array",
            "description": "Look up named repositories instead of searching: one `owner/name` per line (`Qwen/Qwen3-0.6B`, `openai/gpt-oss-20b`, `cais/mmlu` for datasets). Case and surrounding spaces are ignored and a full Hub URL is reduced to the id. Each id is read from its own metadata endpoint, so these rows carry the detail columns even with the detail switch off. An id the Hub does not serve anonymously - deleted, renamed, private or misspelt - comes back as one row with `found: false`, because the Hub answers 401 for every repository it will not show and those cases cannot be told apart from outside. The filters below still apply to the rows.",
            "items": {
              "type": "string"
            }
          },
          "pipelineTag": {
            "title": "Task (models only)",
            "type": "string",
            "description": "Keep only models whose owner declared this task. Pick a value from the list or type another one: the Hub published 59 task ids on 2026-10-21 and keeps adding them, so this field accepts any of them. Case, spaces and the usual separators are read the same (`text to image`, `Text-To-Image`). A value that is not a Hub task id stops the run and names the closest ids instead of returning a wider list. Ignored for datasets - those use the task-categories field."
          },
          "library": {
            "title": "Library or weight format",
            "type": "string",
            "description": "Keep only repositories carrying this library or weight format - the short answer to \"what can my stack actually load\": `gguf` for llama.cpp-style local builds, `transformers` for the Python pipeline, `diffusers` for image models, `mlx` for Apple silicon, `onnx` or `openvino` for runtime exports. It is sent as a Hub tag, which matches exactly, and it is checked against the vocabulary of the kind you chose - the dataset index has its own short list (`datasets`, `pandas`, `polars`, `mlcroissant`, `webdataset` and a few more), the model index a long one. Case and spaces are ignored; a value neither index knows stops the run with the closest ids named."
          },
          "licenses": {
            "title": "Licences",
            "maxItems": 5,
            "type": "array",
            "description": "Keep only repositories published under one of these licence ids, one per line as the Hub writes them: `apache-2.0`, `mit`, `cc-by-4.0`, `cc-by-nc-4.0`, `cc-by-sa-4.0`, `openrail`, `gemma`, `llama3.1`, `llama3.3`, `odc-by`, `other`. The `license:` prefix may be written or left out. Each licence is asked for in its own request and the answers are merged, so five licences cost five requests per page. An id the Hub does not know stops the run with the closest ones named; the README lists the frequent ones.",
            "items": {
              "type": "string"
            }
          },
          "languages": {
            "title": "Languages",
            "maxItems": 5,
            "type": "array",
            "description": "Keep only repositories whose owner declared one of these languages, one code per line (`en`, `ru`, `kk`, `de`, `zh`, `multilingual`). The Hub carries thousands of language tags - more than 5,000 on models alone - so codes are lower-cased and passed through unchanged with no correction and no suggestions; a code nothing carries simply yields no rows and the run status says which filter matched nothing. Models and datasets spell the language tag differently and the actor sends the right form for the kind you chose. Many repositories declare no language at all and are invisible to this filter, so leave it empty when coverage matters more than precision.",
            "items": {
              "type": "string"
            }
          },
          "taskCategories": {
            "title": "Task categories (datasets only)",
            "maxItems": 5,
            "type": "array",
            "description": "Keep only datasets tagged with one of these task categories, one per line (`question-answering`, `text-generation`, `text-classification`, `summarization`, `automatic-speech-recognition`, `image-classification`, `translation`, `table-question-answering`). They share the vocabulary of the model tasks. One request per value, merged like the licences. Ignored for models.",
            "items": {
              "type": "string"
            }
          },
          "tagFilters": {
            "title": "Extra Hub tags (advanced)",
            "maxItems": 10,
            "type": "array",
            "description": "Raw Hub tag filters, one per line, all of which a repository must carry - the escape hatch for filters this input does not name. Examples: `size_categories:1K<n<10K`, `modality:text`, `format:parquet`, `base_model:Qwen/Qwen3-0.6B`, `arxiv:2505.09388`, `conversational`. Tags travel unchanged; a tag nothing carries yields no rows, which the run status reports plainly.",
            "items": {
              "type": "string"
            }
          },
          "authors": {
            "title": "Owners",
            "maxItems": 25,
            "type": "array",
            "description": "Keep only repositories owned by these users or organisations, one per line (`google`, `Qwen`, `meta-llama`, `mistralai`, `openai`, `allenai`). The Hub matches an owner case-sensitively, so a name written in another case is looked up once on the Hub's own user or organisation record and re-queried in its canonical spelling, which the run status reports. Each owner costs one request per page, so a 25-owner watch list makes 25 requests per page. An owner with no public repositories of the chosen kind is named in the status.",
            "items": {
              "type": "string"
            }
          },
          "minDownloads": {
            "title": "Minimum 30-day downloads",
            "minimum": 0,
            "type": "integer",
            "description": "Drop repositories with fewer downloads in the last 30 days than this. The Hub has no such filter, so the actor applies it to the rows it has read: with a high threshold and a wide search it may read several pages before the row cap is reached, and the run stops when its time or cost budget is used up. Sorting by downloads makes the threshold cheap, because paging can stop at the first row below it."
          },
          "minLikes": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Drop repositories with fewer likes than this. Applied by the actor in the same way as the download threshold."
          },
          "minParametersMillions": {
            "title": "Minimum parameters (millions, models only)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only models with at least this many million parameters (`7000` = 7B). The count comes from the weight index the Hub publishes for safetensors repositories, so models shipped only as GGUF, as pickled PyTorch or as external files have no count: they carry `parameterCount: null` and drop out as soon as a bound is set. The run status reports how many rows were dropped for a missing count."
          },
          "maxParametersMillions": {
            "title": "Maximum parameters (millions, models only)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only models with at most this many million parameters - the filter for \"what fits on this GPU, laptop or phone\" (`1000` = up to 1B, `8000` = up to 8B). Same source and same blind spot as the minimum above; set both for a band."
          },
          "gatedAccess": {
            "title": "Gated repositories",
            "enum": [
              "any",
              "open",
              "gated"
            ],
            "type": "string",
            "description": "A gated repository shows its metadata to everyone but needs an accepted licence or an approved request before its files can be fetched. `open` keeps only repositories whose files anyone can download - useful when the result feeds an automated download step. Every row reports `gated` and `gatedMode` (`open`, `auto` for an instant click-through, `manual` for owner approval) whatever you choose here.",
            "default": "any"
          },
          "createdSince": {
            "title": "Created on or after (YYYY-MM-DD)",
            "type": "string",
            "description": "Keep only repositories first published on or after this date - the filter behind \"what is new\". Combined with sorting by creation date, paging stops at the first repository older than the date, so a narrow window is cheap."
          },
          "updatedSince": {
            "title": "Last changed on or after (YYYY-MM-DD)",
            "type": "string",
            "description": "Keep only repositories whose last commit is on or after this date. A repository can be years old and still have been changed yesterday, so this is the field for \"maintained\", while the one above is for \"newly published\"."
          },
          "sinceHours": {
            "title": "Changed in the last N hours",
            "minimum": 1,
            "maximum": 8760,
            "type": "integer",
            "description": "Rolling window instead of a fixed date: keep only repositories whose last commit is newer than this many hours before the run started, counted in UTC (`24` for today, `168` for a week). Made for a schedule - the window moves with every run, so the task text never needs editing. Applied together with the dates above when both are set."
          },
          "onlyNew": {
            "title": "Only rows this input has not returned before",
            "type": "boolean",
            "description": "Remember the repository ids and commit hashes this run writes, and on the next run of the same actor or task write only rows that are new or whose commit has changed - a watch list that reports releases and updates instead of repeating the whole catalogue. The first run writes everything. The memory belongs to the actor or task, so two tasks watching two owners never mix.",
            "default": false
          },
          "includeParameterCount": {
            "title": "Add parameter count and precision (models)",
            "type": "boolean",
            "description": "On (default): model rows carry `parameterCount` and `parameterPrecisions` (`BF16`, `F32`, `I8` ...) from the Hub's weight index. It travels inside the same list response, so it costs no extra request. Off: both columns are left out.",
            "default": true
          },
          "includeCardMetadata": {
            "title": "Add licence and base models from the repository card",
            "type": "boolean",
            "description": "On (default): the card header is read along with the list, filling `license`, `baseModels` (what a fine-tune was built on) and the dataset `prettyName`. Also free - the same response carries it. Off: the licence is still derived from the repository's tags where one is present.",
            "default": true
          },
          "includeModelConfig": {
            "title": "Add model type and architecture (models)",
            "type": "boolean",
            "description": "On: model rows get `modelType` (`qwen3`, `llama`, `mistral` ...) and `architectures` from the repository's configuration file. The Hub sends that whole file, chat templates included, so the response grows a lot while only these two columns are kept - off by default for that reason, though it needs no extra request.",
            "default": false
          },
          "includeRepoDetails": {
            "title": "Read each repository's own record (one extra request per row)",
            "type": "boolean",
            "description": "On: every row is completed from its own metadata endpoint, adding `fileCount`, `spacesCount` (how many Hub demos use it), `inferenceStatus`, `sha` and, for models, `repoSizeBytes`. That is one request per row on top of the list requests, so a 100-row run makes about 101 requests and takes roughly twice as long at the polite pace; the row cap and your maximum cost per run still hold. Off (default): only what the list response carries - dataset rows get their stored size there anyway. Rows looked up by exact id always carry these fields.",
            "default": false
          },
          "sort": {
            "title": "Sort by",
            "enum": [
              "downloads",
              "likes",
              "trendingScore",
              "createdAt",
              "lastModified"
            ],
            "type": "string",
            "description": "The order the Hub returns, and therefore which rows the row cap keeps. `downloads` is the rolling 30-day figure, not an all-time total; `trendingScore` is the Hub's own short-term ranking and moves through the day. All-time downloads are reported in every row but cannot be sorted on - the Hub refuses that order.",
            "default": "downloads"
          },
          "sortDirection": {
            "title": "Direction",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "`desc` answers \"the biggest, the newest\" and works with every sort key. `asc` is served by the Hub for the creation date only - the oldest repositories of an owner or of a task; asked for together with downloads, likes, trending score or the commit date it is refused before the first request, with a message naming the two ways forward, because the Hub itself answers HTTP 400 for those orders.",
            "default": "desc"
          },
          "maxItems": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on the rows this run writes, and so on what it costs. The Hub serves up to 100 repositories per request, so 25 rows is one request and 1,000 rows ten. Rows dropped by the actor's own thresholds (downloads, likes, parameters) do not count against the cap but do cost requests. The run also stops at the maximum cost per run you set on the platform and says so in its status.",
            "default": 25
          },
          "fields": {
            "title": "Only these columns",
            "type": "array",
            "description": "Keep only the named columns, in this order - for example `id, pipelineTag, parameterCount, downloads30Days`. Empty = every column. `id`, `repoType`, `found`, `url` and `fetchedAt` are always written; name one of them here and it moves to the position you gave it. An unknown name is reported in the run status rather than silently ignored.",
            "items": {
              "type": "string"
            }
          },
          "hfToken": {
            "title": "Hugging Face access token (optional)",
            "type": "string",
            "description": "A read-only token of your own, if you have one. Without it the Hub allows 500 API requests per five minutes per IP address, and Apify's servers share their addresses between users, so a long run can meet that ceiling; a free account's token raises the quota to 1,000 and counts it against you alone. The token is sent to the Hub only and never written to the dataset, the log or SUMMARY. It does not unlock gated or private repositories here - only public metadata is read."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}