{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Most Replayed Scraper - Heatmap Peaks & Clips",
    "description": "YouTube's Most replayed heatmap for videos, playlists, channels and searches: the replay curve, YouTube's labelled moments and the top peaks with start/end seconds, intensity, chapter and a timestamped link; optional caption text per peak. No login.",
    "version": "1.0",
    "x-build-id": "SQQx7kM7YaHvDhKge"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/steadyscrape~youtube-most-replayed-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-steadyscrape-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/steadyscrape~youtube-most-replayed-scraper/runs": {
      "post": {
        "operationId": "runs-sync-steadyscrape-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/steadyscrape~youtube-most-replayed-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-steadyscrape-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": {
          "urls": {
            "title": "Videos, playlists or channels",
            "type": "array",
            "description": "One per line: a video link in any shape (<code>watch?v=</code>, <code>youtu.be</code>, Shorts, live, embed) or a bare video id; a playlist link or id; a channel link (<code>@handle</code>, <code>/channel/UC…</code>, <code>/c/</code>, <code>/user/</code>) or a bare <code>@handle</code>. A playlist gives its first videos, a channel its newest uploads.",
            "items": {
              "type": "string"
            }
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Optional. Each term is searched on YouTube (videos only) and its top results are read, in the order and upload window chosen below.",
            "items": {
              "type": "string"
            }
          },
          "searchSort": {
            "title": "Search order",
            "enum": [
              "relevance",
              "views"
            ],
            "type": "string",
            "description": "YouTube's own orders for a search: relevance, or most viewed first.",
            "default": "relevance"
          },
          "searchUploadedWithin": {
            "title": "Search: uploaded within",
            "enum": [
              "any",
              "hour",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Only videos uploaded within this window. Fresh uploads often have no Most replayed graph yet (YouTube draws it once a video has enough views): those come back as free <code>no_heatmap</code> rows.",
            "default": "any"
          },
          "maxVideosPerSource": {
            "title": "Max videos per playlist, channel or search",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many videos to read from each playlist, channel (newest first) or search term. Videos given directly are not counted.",
            "default": 10
          },
          "maxPeaks": {
            "title": "Top peaks per video",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "How many peaks of the replay curve to return, most replayed first, each with start and end seconds, intensity and a timestamped link. 0 returns only YouTube's own labelled moments (and the curve if asked).",
            "default": 5
          },
          "minIntensity": {
            "title": "Minimum peak intensity",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Leave out peaks whose top is below this share of the video's most replayed slice (0 to 1). The default drops bumps on the floor of the curve; 0 keeps every peak.",
            "default": 0.15
          },
          "includeOpening": {
            "title": "Include the opening",
            "type": "boolean",
            "description": "The first seconds are the most replayed part of most videos because every viewer starts there, so they are left out of the peaks. Turn on for Shorts or to keep them (they are marked <code>isOpening</code>).",
            "default": false
          },
          "includeHeatmap": {
            "title": "Include the full curve",
            "type": "boolean",
            "description": "Add the 100 points of YouTube's replay curve to each video: start and length in seconds and intensity 0–1. Same price.",
            "default": false
          },
          "minViews": {
            "title": "Minimum views",
            "minimum": 0,
            "type": "integer",
            "description": "Videos with fewer views are returned as free <code>filtered</code> rows and not charged. 0: no minimum.",
            "default": 0
          },
          "includeTranscript": {
            "title": "Add the words spoken in each moment",
            "type": "boolean",
            "description": "Read the video's captions and add the text spoken inside every peak and labelled moment. Charged as <code>video-with-transcript</code> only when captions were read; otherwise the video is the plain price and <code>transcriptStatus</code> says why.",
            "default": false
          },
          "transcriptLanguage": {
            "title": "Caption language",
            "type": "string",
            "description": "Language code of the captions to read (<code>en</code>, <code>es</code>, <code>pt-BR</code>…). Empty, or missing on the video: its default caption track."
          },
          "onlyNew": {
            "title": "Only new videos (for scheduled runs)",
            "type": "boolean",
            "description": "Skip videos an earlier run with the same sources already delivered, so a schedule on a channel returns only its new uploads. Videos without a graph yet are asked again next time.",
            "default": false
          },
          "residentialFallback": {
            "title": "Residential proxy fallback",
            "type": "boolean",
            "description": "When YouTube refuses Apify's own IP and a datacenter proxy, retry through Apify's residential proxy (a few KB per video, included in the price). Captions usually need it. Off: such videos end as free <code>blocked</code> rows.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}