{
  "openapi": "3.0.1",
  "info": {
    "title": "Youtube Most Replayed Scraper for Whole Channels & Playlists",
    "description": "Extracts the most replayed segments from YouTube videos, capturing peak moments, timestamps, replay intensity, and video metadata. Ideal for content analysis, highlight detection, viewer-behavior insights, and automated identification of high-engagement scenes",
    "version": "1.0",
    "x-build-id": "bhpcaGJpZeVsCOgG4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapio~youtube-most-replayed-actor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapio-youtube-most-replayed-actor",
        "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/scrapio~youtube-most-replayed-actor/runs": {
      "post": {
        "operationId": "runs-sync-scrapio-youtube-most-replayed-actor",
        "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/scrapio~youtube-most-replayed-actor/run-sync": {
      "post": {
        "operationId": "run-sync-scrapio-youtube-most-replayed-actor",
        "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": {
          "sourceUrls": {
            "title": "📡 Channel or playlist URLs",
            "type": "array",
            "description": "One container URL per line. Accepted: https://www.youtube.com/@handle, .../@handle/videos, .../@handle/shorts, .../@handle/streams, https://www.youtube.com/channel/UC..., and https://www.youtube.com/playlist?list=PL... (a watch URL carrying &list= is treated as that playlist). A bare channel URL uses the tabs selected below.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "sourceTabs": {
            "title": "🗂️ Channel tabs to expand",
            "type": "array",
            "description": "Which tabs to read when a bare channel URL is given (no /videos, /shorts or /streams suffix). Ignored for playlists and for channel URLs that already name a tab.",
            "items": {
              "type": "string",
              "enum": [
                "videos",
                "shorts",
                "streams"
              ],
              "enumTitles": [
                "Videos",
                "Shorts",
                "Live streams"
              ]
            },
            "default": [
              "videos"
            ]
          },
          "maxVideosPerSource": {
            "title": "🔢 Max videos per container",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "How deep to paginate inside each channel tab or playlist. Page one gives roughly 30 (videos), 48 (shorts) or 100 (playlist) items; anything above that triggers continuation requests. Every discovered video costs one result row.",
            "default": 30
          },
          "maxTotalVideos": {
            "title": "🛑 Global video cap",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "Hard ceiling across all containers and direct URLs combined, applied after discovery. Leave at 0 for no global cap.",
            "default": 0
          },
          "urls": {
            "title": "🎬 Individual YouTube video URLs",
            "type": "array",
            "description": "One watch URL per line. https://www.youtube.com/watch?v=..., https://youtu.be/..., /shorts/... and bare 11-character video IDs are all accepted. Can be left empty when container URLs are supplied above.",
            "default": [
              "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
            ],
            "items": {
              "type": "string"
            }
          },
          "skipVideosWithoutHeatmap": {
            "title": "🔥 Only keep videos that have a heatmap",
            "type": "boolean",
            "description": "Drop any video whose Most Replayed graph does not exist yet. Recommended when expanding a whole channel: recent uploads usually have no heatmap.",
            "default": false
          },
          "maxConcurrency": {
            "title": "⚡ Parallel video pages",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many video pages to fetch at once. 1 keeps the original strictly sequential behaviour; raise it to finish large channels faster.",
            "default": 1
          },
          "requestTimeoutSecs": {
            "title": "⏱️ Request timeout",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Seconds to wait for a single YouTube response before retrying.",
            "default": 20
          },
          "maxRetries": {
            "title": "🔁 Retries per video",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Extra attempts after a failed request. A video that YouTube reports as unavailable is not retried, because retrying cannot change that answer.",
            "default": 3
          },
          "proxy": {
            "title": "🛡️ Proxy",
            "type": "object",
            "description": "Off by default. If YouTube blocks a request the actor switches to the Apify Residential proxy and stays on it for the rest of the run.",
            "default": {}
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}