{
  "openapi": "3.0.1",
  "info": {
    "title": "Hugging Face Model & Dataset Trend Tracker",
    "description": "Track trending Hugging Face models and datasets by downloads, likes, and velocity. Filter by task, library, or tag. Monitor mode alerts you to newly trending entries. Built for ML engineers, DevRel, and AI researchers.",
    "version": "0.0",
    "x-build-id": "hMPre4XYpZ6YOfN2H"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dsh-org~huggingface-model-dataset-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dsh-org-huggingface-model-dataset-tracker",
        "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/dsh-org~huggingface-model-dataset-tracker/runs": {
      "post": {
        "operationId": "runs-sync-dsh-org-huggingface-model-dataset-tracker",
        "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/dsh-org~huggingface-model-dataset-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-dsh-org-huggingface-model-dataset-tracker",
        "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": {
          "dataType": {
            "title": "Data type",
            "enum": [
              "models",
              "datasets",
              "both"
            ],
            "type": "string",
            "description": "What to pull. models = trending Hugging Face models. datasets = trending datasets. both = run both in one run (returned in one dataset, each row tagged with resultType).",
            "default": "models"
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "snapshot",
              "monitor"
            ],
            "type": "string",
            "description": "snapshot = return the current trending results (no state). monitor = on the first run store the trending IDs, then on later runs output ONLY entries that are NEW to the trending list since the previous run (ideal for scheduled daily/weekly alerts).",
            "default": "snapshot"
          },
          "sort": {
            "title": "Sort by",
            "enum": [
              "trending",
              "downloads",
              "likes",
              "lastModified",
              "createdAt"
            ],
            "type": "string",
            "description": "Ranking used for the results. \"Trending\" uses Hugging Face's own trending signal (not just raw downloads).",
            "default": "trending"
          },
          "direction": {
            "title": "Sort direction",
            "enum": [
              "-1",
              "1"
            ],
            "type": "string",
            "description": "Descending puts the top (most trending / most downloaded) first — the usual choice.",
            "default": "-1"
          },
          "pipelineTag": {
            "title": "Task filter (pipeline tag)",
            "enum": [
              "text-generation",
              "text-classification",
              "text2text-generation",
              "question-answering",
              "fill-mask",
              "token-classification",
              "translation",
              "summarization",
              "feature-extraction",
              "sentence-similarity",
              "zero-shot-classification",
              "text-to-image",
              "image-to-image",
              "image-classification",
              "image-to-text",
              "image-text-to-text",
              "object-detection",
              "image-segmentation",
              "text-to-speech",
              "automatic-speech-recognition",
              "audio-classification",
              "text-to-video",
              "video-classification",
              "tabular-classification",
              "reinforcement-learning"
            ],
            "type": "string",
            "description": "Restrict models to a single Hugging Face task. Leave empty for all tasks. For a task not listed here, use the free-text Search field instead. (Applies to models only.)"
          },
          "library": {
            "title": "Library filter",
            "enum": [
              "transformers",
              "diffusers",
              "gguf",
              "safetensors",
              "pytorch",
              "tensorflow",
              "jax",
              "sentence-transformers",
              "transformers.js",
              "peft",
              "onnx",
              "timm",
              "spacy",
              "stable-baselines3",
              "llama.cpp"
            ],
            "type": "string",
            "description": "Restrict models to a single library/framework. Leave empty for all. (Applies to models only.)"
          },
          "search": {
            "title": "Search query (optional)",
            "type": "string",
            "description": "Free-text search over model/dataset names (e.g. \"llama\", \"whisper\", \"fineweb\"). Combines with the other filters."
          },
          "tags": {
            "title": "Tag filters (optional)",
            "type": "array",
            "description": "Restrict results to entries carrying these Hugging Face tags (e.g. \"conversational\", \"multilingual\", \"license:apache-2.0\"). Leave empty for all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "limit": {
            "title": "Limit per data type",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of results per data type (models and datasets counted separately). Higher limits are paged automatically via the Hub API Link header.",
            "default": 100
          },
          "includeConfig": {
            "title": "Include model config",
            "type": "boolean",
            "description": "Fetch each model's config.json (architecture details) and attach it as a \"config\" field. Adds one extra request per model, so it is slower — leave off unless you need architecture metadata. (Applies to models only.)",
            "default": false
          },
          "hfToken": {
            "title": "Hugging Face token (optional)",
            "type": "string",
            "description": "Optional. The public Hub API works without a token; supply a token (huggingface.co/settings/tokens) only to raise rate limits or read gated/private repos you have access to. Stored securely."
          },
          "requestDelayMs": {
            "title": "Delay between API requests (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Throttle between Hugging Face API requests to respect rate limits. Increase if you see HTTP 429 responses.",
            "default": 250
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}