{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Most Replayed Scraper - Heatmap Peaks & Timestamps",
    "description": "Find the most replayed moments of any YouTube video: the top peaks of YouTube's own Most replayed heatmap as timestamped links, the chapter each peak falls in and the caption line spoken there, plus the raw heatmap segments. Videos without a heatmap are listed free.",
    "version": "0.1",
    "x-build-id": "eWFPxDHn3GGcdwjac"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neverempty~youtube-most-replayed-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neverempty-youtube-most-replayed-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/neverempty~youtube-most-replayed-scraper/runs": {
      "post": {
        "operationId": "runs-sync-neverempty-youtube-most-replayed-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/neverempty~youtube-most-replayed-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-neverempty-youtube-most-replayed-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",
        "properties": {
          "videos": {
            "title": "YouTube videos",
            "type": "array",
            "description": "One video per line: a watch URL (https://www.youtube.com/watch?v=...), a youtu.be link, a /shorts/ or /live/ URL, or an 11-character video id. The same video given twice is read and charged once. If left empty, one example video is read and the output says so.",
            "items": {
              "type": "string"
            }
          },
          "channels": {
            "title": "YouTube channels",
            "type": "array",
            "description": "One channel per line: an @handle, a channel URL (youtube.com/@name, /channel/UC..., /c/... or /user/...) or a channel id starting with UC. The channel's latest uploads from its Videos tab are checked - up to about 30 per channel, newest first - and each one that has a Most replayed heatmap is returned. Reading the channel page itself is free; only returned videos are charged.",
            "items": {
              "type": "string"
            }
          },
          "playlists": {
            "title": "YouTube playlists",
            "type": "array",
            "description": "One playlist per line: a playlist URL (youtube.com/playlist?list=...), any link that carries list=..., or a playlist id. The videos are checked in playlist order - up to the first 100. Reading the playlist page itself is free; only returned videos are charged.",
            "items": {
              "type": "string"
            }
          },
          "videosPerSource": {
            "title": "Videos per channel or playlist",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many videos to check from each channel (its newest uploads) and each playlist (from the top), 1 to 100. A channel page shows about 30 uploads, so a channel gives at most about 30. Videos without a heatmap are returned as free rows and still count toward this number. maxVideos still caps the whole run.",
            "default": 10
          },
          "maxVideos": {
            "title": "Maximum videos to return",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many video rows to return in total (1 to 1,000). You are charged only for videos that have a heatmap and are returned; rows for videos without one are free.",
            "default": 100
          },
          "topMomentsCount": {
            "title": "Top moments per video",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many moments to return for each video (1 to 20): YouTube's own Most replayed labels first, then the strongest heatmap peaks outside the opening of the video. Each one has a timestamped link that starts playback there.",
            "default": 5
          },
          "minSecondsBetweenMoments": {
            "title": "Minimum seconds between moments",
            "minimum": 0,
            "maximum": 3600,
            "type": "integer",
            "description": "A heatmap peak is returned only if it is at least this many seconds away from every moment already picked, so the top moments are different scenes rather than neighbouring slices of the same peak. YouTube's own Most replayed labels are always kept. 0 = automatic: 5% of the video's length, and at least 5 seconds.",
            "default": 0
          },
          "includeTranscript": {
            "title": "Add the caption line at each moment",
            "type": "boolean",
            "description": "On = for each moment, the captions spoken during that heatmap segment are added as transcriptText (up to 300 characters). This uses YouTube's player endpoint (/youtubei/v1/player) and caption file, the same way transcript tools do; YouTube's robots.txt disallows those paths for crawlers. Off = only the public watch page is requested and transcriptText is empty. If a video has no captions or they cannot be read, the video row is still returned and transcriptNote says why.",
            "default": true
          },
          "transcriptLanguage": {
            "title": "Caption language",
            "type": "string",
            "description": "Preferred caption language code (en, es, de, ja...). Uploaded captions in that language are used first, then YouTube's auto-generated ones in that language. If the video has neither, the first available captions are used as they are - nothing is translated - and transcriptNote says which language was used.",
            "default": "en"
          },
          "includeHeatmap": {
            "title": "Include the raw heatmap segments",
            "type": "boolean",
            "description": "On = every row also carries heatmap: all segments of YouTube's Most replayed graph (startMillis, durationMillis, intensityScoreNormalized from 0 to 1). Off = only the top moments, labels and chapters.",
            "default": true
          },
          "useProxy": {
            "title": "Use a proxy",
            "type": "boolean",
            "description": "On (recommended) = pages are requested through a proxy. Measured on 2026-09-14: from Apify's own IP, 5 of 7 watch page requests came back as a bot check, and through a datacenter proxy 4 of 4 were read in full. A bot check is retried on a new proxy session, up to 3 attempts, and is never reported as a video without a heatmap.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}