{
  "openapi": "3.0.1",
  "info": {
    "title": "Hugging Face Hub Scraper",
    "description": "Models, datasets and Spaces from the Hugging Face Hub API. Avoids the Firefox TLS profiles this host CAPTCHAs as an HTTP 405, and reports its 401 'Invalid username or password' for what it really is - a repository that does not exist.",
    "version": "0.1",
    "x-build-id": "Z273v7cNi9zyEfVl9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapyx~huggingface-hub-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapyx-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/scrapyx~huggingface-hub-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapyx-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/scrapyx~huggingface-hub-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapyx-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": {
          "mode": {
            "title": "What to collect",
            "enum": [
              "search",
              "repos"
            ],
            "type": "string",
            "description": "search = browse and filter the Hub. repos = full detail for specific repositories you name.",
            "default": "search"
          },
          "repoType": {
            "title": "Repository type",
            "enum": [
              "models",
              "datasets",
              "spaces"
            ],
            "type": "string",
            "description": "models, datasets or spaces. The three share one API shape but NOT one field set — models carry pipeline_tag and library_name, datasets carry description, spaces carry sdk and subdomain.",
            "default": "models"
          },
          "search": {
            "title": "Search text",
            "type": "string",
            "description": "Free-text search over repository names."
          },
          "author": {
            "title": "Owner / organisation",
            "type": "string",
            "description": "Only repositories owned by this user or org, e.g. 'google' or 'meta-llama'. An owner that does not exist honestly returns zero results."
          },
          "filterTag": {
            "title": "Filter by tag",
            "type": "string",
            "description": "A Hub tag, e.g. 'text-classification', 'pytorch', 'license:apache-2.0'. An unknown tag honestly returns zero results rather than the unfiltered list."
          },
          "sort": {
            "title": "Sort by",
            "enum": [
              "downloads",
              "likes",
              "trendingScore",
              "lastModified",
              "createdAt"
            ],
            "type": "string",
            "description": "Verified live on all three repository types.",
            "default": "downloads"
          },
          "direction": {
            "title": "Sort direction",
            "enum": [
              "-1",
              "1"
            ],
            "type": "string",
            "description": "-1 = descending (most first), 1 = ascending.",
            "default": "-1"
          },
          "repoIds": {
            "title": "Repository IDs",
            "type": "array",
            "description": "For mode='repos'. 'owner/name' (e.g. google-bert/bert-base-uncased) or a huggingface.co URL. NOTE a repository that does not exist answers HTTP 401 'Invalid username or password.' — not a 404, and not an actual auth problem, since these requests carry no credentials.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Set 0 for unlimited. This API provides NO result count of any kind — no totalCount, no header — so the only honest figure is what the walk actually collected, reported as reposReturned.",
            "default": 200
          },
          "pageSize": {
            "title": "Results per request",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Between 1 and 1000. Hugging Face silently caps anything above 1000 — a request for 10,000 returned exactly 1,000 with no error.",
            "default": 100
          },
          "fetchFullDetail": {
            "title": "Fetch the full document for each result",
            "type": "boolean",
            "description": "Search mode only — repos mode always fetches it. Adds cardData, config, safetensors, linked Spaces, storage usage and the full file list, at one extra request per result (4,566 bytes for one model against ~435 per list row).",
            "default": false
          },
          "includeCardData": {
            "title": "Include model-card front matter",
            "type": "boolean",
            "description": "cardData is the README front matter and is the largest field in the payload, so it is dropped by default.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max concurrent requests",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Detail fetches in flight at once. Search pages are sequential because the cursor is a chain.",
            "default": 4
          },
          "minRequestInterval": {
            "title": "Min seconds between request starts",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Politeness pacing shared across all workers. 0 uses the built-in default.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional and OFF by default. There IS an AWS WAF on this host, but it challenges only Firefox TLS fingerprints — which this actor's profile pool excludes — so eight other profiles run clean without a proxy.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}