{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper (No API Key, No Login)",
    "description": "YouTube transcript scraper for videos, channels, playlists and searches. Plain text, timestamps, SRT and WebVTT, RAG chunks, plus title, channel, views, publish date and caption languages. Videos without captions are free rows. No login, no API key. $1.50 per 1,000 transcripts.",
    "version": "0.1",
    "x-build-id": "pwFs9HC7kI8zo7kkb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/locaihost~youtube-transcripts/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-locaihost-youtube-transcripts",
        "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/locaihost~youtube-transcripts/runs": {
      "post": {
        "operationId": "runs-sync-locaihost-youtube-transcripts",
        "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/locaihost~youtube-transcripts/run-sync": {
      "post": {
        "operationId": "run-sync-locaihost-youtube-transcripts",
        "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, channels or playlists",
            "type": "array",
            "description": "One per line. Video links (watch, youtu.be, Shorts, live, embed) or 11-character video IDs; channel links or handles like @TED (reads the channel's latest videos); playlist links or IDs.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search YouTube",
            "type": "array",
            "description": "Words to search for, one search per line. Reads the top results of each search, as YouTube ranks them.",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerChannel": {
            "title": "Latest videos per channel",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "How many of each channel's newest videos to read.",
            "default": 10
          },
          "includeShorts": {
            "title": "Include Shorts and past live streams from channels",
            "type": "boolean",
            "description": "Off: a channel's regular videos only. On: everything the channel uploaded, Shorts and live stream recordings included.",
            "default": false
          },
          "maxVideosPerPlaylist": {
            "title": "Videos per playlist",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "How many videos to read from each playlist, in playlist order.",
            "default": 100
          },
          "maxResultsPerSearch": {
            "title": "Results per search",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many of the top results to read for each search.",
            "default": 10
          },
          "searchCaptionedOnly": {
            "title": "Search: only videos with human-made captions",
            "type": "boolean",
            "description": "Uses YouTube's own \"Subtitles/CC\" search filter. Videos with only auto-generated captions are left out of the results.",
            "default": false
          },
          "maxVideos": {
            "title": "Most videos per run",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after reading this many videos in total. 0 means no limit.",
            "default": 0
          },
          "languages": {
            "title": "Languages",
            "type": "array",
            "description": "Caption languages you want, in order of preference, as codes like en, es, pt-BR. The first one the video has is used. Leave empty to get each video in its own spoken language.",
            "default": [
              "en"
            ],
            "items": {
              "type": "string"
            }
          },
          "includeAutoGenerated": {
            "title": "Use auto-generated captions",
            "type": "boolean",
            "description": "Most videos only have YouTube's automatic captions. Human-made captions are always preferred when both exist.",
            "default": true
          },
          "fallbackToAnyLanguage": {
            "title": "Fall back to the video's own language",
            "type": "boolean",
            "description": "When a video has none of your languages, return its transcript in the language it has (marked isFallbackLanguage) instead of a free row saying so.",
            "default": true
          },
          "translate": {
            "title": "Translate when your language is missing",
            "type": "boolean",
            "description": "When a video has none of your languages, use YouTube's own automatic translation into the first of your languages it can translate to (marked isTranslated). Checked before the fallback below. YouTube often refuses translations; then the fallback applies, or the row is free.",
            "default": false
          },
          "includeSegments": {
            "title": "Timestamped segments",
            "type": "boolean",
            "description": "Each caption line with its start and end time in seconds. The plain transcript text is always included.",
            "default": true
          },
          "includeSrt": {
            "title": "SRT subtitles",
            "type": "boolean",
            "description": "Adds the captions as an SRT subtitle file in the srt field.",
            "default": false
          },
          "includeVtt": {
            "title": "WebVTT subtitles",
            "type": "boolean",
            "description": "Adds the captions as a WebVTT subtitle file in the vtt field.",
            "default": false
          },
          "chunkSize": {
            "title": "Chunk size for RAG (words)",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Splits each transcript into chunks of about this many words, each with its start and end time, ready to embed. 0 turns chunking off. 200 to 400 suits most embedding models.",
            "default": 0
          },
          "chunkOverlap": {
            "title": "Chunk overlap (words)",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Words repeated at the start of the next chunk, so a sentence cut at a chunk edge stays findable. Try 10 to 20% of the chunk size.",
            "default": 0
          },
          "onlyNew": {
            "title": "Only videos not returned before",
            "type": "boolean",
            "description": "For scheduled runs: skip videos this same input already returned in an earlier run, so you only pay for new ones. Videos that had no transcript are checked again next time.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}