{
  "openapi": "3.0.1",
  "info": {
    "title": "Hugging Face Hub Scraper",
    "description": "Hugging Face Hub Scraper is a Python tool designed to extract metadata on AI models, datasets, and Spaces from the Hugging Face Hub. Easily gather download counts, task tags, architectures, and author details into structured formats for machine learning research.",
    "version": "0.0",
    "x-build-id": "zQnmZUlVpQWG9aeim"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/real-estate-api~Hugging-Face-Hub-Scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-real-estate-api-Hugging-Face-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/real-estate-api~Hugging-Face-Hub-Scraper/runs": {
      "post": {
        "operationId": "runs-sync-real-estate-api-Hugging-Face-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/real-estate-api~Hugging-Face-Hub-Scraper/run-sync": {
      "post": {
        "operationId": "run-sync-real-estate-api-Hugging-Face-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "What to scrape",
            "enum": [
              "models",
              "datasets",
              "spaces",
              "repo_details",
              "trending",
              "authors"
            ],
            "type": "string",
            "description": "Search models, datasets, or Spaces, open repos by id or URL, list what is trending, or load user and organization stats.",
            "default": "models"
          },
          "search": {
            "title": "Search text",
            "type": "string",
            "description": "Text sent as the Hub search parameter for model, dataset, and Space lists. Leave blank to take the default listing."
          },
          "author": {
            "title": "Author / organization",
            "type": "string",
            "description": "Limit a model, dataset, or Space search to this user or organization, for example meta-llama."
          },
          "filterTags": {
            "title": "Tags / filters",
            "type": "array",
            "description": "Hub tag filters such as text-classification, license:mit, language:en, or gguf. Each line is sent as a filter parameter.",
            "items": {
              "type": "string"
            }
          },
          "pipelineTag": {
            "title": "Task (pipeline_tag)",
            "type": "string",
            "description": "Task filter, for example text-generation or text-to-image. Applied on model, dataset, and Space search."
          },
          "sort": {
            "title": "Sort by",
            "enum": [
              "downloads",
              "likes",
              "trendingScore",
              "lastModified",
              "createdAt"
            ],
            "type": "string",
            "description": "Sort list results. downloads, likes, and trendingScore were checked against the Hub. lastModified and createdAt are documented by Hugging Face and were not rechecked.",
            "default": "downloads"
          },
          "full": {
            "title": "Full metadata (author, license card, files)",
            "type": "boolean",
            "description": "Ask the list API for author, card data, gated flag, last modified, and trending score. File names are stored only when Include file list is on.",
            "default": false
          },
          "includeFiles": {
            "title": "Include file list (siblings)",
            "type": "boolean",
            "description": "Store repository file names. Leave this off for large datasets such as fineweb, where the file list is huge. Weights and data files are never downloaded.",
            "default": false
          },
          "repoIds": {
            "title": "Repo IDs or URLs",
            "type": "array",
            "description": "Used in repo details mode. One model id, dataset URL, or spaces/org/name per line.",
            "items": {
              "type": "string"
            }
          },
          "authors": {
            "title": "Usernames or org names",
            "type": "array",
            "description": "Used in authors mode. Each line is a Hugging Face user or organization. The org overview is tried first, then the user overview.",
            "items": {
              "type": "string"
            }
          },
          "trendingType": {
            "title": "Trending type",
            "enum": [
              "all",
              "model",
              "dataset",
              "space"
            ],
            "type": "string",
            "description": "Keep all trending repos, or only models, datasets, or Spaces. Filtering is done after download because a type query on the trending endpoint was not verified.",
            "default": "all"
          },
          "maxItems": {
            "title": "Max results (total)",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many saved rows, including error rows. Free version cap is 10,000 per run.",
            "default": 200
          },
          "timeoutSecs": {
            "title": "Actor timeout (seconds)",
            "minimum": 30,
            "maximum": 3600,
            "type": "integer",
            "description": "Stop the run after this many seconds and keep rows already saved.",
            "default": 300
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "How long to wait for one Hub response before recording a request error.",
            "default": 30
          },
          "hfToken": {
            "title": "Hugging Face token (optional)",
            "type": "string",
            "description": "Optional token sent as a Bearer header. It raises the Hub rate limit. Leave empty to use the anonymous allowance. The actor does not ship with a token."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional proxy for Hub requests. Leave this off unless your IP is rate limited. Anonymous calls allow 500 requests per 300 seconds.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}