{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper — Channels, Playlists & AI Chunks",
    "description": "Transcripts for YouTube videos, channels, playlists & searches. Date filters, only-new mode, AI-ready chunks, SRT/VTT. Pay only for transcripts found.",
    "version": "1.0",
    "x-build-id": "GOUkfbnNWiTBs5ejG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vladased~youtube-transcripts-ai/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vladased-youtube-transcripts-ai",
        "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/vladased~youtube-transcripts-ai/runs": {
      "post": {
        "operationId": "runs-sync-vladased-youtube-transcripts-ai",
        "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/vladased~youtube-transcripts-ai/run-sync": {
      "post": {
        "operationId": "run-sync-vladased-youtube-transcripts-ai",
        "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": {
          "sources": {
            "title": "Videos, channels or playlists",
            "type": "array",
            "description": "Videos, Shorts, channels (@handle or URL), playlists, in any mix (max 200). Each transcript delivered costs $0.003; videos without captions are free. Channels give newest uploads first. Also accepts 'videoUrls', 'urls', 'startUrls' from other transcript actors.",
            "default": [
              "https://www.youtube.com/watch?v=wjZofJX0v4M"
            ],
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Get transcripts for the top video results of each YouTube search.",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerSource": {
            "title": "Max videos per channel / playlist / search",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap per channel, playlist or search (1–1000). Single videos count as one. Start small; raise for bulk runs.",
            "default": 10
          },
          "transcriptFormat": {
            "title": "Transcript format",
            "enum": [
              "chunks",
              "chunkRows",
              "segments",
              "text",
              "markdown",
              "srt",
              "vtt"
            ],
            "type": "string",
            "description": "'chunks' and 'chunkRows' split at ~chunk length and at creator chapters, each with a deep link to that second. Full plain text is always included (except in chunkRows).",
            "default": "chunks"
          },
          "languages": {
            "title": "Preferred languages",
            "type": "array",
            "description": "Language codes in order of preference (e.g. en, es, de). 'en' also matches en-US/en-GB. If none exists, you get the video's own main transcript; 'availableLanguages' lists the rest.",
            "default": [
              "en"
            ],
            "items": {
              "type": "string"
            }
          },
          "channelContent": {
            "title": "Channel content",
            "enum": [
              "videos",
              "shorts",
              "streams",
              "all"
            ],
            "type": "string",
            "description": "Which uploads to take from channels.",
            "default": "videos"
          },
          "publishedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Only videos published on/after this date: YYYY-MM-DD or relative like '7 days', '2 weeks', '3 months'. Works for channels, playlists and searches."
          },
          "publishedBefore": {
            "title": "Published before",
            "type": "string",
            "description": "Only videos published on/before this date (YYYY-MM-DD or relative)."
          },
          "searchSort": {
            "title": "Search: sort by",
            "enum": [
              "relevance",
              "date",
              "views",
              "rating"
            ],
            "type": "string",
            "description": "Order of search results. 'date' = newest first (date filters then stop paging early).",
            "default": "relevance"
          },
          "searchUploadDate": {
            "title": "Search: upload date",
            "enum": [
              "any",
              "hour",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "YouTube's upload-date filter for searches.",
            "default": "any"
          },
          "searchDuration": {
            "title": "Search: duration",
            "enum": [
              "any",
              "short",
              "medium",
              "long"
            ],
            "type": "string",
            "description": "YouTube's duration filter for searches.",
            "default": "any"
          },
          "onlyNewVideos": {
            "title": "Only new videos (for scheduled runs)",
            "type": "boolean",
            "description": "Skip videos this input already delivered in earlier runs, so a daily schedule only pays for new uploads. Memory lives in a key-value store 'youtube-transcripts-state' in your account.",
            "default": false
          },
          "stateKey": {
            "title": "Memory name (optional)",
            "type": "string",
            "description": "Share one 'only new' memory across different inputs by giving them the same name. Empty = one memory per set of sources."
          },
          "transcriptSearch": {
            "title": "Find words inside transcripts",
            "type": "array",
            "description": "Words or phrases to look for (case-insensitive). Each video gets 'matches': the quoted passage, its timestamp, chapter and a link to that second. In 'chunkRows' format every chunk gets 'hasMatch'.",
            "items": {
              "type": "string"
            }
          },
          "onlyMatchingVideos": {
            "title": "Only videos that mention them",
            "type": "boolean",
            "description": "Deliver only videos whose transcript contains at least one of the words above ($0.003 each). Videos that don't match cost $0.001 each (we still had to fetch and search them). Great for brand or topic monitoring.",
            "default": false
          },
          "chunkSeconds": {
            "title": "Chunk length (seconds)",
            "minimum": 10,
            "maximum": 900,
            "type": "integer",
            "description": "For AI-ready chunks: about how many seconds of speech per chunk.",
            "default": 60
          },
          "chunkOverlapSeconds": {
            "title": "Chunk overlap (seconds)",
            "minimum": 0,
            "maximum": 600,
            "type": "integer",
            "description": "Each chunk also starts with the last N seconds of the previous chunk, for better retrieval in RAG. 0 = no overlap. Must be less than chunk length.",
            "default": 0
          },
          "preferAutoGenerated": {
            "title": "Prefer auto-generated captions",
            "type": "boolean",
            "description": "By default human-made captions win over YouTube's automatic ones.",
            "default": false
          },
          "includeMetadata": {
            "title": "Include video metadata",
            "type": "boolean",
            "description": "Title, channel, handle, publish date, duration, views, likes, category, keywords, description, thumbnail, chapters.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Leave as is: the cheapest route is tried first and residential is used only if YouTube blocks it.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}