{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Channel Growth Tracker",
    "description": "Track YouTube channel growth over time — subscribers, total views, video count, views per day, 24h/7d/30d/90d comparisons, growth acceleration, milestones, upload cadence and recent-video performance. Persistent history, no login, no API key.",
    "version": "1.0",
    "x-build-id": "zSgHeHVlVUIPIURzt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/coregent~youtube-channel-growth-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-coregent-youtube-channel-growth-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/coregent~youtube-channel-growth-tracker/runs": {
      "post": {
        "operationId": "runs-sync-coregent-youtube-channel-growth-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/coregent~youtube-channel-growth-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-coregent-youtube-channel-growth-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",
        "required": [
          "channels"
        ],
        "properties": {
          "channels": {
            "title": "YouTube channels",
            "maxItems": 1000,
            "type": "array",
            "description": "Channels to track. Accepts @handles (@mkbhd), channel URLs (https://www.youtube.com/@veritasium, /channel/UC…, /c/…, /user/…), channel IDs (UCX6OQ3DkcsbYNE6H8uQQuVA) and video URLs (resolved to the channel that uploaded them). Up to 1,000 per run. The same channel entered twice is tracked once.",
            "default": [
              "@mkbhd",
              "@veritasium"
            ],
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Tracking mode",
            "enum": [
              "TRACK",
              "COMPARE",
              "SNAPSHOT"
            ],
            "type": "string",
            "description": "TRACK (recommended): compare with the previous stored snapshot plus the periods selected below. COMPARE: compare only with the selected historical periods (24h / 7d / 30d / 90d). SNAPSHOT: fetch current stats and store them, without growth analytics. The first run of any mode creates a baseline.",
            "default": "TRACK"
          },
          "trackerKey": {
            "title": "Tracker key",
            "type": "string",
            "description": "Name of the history this run reads and writes, e.g. \"competitor-channels\" or \"client-youtube\". The same channel in two trackers keeps two separate histories. Letters, digits, dot and hyphen; anything else becomes a hyphen. Use the same key on every scheduled run.",
            "default": "default"
          },
          "comparisonPeriods": {
            "title": "Comparison periods",
            "type": "array",
            "description": "Growth windows to report in growthPeriods. Each one is matched to the nearest stored snapshot within a tolerance (24h ±6h, 7d ±24h, 30d ±3d, 90d ±7d) and is null until that much history exists.",
            "items": {
              "type": "string",
              "enum": [
                "PREVIOUS",
                "24_HOURS",
                "7_DAYS",
                "30_DAYS",
                "90_DAYS"
              ],
              "enumTitles": [
                "Previous snapshot",
                "24 hours",
                "7 days",
                "30 days",
                "90 days"
              ]
            },
            "default": [
              "PREVIOUS",
              "7_DAYS",
              "30_DAYS"
            ]
          },
          "growthAlertThresholdPct": {
            "title": "Growth alert threshold (%)",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Optional. Raise an alert when subscriber growth (reliable deltas only) or total-view growth over the row's comparison reaches this percentage. Leave empty to rely on the built-in surge signals."
          },
          "growthAlertThresholdAbsolute": {
            "title": "Subscriber gain alert threshold",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Raise an alert when a channel gains at least this many subscribers over the row's comparison (e.g. 10000)."
          },
          "dropAlertThresholdPct": {
            "title": "Subscriber drop alert threshold (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Optional. Raise an alert when subscribers fall by at least this percentage over the row's comparison."
          },
          "includeRecentVideoMetrics": {
            "title": "Analyze recent videos",
            "type": "boolean",
            "description": "Analyze the channel's latest uploads: average and median views, likes, comments, engagement rate, Shorts share, and the views-to-subscribers ratio. Billed as a separate per-channel event.",
            "default": true
          },
          "recentVideosToAnalyze": {
            "title": "Recent videos to analyze",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many of the latest uploads (across the selected content types) to analyze per channel.",
            "default": 10
          },
          "contentTypes": {
            "title": "Content types",
            "type": "array",
            "description": "Which uploads count for recent-video metrics and upload cadence: long-form videos, Shorts, past live streams.",
            "items": {
              "type": "string",
              "enum": [
                "VIDEOS",
                "SHORTS",
                "LIVE"
              ],
              "enumTitles": [
                "Videos (long-form)",
                "Shorts",
                "Live streams"
              ]
            },
            "default": [
              "VIDEOS",
              "SHORTS"
            ]
          },
          "includeUploadTracking": {
            "title": "Track uploads",
            "type": "boolean",
            "description": "Report upload cadence (uploads in the last 7 / 30 days, uploads per week and month, days since the last upload) and list new uploads since the previous run (up to 5).",
            "default": true
          },
          "includeProfileMetadata": {
            "title": "Include profile metadata",
            "type": "boolean",
            "description": "Add description, keywords, avatar, banner, external links, topic categories, verified badge and business-email availability to each row.",
            "default": true
          },
          "saveHistory": {
            "title": "Save this observation to history",
            "type": "boolean",
            "description": "Store this run's snapshot so later runs can compare against it, and append it to the youtube-channel-growth-history dataset. Turn off for a one-off check against existing history that leaves no trace.",
            "default": true
          },
          "maxHistoryDays": {
            "title": "History retention (days)",
            "minimum": 7,
            "maximum": 1825,
            "type": "integer",
            "description": "Snapshots older than this are dropped from the per-channel state used for comparisons (the history dataset keeps every row). Must be at least 90 for 90-day comparisons.",
            "default": 365
          },
          "minimumSnapshotIntervalMinutes": {
            "title": "Minimum snapshot interval (minutes)",
            "minimum": 0,
            "maximum": 1440,
            "type": "integer",
            "description": "A rerun within this many minutes of the last snapshot, with no change in subscribers, views or video count, returns the current result without storing a duplicate snapshot.",
            "default": 30
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Channels processed in parallel.",
            "default": 10
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Timeout for each request to YouTube.",
            "default": 30
          },
          "maxRetries": {
            "title": "Max retries",
            "minimum": 0,
            "maximum": 6,
            "type": "integer",
            "description": "Retries per request on rate limiting (429) or server errors (5xx), with exponential backoff.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional proxy for YouTube page requests. Most runs need none. Apify Datacenter proxy and your own Custom proxy URLs are supported; Apify Residential proxy is not.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}