{
  "openapi": "3.0.1",
  "info": {
    "title": "Hugging Face Insights Scraper — Models, Datasets & Spaces",
    "description": "Scrape Hugging Face models, datasets, spaces, and daily papers with downloads, likes, parameters, tags, and growth tracking between runs. Filter by pipeline, library, author, or keyword.",
    "version": "1.0",
    "x-build-id": "f0E3K5vgStiamGU0H"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/brilliant_gum~huggingface-insights-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-brilliant_gum-huggingface-insights-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/brilliant_gum~huggingface-insights-scraper/runs": {
      "post": {
        "operationId": "runs-sync-brilliant_gum-huggingface-insights-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/brilliant_gum~huggingface-insights-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-brilliant_gum-huggingface-insights-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": [
          "resourceType"
        ],
        "properties": {
          "resourceType": {
            "title": "Resource Type",
            "enum": [
              "models",
              "datasets",
              "spaces",
              "papers"
            ],
            "type": "string",
            "description": "What to scrape: AI models, datasets, Spaces (demos), or daily research papers.",
            "default": "models"
          },
          "search": {
            "title": "Search Keyword",
            "type": "string",
            "description": "Filter by keyword (e.g. 'llama', 'sentiment', 'stable diffusion'). Leave empty to browse all.",
            "default": ""
          },
          "author": {
            "title": "Author / Organization",
            "type": "string",
            "description": "Filter by author or org (e.g. 'meta-llama', 'openai', 'google'). Leave empty for all authors.",
            "default": ""
          },
          "pipeline_tag": {
            "title": "Pipeline Tag (Models only)",
            "enum": [
              "",
              "text-generation",
              "text-classification",
              "text-to-image",
              "image-classification",
              "automatic-speech-recognition",
              "translation",
              "summarization",
              "question-answering",
              "fill-mask",
              "token-classification",
              "feature-extraction",
              "sentence-similarity",
              "object-detection",
              "image-segmentation",
              "text-to-speech",
              "image-to-text",
              "zero-shot-classification",
              "depth-estimation",
              "reinforcement-learning"
            ],
            "type": "string",
            "description": "Filter models by task type.",
            "default": ""
          },
          "library": {
            "title": "Library (Models only)",
            "type": "string",
            "description": "Filter models by ML library (e.g. 'transformers', 'diffusers', 'sentence-transformers').",
            "default": ""
          },
          "tags": {
            "title": "Tags",
            "type": "string",
            "description": "Filter by tags like 'license:mit', 'language:en'. Comma-separated.",
            "default": ""
          },
          "sort": {
            "title": "Sort By",
            "enum": [
              "downloads",
              "likes",
              "lastModified",
              "createdAt",
              "trending"
            ],
            "type": "string",
            "description": "How to sort results.",
            "default": "downloads"
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of items to return. Up to 10000 with pagination.",
            "default": 100
          },
          "fetchDetails": {
            "title": "Fetch Full Details",
            "type": "boolean",
            "description": "Fetch detailed info for each item (parameters, architectures, files). Slower but richer data. Not needed for papers.",
            "default": false
          },
          "minDownloads": {
            "title": "Min Downloads",
            "minimum": 0,
            "type": "integer",
            "description": "Only include items with at least this many downloads.",
            "default": 0
          },
          "minLikes": {
            "title": "Min Likes",
            "minimum": 0,
            "type": "integer",
            "description": "Only include items with at least this many likes.",
            "default": 0
          },
          "minParameters": {
            "title": "Min Parameters (Models only)",
            "minimum": 0,
            "type": "integer",
            "description": "Only include models with at least this many parameters. E.g. 1000000000 for 1B+. Requires fetchDetails for accuracy.",
            "default": 0
          },
          "maxParameters": {
            "title": "Max Parameters (Models only)",
            "minimum": 0,
            "type": "integer",
            "description": "Only include models with at most this many parameters. 0 = no limit.",
            "default": 0
          },
          "excludeGated": {
            "title": "Exclude Gated",
            "type": "boolean",
            "description": "Exclude gated models/datasets that require access approval.",
            "default": false
          },
          "excludePrivate": {
            "title": "Exclude Private",
            "type": "boolean",
            "description": "Exclude private items (recommended).",
            "default": true
          },
          "enableHistory": {
            "title": "Enable History Tracking",
            "type": "boolean",
            "description": "Track downloads/likes changes between scheduled runs. Stores snapshots in a named KV store.",
            "default": false
          },
          "historyStoreName": {
            "title": "History Store Name",
            "type": "string",
            "description": "Name of the Key-Value store for history snapshots.",
            "default": "hf-history"
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Optional proxy settings. HF API works without proxy, but can help with rate limits."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}