{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper",
    "description": "YouTube transcript API: captions and subtitles of videos, Shorts, playlists and whole channels as clean text, timestamped segments, SRT or VTT. Language picking, video metadata, auto residential fallback. 20% cheaper than the leader; failed videos are free.",
    "version": "1.0",
    "x-build-id": "pLYLLdJnSd1sNWneO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lagenuina_agency~youtube-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lagenuina_agency-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/lagenuina_agency~youtube-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lagenuina_agency-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/lagenuina_agency~youtube-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lagenuina_agency-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": {
          "youtube_url": {
            "title": "YouTube URLs or IDs",
            "description": "One URL as a string, or many as an array. Works with videos, Shorts, youtu.be links, embed / live / mobile URLs and bare 11-character video IDs. Playlist URLs (or IDs such as PL...) are expanded to their videos and transcribed; channel URLs (@handle, /channel/, /c/, /user/) are treated like the 'channel' input. Invalid entries become error rows and never stop the run. Same field name as johnvc/YoutubeTranscripts, so existing inputs work unchanged."
          },
          "channel": {
            "title": "Channel(s)",
            "description": "Optional. One channel or many: @handle, bare handle, channel ID (UC...) or any channel URL. A /videos, /shorts or /streams URL keeps that tab. Each channel is listed newest first up to 'Max videos'. Listing rows are free; enable 'Fetch transcripts for channel videos' to transcribe them."
          },
          "max_videos": {
            "title": "Max videos per channel / playlist",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "How many videos to take from each channel (newest first) or playlist. Default 100, max 5000.",
            "default": 100
          },
          "channel_transcripts": {
            "title": "Fetch transcripts for channel videos",
            "type": "boolean",
            "description": "If true, every listed channel video is also transcribed (charged per successful transcript). If false, channels are only listed (free).",
            "default": false
          },
          "playlist_transcripts": {
            "title": "Fetch transcripts for playlist videos",
            "type": "boolean",
            "description": "If true (default), every video of a playlist URL is transcribed. If false, the playlist is only listed (free).",
            "default": true
          },
          "languages": {
            "title": "Preferred languages",
            "type": "array",
            "description": "Ordered ISO 639-1 codes; the first language available wins (manual captions beat auto-generated ones in the same language). \"es\" also matches regional tracks like \"es-419\". Default [\"en\"]. If none matches, the row lists available_transcripts so you can retry.",
            "default": [
              "en"
            ],
            "items": {
              "type": "string"
            }
          },
          "translate_to": {
            "title": "Translate to",
            "type": "string",
            "description": "Optional ISO 639-1 code (e.g. \"it\", \"fr\"). The chosen transcript is translated by YouTube. If YouTube does not serve the translation, you get the original transcript plus a translation_error field."
          },
          "transcript_type": {
            "title": "Transcript type",
            "enum": [
              "any",
              "manual",
              "generated"
            ],
            "type": "string",
            "description": "Which caption tracks to consider: any (default), manual (human-made only) or generated (auto-generated only).",
            "default": "any"
          },
          "output_formats": {
            "title": "Extra output formats",
            "type": "array",
            "description": "Extra fields to add to each transcript: \"srt\" (SubRip), \"vtt\" (WebVTT), \"text\" (one line per caption). The joined text (non_timestamped) and the timestamped segments are always included.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "include_metadata": {
            "title": "Include video metadata",
            "type": "boolean",
            "description": "Title, description, channel, view count, duration, thumbnail, tags and was_live, from the same response as the captions: no extra request, no extra charge.",
            "default": true
          },
          "preserve_formatting": {
            "title": "Preserve formatting tags",
            "type": "boolean",
            "description": "Keep YouTube's <i> / <b> tags in caption text. Default false (clean text).",
            "default": false
          },
          "list_only": {
            "title": "List available transcripts only",
            "type": "boolean",
            "description": "Do not download captions: return, for each video, the caption tracks YouTube offers (languages, manual / auto-generated, translation targets). Free.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Videos processed in parallel.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy by default. If YouTube blocks the IP, the run switches to residential proxy automatically, at no extra cost to you.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}