{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Video Tracker - Views, Likes, Comments, Daily Changes",
    "description": "Paste YouTube video, Shorts or channel links and get views, likes, comments and subscribers per video, with the change since your last run. Same column names as streamers/youtube-scraper, no login, one flat row per video.",
    "version": "0.1",
    "x-build-id": "TskDymreRVaXU0Dpu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/magenta_courser~youtube-video-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-magenta_courser-youtube-video-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/magenta_courser~youtube-video-tracker/runs": {
      "post": {
        "operationId": "runs-sync-magenta_courser-youtube-video-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/magenta_courser~youtube-video-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-magenta_courser-youtube-video-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": {
          "startUrls": {
            "title": "Video, Shorts or channel links",
            "type": "array",
            "description": "YouTube links, one per line: a video (https://www.youtube.com/watch?v=dQw4w9WgXcQ or https://youtu.be/dQw4w9WgXcQ), a Short (https://www.youtube.com/shorts/<id>), or a channel (https://www.youtube.com/@Apify, /channel/UC..., or a channel tab such as /@Apify/shorts). A video link gives one row. A channel link gives its latest videos, limited by the fields below. Same format as streamers/youtube-scraper.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "searchQueries": {
            "title": "Search terms",
            "type": "array",
            "description": "Optional. Each term returns the videos of the first YouTube results page (about 15 to 20 videos), limited by \"maxResults\". Search filters and deeper pages are not supported.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Maximum videos per channel or search term",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Latest regular videos to take from each channel link, and results to take from each search term. Direct video links are not affected. 0 = none.",
            "default": 10
          },
          "maxResultsShorts": {
            "title": "Maximum Shorts per channel",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Latest Shorts to take from each channel link. 0 = none.",
            "default": 0
          },
          "maxResultStreams": {
            "title": "Maximum streams per channel",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Latest live streams to take from each channel link. 0 = none.",
            "default": 0
          },
          "columnFormat": {
            "title": "Column names",
            "enum": [
              "streamers",
              "tracker"
            ],
            "type": "string",
            "description": "\"streamers\" keeps the keys of streamers/youtube-scraper in the same order and types (title, id, url, viewCount, date, likes, commentsCount, numberOfSubscribers, ...) and appends the tracking fields after them, so existing sheets and integrations keep working. \"tracker\" uses this Actor's own names and adds previous* values and durationSeconds.",
            "default": "streamers"
          },
          "compareWithLastRun": {
            "title": "Compare with last run",
            "type": "boolean",
            "description": "Add viewChange, likeChange, commentChange, subscriberChange, previousScrapedAt and isFirstSeen to each row, compared with the last run that used the same history store. The previous values are kept in a named key-value store in your account, so scheduled daily runs line up automatically.",
            "default": true
          },
          "outputMode": {
            "title": "Output",
            "enum": [
              "all",
              "changesOnly"
            ],
            "type": "string",
            "description": "\"changesOnly\" saves (and charges) only videos seen for the first time or whose views, likes, comments or subscribers changed. The first run saves everything. Rows with status not_found, private, blocked or error are always saved (free). Needs \"Compare with last run\".",
            "default": "all"
          },
          "historyStoreName": {
            "title": "History store name",
            "pattern": "^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$",
            "type": "string",
            "description": "Name of the key-value store that keeps the previous values. Use a different name per campaign or client to keep their histories apart. Lowercase letters, digits and hyphens.",
            "default": "youtube-video-history"
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify datacenter proxy by default; every attempt uses a new IP. This Actor works on datacenter proxies only: if the RESIDENTIAL group is selected it is ignored with a warning and the run uses the datacenter proxy (residential is slower and would only raise cost). Your own proxy URLs are used as given.",
            "default": {
              "useApifyProxy": true
            }
          },
          "maxRequests": {
            "title": "Maximum requests per run",
            "minimum": 0,
            "type": "integer",
            "description": "Stops the run after this many HTTP requests (retries included; a video takes 2). Videos not reached get a free error row. 0 = unlimited.",
            "default": 0
          },
          "maxRunMinutes": {
            "title": "Maximum run time (minutes)",
            "minimum": 1,
            "maximum": 1440,
            "type": "integer",
            "description": "Stops the run cleanly after this many minutes; videos not reached get a free error row.",
            "default": 60
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}