{
  "openapi": "3.0.1",
  "info": {
    "title": "🎬 YouTube Transcript Scraper",
    "description": "Turn any YouTube video, playlist or channel into clean, structured text. Bulk-extract transcripts and captions in 75 languages, plus views, likes, comments, keywords and thumbnails. Text array, plain text, WebVTT or SRT — ready for AI training data, RAG pipelines, summarisation and SEO.",
    "version": "1.0",
    "x-build-id": "tRG9qlV1QvTDKQ3PB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/citrine_venus~youtube-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-citrine_venus-youtube-transcript-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/citrine_venus~youtube-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-citrine_venus-youtube-transcript-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/citrine_venus~youtube-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-citrine_venus-youtube-transcript-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": "🔗 YouTube URLs",
            "type": "array",
            "description": "📝 **Required (unless you use search keywords).** Paste one or more YouTube links.\n\n✅ Supported:\n• Video — `https://www.youtube.com/watch?v=VIDEO_ID`\n• Short — `https://www.youtube.com/shorts/VIDEO_ID`\n• Short link — `https://youtu.be/VIDEO_ID`\n• Playlist — `https://www.youtube.com/playlist?list=PLAYLIST_ID`\n• Channel — `https://www.youtube.com/@handle`\n\n📺 Playlists and channels are expanded into individual videos, up to **Max videos per source** below.",
            "items": {
              "type": "string"
            }
          },
          "searchKeywords": {
            "title": "🔍 Search keywords (optional)",
            "type": "array",
            "description": "💡 No links handy? Type what you're looking for and we'll grab the transcripts of the top matching videos — e.g. `lofi hip hop`, `apify tutorial`, `python asyncio`. Results are added on top of any URLs above.",
            "items": {
              "type": "string"
            }
          },
          "scrapeShorts": {
            "title": "📱 Include YouTube Shorts",
            "type": "boolean",
            "description": "🩳 When **ON**, Shorts (videos of 60 seconds or less) found inside channels, playlists and searches are included too. When **OFF** they are skipped. A Shorts link you paste yourself is always processed.",
            "default": false
          },
          "maxVideosPerSource": {
            "title": "📬 Max videos per playlist / channel / keyword",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "🎚️ How many videos to take from **each** playlist, channel or search keyword. Individual video links are never limited by this. Keep it low for a quick, cheap test run.",
            "default": 10
          },
          "maxResults": {
            "title": "🛑 Overall video limit (0 = no limit)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "🧮 A hard ceiling on how many videos the whole run will process, after everything has been expanded and de-duplicated. Leave at `0` to process every video found.",
            "default": 0
          },
          "outputFormat": {
            "title": "🧾 Transcript format",
            "enum": [
              "json",
              "text",
              "vtt",
              "srt"
            ],
            "type": "string",
            "description": "📄 Pick how the transcript is delivered in the `captions` field:\n\n• **Text array** — one clean line per caption (best for AI, search and analytics) 🧩\n• **Single line text** — the entire transcript as one continuous string 📄\n• **WebVTT** — ready-to-use `.vtt` subtitles with timings 🎞️\n• **SubRip (SRT)** — ready-to-use `.srt` subtitles with timings 🎬",
            "default": "json"
          },
          "language": {
            "title": "🌍 Preferred caption language",
            "enum": [
              "en",
              "es",
              "pt",
              "fr",
              "de",
              "it",
              "nl",
              "pl",
              "ru",
              "uk",
              "tr",
              "ar",
              "he",
              "fa",
              "hi",
              "bn",
              "ta",
              "te",
              "mr",
              "ur",
              "gu",
              "kn",
              "ml",
              "pa",
              "id",
              "ms",
              "th",
              "vi",
              "ja",
              "ko",
              "zh-Hans",
              "zh-Hant",
              "sv",
              "da",
              "no",
              "fi",
              "cs",
              "sk",
              "hu",
              "ro",
              "bg",
              "el",
              "hr",
              "sr",
              "sl",
              "lt",
              "lv",
              "et",
              "ca",
              "gl",
              "eu",
              "af",
              "sw",
              "am",
              "ha",
              "yo",
              "zu",
              "fil",
              "my",
              "km",
              "lo",
              "ne",
              "si",
              "az",
              "kk",
              "uz",
              "ka",
              "hy",
              "sq",
              "mk",
              "bs",
              "is",
              "ga",
              "cy",
              "mt",
              "la"
            ],
            "type": "string",
            "description": "🗣️ Which caption track to prefer. If the video has no track in this language we automatically fall back to English, then to whatever the video does offer — so you still get a transcript.",
            "default": "en"
          },
          "channelNameBoolean": {
            "title": "📺 Channel Name",
            "type": "boolean",
            "description": "Add the channel name the video was published on — e.g. `Selena Gomez`.",
            "default": false
          },
          "channelIDBoolean": {
            "title": "🆔 Channel ID",
            "type": "boolean",
            "description": "Add the channel's unique ID — e.g. `UCjK8ORC71kwyj1DWFwril_A`.",
            "default": false
          },
          "datePublishedBoolean": {
            "title": "📅 Date Published",
            "type": "boolean",
            "description": "Add the full publish timestamp — e.g. `2024-02-22T23:00:12.000Z`.",
            "default": false
          },
          "dateTextBoolean": {
            "title": "🗓️ Date Text",
            "type": "boolean",
            "description": "Add the friendly publish date — e.g. `Feb 22, 2024`.",
            "default": false
          },
          "relativeDateTextBoolean": {
            "title": "⏳ Relative Date Text",
            "type": "boolean",
            "description": "Add how long ago the video went live — e.g. `2 years ago`.",
            "default": false
          },
          "viewCountBoolean": {
            "title": "👀 View Count",
            "type": "boolean",
            "description": "Add the view count — e.g. `27,406,159 views`.",
            "default": false
          },
          "likesBoolean": {
            "title": "👍 Likes",
            "type": "boolean",
            "description": "Add the number of likes — e.g. `564,840`.",
            "default": false
          },
          "commentsBoolean": {
            "title": "💬 Comments",
            "type": "boolean",
            "description": "Add the number of comments — e.g. `30,915`.",
            "default": false
          },
          "keywordsBoolean": {
            "title": "🏷️ Keywords",
            "type": "boolean",
            "description": "Add the video's tags / keywords as a comma-separated string.",
            "default": false
          },
          "thumbnailBoolean": {
            "title": "🖼️ Thumbnail URL",
            "type": "boolean",
            "description": "Add a direct link to the video's thumbnail image.",
            "default": false
          },
          "descriptionBoolean": {
            "title": "📄 Description",
            "type": "boolean",
            "description": "Add the full video description text.",
            "default": false
          },
          "maxConcurrency": {
            "title": "⚡ Parallel videos",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "🚀 How many videos to work on at the same time. Higher is faster but pushes harder on the target. `4` is a good balance for most runs.",
            "default": 4
          },
          "requestDelaySecs": {
            "title": "🐢 Delay between requests (seconds)",
            "minimum": 0,
            "maximum": 10,
            "type": "number",
            "description": "⏱️ A polite pause before each request starts. Decimals allowed. Raise it if you are scraping a very large batch; `0` removes the pause entirely.",
            "default": 1
          },
          "maxRetries": {
            "title": "🔁 Maximum retries",
            "minimum": 3,
            "maximum": 12,
            "type": "integer",
            "description": "🛟 How many times a single video is retried before it is skipped. Raise this if you are collecting a big batch and want the best possible success rate.",
            "default": 8
          },
          "proxyConfiguration": {
            "title": "🛡️ Network configuration",
            "type": "object",
            "description": "🌐 **Optional — leave off unless you need it.** Blocking is handled for you automatically. Only change this if your workflow requires a specific network route or country.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}