{
  "openapi": "3.0.1",
  "info": {
    "title": "HuggingFace Models Scraper",
    "description": "[💰 $1.00 / 1K] Extract model metadata from the HuggingFace Hub — downloads, likes, trending score, task, library, license, tags, dates, and file lists. Search by keyword, filter by author, task, library, or tag, and sort by popularity or date.",
    "version": "1.0",
    "x-build-id": "SZeXw3PcyQYa2aeTg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/solidcode~huggingface-co-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-solidcode-huggingface-co-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/solidcode~huggingface-co-scraper/runs": {
      "post": {
        "operationId": "runs-sync-solidcode-huggingface-co-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/solidcode~huggingface-co-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-solidcode-huggingface-co-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": {
          "search": {
            "title": "Search",
            "type": "string",
            "description": "Free-text search across model names and descriptions. Example: 'llama', 'whisper', 'stable diffusion'. Leave empty to browse all models by the filters and sort order below."
          },
          "author": {
            "title": "Author or Organization",
            "type": "string",
            "description": "Only include models from this user or organization. Example: 'meta-llama', 'google', 'mistralai'."
          },
          "pipelineTag": {
            "title": "Task",
            "enum": [
              "text-generation",
              "text-classification",
              "token-classification",
              "question-answering",
              "translation",
              "summarization",
              "feature-extraction",
              "sentence-similarity",
              "fill-mask",
              "zero-shot-classification",
              "text-to-image",
              "image-to-text",
              "image-classification",
              "object-detection",
              "image-segmentation",
              "image-to-image",
              "text-to-video",
              "text-to-speech",
              "automatic-speech-recognition",
              "audio-classification",
              "text-to-audio",
              "image-text-to-text",
              "visual-question-answering",
              "reinforcement-learning",
              "tabular-classification",
              "tabular-regression"
            ],
            "type": "string",
            "description": "Only include models built for this machine-learning task. Leave empty to include all tasks."
          },
          "libraryName": {
            "title": "Library / Framework",
            "enum": [
              "transformers",
              "diffusers",
              "sentence-transformers",
              "gguf",
              "safetensors",
              "peft",
              "timm",
              "onnx",
              "keras",
              "spacy",
              "stable-baselines3",
              "setfit",
              "adapter-transformers",
              "flair",
              "espnet",
              "nemo",
              "mlx"
            ],
            "type": "string",
            "description": "Only include models built with this framework or file format. Leave empty to include all libraries."
          },
          "tags": {
            "title": "Additional Tags",
            "type": "array",
            "description": "Extra hub tags a model must have. Example: 'gguf', 'merge', 'conversational', 'code'. A model is included only if it has every tag you list here.",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort By",
            "enum": [
              "trending",
              "downloads",
              "likes",
              "lastModified",
              "createdAt"
            ],
            "type": "string",
            "description": "How to order the results.",
            "default": "trending"
          },
          "sortDirection": {
            "title": "Sort Direction",
            "enum": [
              "descending",
              "ascending"
            ],
            "type": "string",
            "description": "Order direction. Descending puts the highest or newest values first. Note: the HuggingFace Hub only supports ascending order for 'Recently created' — for every other sort, results are always returned highest/newest first regardless of this setting.",
            "default": "descending"
          },
          "maxResults": {
            "title": "Maximum Results",
            "minimum": 0,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum number of models to return. Set to 0 to fetch all matches — in that case a safety cap of 50,000 models is applied so very broad searches don't run indefinitely (the Hub has over a million models).",
            "default": 100
          },
          "includeFiles": {
            "title": "Include File List",
            "type": "boolean",
            "description": "Add each model's repository file list (weights, configs, tokenizer files, README) to the output. Turn off for a lighter, faster result.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}