{
  "openapi": "3.0.1",
  "info": {
    "title": "Youtube Video Summarizer With Top Comments & Replies",
    "description": "Summarize YouTube videos quickly with the YouTube Video Summarizer. Generate concise, timestamped summaries, key points, and chapter-style outlines from any video URL. Ideal for research, note-taking, SEO, and accessibility. Fast, accurate, and easy to integrate. Exports in TXT JSON CSV; API ready.",
    "version": "0.1",
    "x-build-id": "p6PiuzijfZCjbmTeN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapier~youtube-video-summarizer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapier-youtube-video-summarizer",
        "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/scrapier~youtube-video-summarizer/runs": {
      "post": {
        "operationId": "runs-sync-scrapier-youtube-video-summarizer",
        "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/scrapier~youtube-video-summarizer/run-sync": {
      "post": {
        "operationId": "run-sync-scrapier-youtube-video-summarizer",
        "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": {
          "videoLinks": {
            "title": "🎬 Video links or IDs",
            "type": "array",
            "description": "One entry per video. Accepts a full watch link (`https://www.youtube.com/watch?v=VIDEO_ID`), a short link (`https://youtu.be/VIDEO_ID`), a Shorts link, or a bare 11-character video ID. Add as many as you need — each one produces its own video row followed by its comment rows.",
            "items": {
              "type": "string"
            }
          },
          "urls": {
            "title": "🔗 Video URLs (legacy key)",
            "type": "array",
            "description": "Backward-compatible alias for **Video links or IDs**. Anything sent under the older `urls` key still runs exactly as before. Leave this empty and use the field above for new runs.",
            "items": {
              "type": "string"
            }
          },
          "discussionTopics": {
            "title": "🔍 Discussion topics (used when no links are given)",
            "type": "array",
            "description": "Topics to look up on YouTube when both link fields above are empty. Every matching video is processed exactly like a pasted link — video row plus its comment and reply child rows.\n\nExample: `movie review` + `product unboxing` with 2 videos per topic = 4 video rows and their comment rows. Leave the link fields empty and press Start to use the topics below.",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerTopic": {
            "title": "🔢 Videos per discussion topic",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many videos to take from each topic above. Only applies when both link fields are empty. Example: `2` (default) with 2 topics returns 4 videos.",
            "default": 2
          },
          "maxVideos": {
            "title": "🔢 Max videos per run",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many videos, counted over the links above. Comment and reply rows are extra and are never counted against this number. Example: `maxVideos=2` with five links processes only the first two. `0` means every link. Default is `0`."
          },
          "maxVideoDurationSeconds": {
            "title": "⏱️ Skip videos longer than (seconds)",
            "minimum": 0,
            "type": "integer",
            "description": "Videos longer than this still return full metadata and comments, but the AI summary step is skipped and `summaryStatus` says so. Example: `3600` skips summarizing anything over one hour. `0` means no limit. Default is `0`."
          },
          "includeComments": {
            "title": "💬 Collect comment threads",
            "type": "boolean",
            "description": "Turn on to fetch the video's real comment threads as child rows (`type: comment`, `isChild: true`). If a video has comments turned off, the video row reports `commentsDisabled: true` instead of an empty list. Default is `true`.",
            "default": true
          },
          "commentSort": {
            "title": "🔀 Comment order",
            "enum": [
              "top",
              "newest"
            ],
            "type": "string",
            "description": "Which of YouTube's own comment orders to read. **Top comments** returns the ranked set the platform shows by default; **Newest first** returns the most recent ones. These are two different sets of comments, not a re-ordering of one list. Default is Top comments.",
            "default": "top"
          },
          "maxCommentsPerVideo": {
            "title": "🔢 Max comments per video",
            "minimum": 0,
            "type": "integer",
            "description": "Caps the top-level comments collected for each video. Replies are counted separately and are not charged against this cap. Example: `maxCommentsPerVideo=20` + `maxRepliesPerComment=5` gives up to 20 comment rows and up to 100 reply rows per video. `0` means all available. Default is `20`.",
            "default": 20
          },
          "includeReplies": {
            "title": "↩️ Expand reply threads",
            "type": "boolean",
            "description": "Turn on to open each collected comment's reply thread and emit every reply as its own row (`type: reply`, `isReply: true`, `replyToCid` pointing at the parent comment). Default is `true`.",
            "default": true
          },
          "maxRepliesPerComment": {
            "title": "🔢 Max replies per comment",
            "minimum": 0,
            "type": "integer",
            "description": "Caps how many replies are pulled from each comment thread. Example: `5` keeps the first five replies of every thread. `0` means all replies in the thread. Default is `5`.",
            "default": 5
          },
          "commentKeywords": {
            "title": "🔍 Keep only comments containing",
            "type": "array",
            "description": "Optional word or phrase list. A top-level comment is kept only if its text contains at least one entry (case-insensitive). Replies of a kept comment are always included. Example: `[\"how\", \"?\"]` keeps just the questions. Leave empty to keep every comment.",
            "items": {
              "type": "string"
            }
          },
          "aiApiKey": {
            "title": "🔑 OpenAI API key",
            "type": "string",
            "description": "Your own OpenAI API key (`sk-...`). Used only to turn the video's transcript into the `summary` and `long_summary` fields. Leave empty to skip the summary step entirely — `summary` and `long_summary` are then `null` and `summaryStatus` says `no_api_key`, never placeholder text. The `OPENAI_API_KEY` environment variable is used as a fallback if this field is empty."
          },
          "aiModel": {
            "title": "🤖 Summary model",
            "enum": [
              "gpt-4o-mini",
              "gpt-4.1-mini",
              "gpt-4o",
              "gpt-4.1"
            ],
            "type": "string",
            "description": "Which OpenAI model writes the summary. The cheaper mini models are usually enough for a video summary. Only used when an API key is supplied above.",
            "default": "gpt-4o-mini"
          },
          "maxRetries": {
            "title": "🔁 Attempts per video",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many times a video is attempted before the run moves on and writes an error row for it. Default is `3`.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy configuration",
            "type": "object",
            "description": "Optional. Leave off for small runs. Turning on Apify Proxy is recommended for large batches so requests stay spread out."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}