{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Channel Scraper - Transcripts",
    "description": "YouTube Channel Scraper helps you extract structured data from public YouTube channels. Fetch video metadata, performance metrics, and channel details efficiently. Designed for growth teams, data teams, and content researchers.",
    "version": "0.1",
    "x-build-id": "KWpka06nSun7meSdu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/api-empire~youtube-channel-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-api-empire-youtube-channel-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/api-empire~youtube-channel-scraper/runs": {
      "post": {
        "operationId": "runs-sync-api-empire-youtube-channel-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/api-empire~youtube-channel-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-api-empire-youtube-channel-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",
        "required": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "🔗 YouTube channels",
            "type": "array",
            "description": "Channel URLs (https://www.youtube.com/@Handle or .../channel/UC…), bare @handles, or bare UC… channel IDs. One per line. Keyword search is not supported — every entry must resolve to a channel.",
            "default": [
              "https://www.youtube.com/@MKBHD"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "🔢 Items per section, per channel",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper limit for each enabled section (videos, Shorts, live streams, posts) on each channel. Every video-type item costs one extra request for its exact view/like count, so keep this small for quick runs. Transcripts are taken from these items and capped separately below.",
            "default": 10
          },
          "videoTranscripts": {
            "title": "🗣️ Read the spoken words of each targeted video",
            "type": "boolean",
            "description": "Emit one `transcript` row per targeted video, linked to its video/short/livestream row by `parentId`. Turn off to run this Actor as a plain channel scraper.",
            "default": true
          },
          "transcriptSources": {
            "title": "🎯 Which collected items to transcribe",
            "type": "array",
            "description": "Long-form videos are the reliable source. Shorts usually carry an auto-generated track; live-stream replays often carry none at all. Items are taken in the order listed here until the cap below is reached.",
            "items": {
              "type": "string",
              "enum": [
                "videos",
                "shorts",
                "live"
              ],
              "enumTitles": [
                "🎬 Long-form videos",
                "📱 Shorts",
                "🔴 Live-stream replays"
              ]
            },
            "default": [
              "videos"
            ]
          },
          "maxTranscriptVideos": {
            "title": "⏱️ Videos to transcribe per channel",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Hard cap on transcript fetches per channel (1-50). Each one is 2 requests. Default is 5.",
            "default": 5
          },
          "transcriptLanguage": {
            "title": "🌍 Caption language code",
            "type": "string",
            "description": "Two-letter code such as en, es, de, ja. Leave empty to read the video's own default track. If the requested language is not published by a video, the default track is read instead and the output column `transcriptLanguage` reports the language that was actually read - never the one that was asked for.",
            "default": ""
          },
          "preferManualCaptions": {
            "title": "✍️ Prefer human-written captions over auto-generated",
            "type": "boolean",
            "description": "When both exist, read the human track (`transcriptIsAutoGenerated: false`). Turn off to always prefer the ASR track.",
            "default": true
          },
          "includeTranscriptSegments": {
            "title": "⏱️ Include timed lines (startMs / durationMs / lineText)",
            "type": "boolean",
            "description": "Adds `transcriptLines[]`, the timestamped caption segments - this is what lets you quote a video at an offset. Turn off for a much smaller dataset.",
            "default": true
          },
          "transcriptAsPlainText": {
            "title": "📄 Also return the whole transcript as one block",
            "type": "boolean",
            "description": "Adds `transcriptText`, the caption lines joined into a single string, ready for search or an LLM.",
            "default": true
          },
          "onlyVideosWithTranscript": {
            "title": "🎯 Keep only videos whose captions were actually read",
            "type": "boolean",
            "description": "Off by default so you can see exactly why a video produced nothing (`transcriptStatus`). Turn on to drop the video/short/livestream rows on the transcribed surfaces whose captions could not be read; the other surfaces are untouched and the run log states how many rows were dropped.",
            "default": false
          },
          "transcriptKeywords": {
            "title": "🔍 Keywords to count inside the spoken words",
            "type": "array",
            "description": "Case-insensitive whole-word matching over the transcript. Each transcript row returns a hit count per keyword plus the timestamp and text of the first mention, so you can jump straight to the moment. Example: sponsor, giveaway, pricing",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "sortOrderVideos": {
            "title": "🎥 Videos tab order",
            "enum": [
              "date",
              "viewCount",
              "oldest",
              "title",
              "rating",
              "relevance"
            ],
            "type": "string",
            "description": "Which of YouTube's own Videos-tab sort chips to use. YouTube publishes Latest / Popular / Oldest there and nothing else: `rating` uses the Popular chip, `relevance` uses the Latest chip, and `title` collects newest-first then orders A→Z inside the run. The Shorts, Live and Community tabs publish no sort control at all, so this Actor deliberately offers no ordering input for them. Channels that do not offer a chip fall back to newest-first and the run log says so.",
            "default": "date"
          },
          "scrapeChannelInfo": {
            "title": "🏠 Channel profile & About",
            "type": "boolean",
            "description": "Emit one channel row per channel: description, join date, country, subscriber text, lifetime view count, video count, avatar, banner, external links, verification badge and this run's transcript availability fraction.",
            "default": true
          },
          "scrapeVideos": {
            "title": "🎬 Long-form videos",
            "type": "boolean",
            "description": "Emit one video row per upload from the Videos tab, with the exact view and like counts from the video's own player data.",
            "default": true
          },
          "scrapeShorts": {
            "title": "📱 Shorts",
            "type": "boolean",
            "description": "Emit one short row per Short. Channels without a Shorts tab return no Shorts rows.",
            "default": true
          },
          "scrapeLiveStreams": {
            "title": "🔴 Live & past streams",
            "type": "boolean",
            "description": "Emit one livestream row per item on the Live tab. Channels without a Live tab return no livestream rows — YouTube silently serves the Home tab there, and this Actor detects that instead of mislabelling home videos as streams.",
            "default": true
          },
          "scrapePosts": {
            "title": "💬 Community posts",
            "type": "boolean",
            "description": "Emit one post row per community post, including image, poll and video attachments.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy",
            "type": "object",
            "description": "Apify Proxy is attached to every request the Actor makes, including the caption fetches. YouTube answers throttled anonymous caption calls with HTTP 200 plus LOGIN_REQUIRED, and the run rotates the exit IP by itself when it sees that. US RESIDENTIAL is strongly recommended — transcript availability is close to zero on datacenter IPs.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}