{
  "openapi": "3.0.1",
  "info": {
    "title": "Hugging Face Scraper: Models, Datasets, Spaces",
    "description": "Scrape the Hugging Face hub for models, datasets and spaces. Get downloads, likes, trend score, parameter count, license, languages, base model, benchmark scores and inference providers. Filter by task, size, license, date and popularity. Export to CSV or Excel.",
    "version": "1.0",
    "x-build-id": "6pZ2Y2oWcntYnUvbv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parselab~huggingface-models-datasets-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parselab-huggingface-models-datasets-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/parselab~huggingface-models-datasets-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parselab-huggingface-models-datasets-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/parselab~huggingface-models-datasets-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parselab-huggingface-models-datasets-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": {
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000."
          },
          "mode": {
            "title": "What to collect",
            "enum": [
              "models",
              "datasets",
              "spaces"
            ],
            "type": "string",
            "description": "Models, datasets or spaces (the demo apps) of the Hugging Face hub.",
            "default": "models"
          },
          "searchTerms": {
            "title": "Search words",
            "type": "array",
            "description": "Words searched in the names, for example llama, qwen, whisper or embedding. Each word is a separate search. Leave empty to browse by the filters.",
            "items": {
              "type": "string"
            }
          },
          "ids": {
            "title": "Exact ids",
            "type": "array",
            "description": "Look up known items by id, for example meta-llama/Llama-3.1-8B. Other search settings are ignored.",
            "items": {
              "type": "string"
            }
          },
          "authors": {
            "title": "Authors or organizations",
            "type": "array",
            "description": "Keep items of these accounts, for example google, meta-llama, mistralai or openai.",
            "items": {
              "type": "string"
            }
          },
          "tasks": {
            "title": "Tasks (models)",
            "type": "array",
            "description": "Models mode. Task names as the hub writes them, for example text-generation, text-to-image, automatic-speech-recognition, feature-extraction.",
            "items": {
              "type": "string"
            }
          },
          "libraries": {
            "title": "Libraries (models)",
            "type": "array",
            "description": "Models mode. For example transformers, diffusers, sentence-transformers, gguf, peft.",
            "items": {
              "type": "string"
            }
          },
          "licenses": {
            "title": "Licenses",
            "type": "array",
            "description": "License names as the hub writes them, for example apache-2.0, mit, llama3.1, cc-by-4.0.",
            "items": {
              "type": "string"
            }
          },
          "languages": {
            "title": "Languages",
            "type": "array",
            "description": "Language codes, for example en, es, zh, fr, de.",
            "items": {
              "type": "string"
            }
          },
          "extraTags": {
            "title": "Other tags",
            "type": "array",
            "description": "Any other tag that every result must have, for example gguf, safetensors, conversational, text-generation-inference.",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "downloads",
              "likes",
              "trending",
              "newest",
              "updated"
            ],
            "type": "string",
            "description": "Order of the results, largest or newest first.",
            "default": "downloads"
          },
          "minDownloads": {
            "title": "Minimum downloads (30 days)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep items downloaded at least this many times in the last 30 days."
          },
          "minLikes": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Keep items with at least this many likes."
          },
          "minTrendingScore": {
            "title": "Minimum trend score",
            "minimum": 0,
            "type": "integer",
            "description": "Keep items with at least this trend score."
          },
          "minParametersBillions": {
            "title": "Minimum size (billion parameters)",
            "minimum": 0,
            "type": "number",
            "description": "Models mode. Keep models with at least this many billions of parameters. Models that do not list their size are dropped."
          },
          "maxParametersBillions": {
            "title": "Maximum size (billion parameters)",
            "minimum": 0,
            "type": "number",
            "description": "Models mode. Keep models with at most this many billions of parameters, for example 8 for models that run on one GPU."
          },
          "createdAfter": {
            "title": "Created after",
            "type": "string",
            "description": "Keep items created on or after this date, in the form 2026-09-30."
          },
          "updatedAfter": {
            "title": "Updated after",
            "type": "string",
            "description": "Keep items updated on or after this date, in the form 2026-09-30."
          },
          "gated": {
            "title": "Gated items",
            "enum": [
              "any",
              "only",
              "exclude"
            ],
            "type": "string",
            "description": "Gated items need you to accept terms before download.",
            "default": "any"
          },
          "onlyWithBenchmarks": {
            "title": "Only models with benchmark scores",
            "type": "boolean",
            "description": "Models mode. Keep models that list evaluation results.",
            "default": false
          },
          "onlyWithProviders": {
            "title": "Only models served by a provider",
            "type": "boolean",
            "description": "Models mode. Keep models that at least one inference provider serves.",
            "default": false
          },
          "includeBenchmarks": {
            "title": "Add benchmark scores",
            "type": "boolean",
            "description": "Models mode. Adds up to 15 benchmark scores to each model row.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}