{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper: Channels, Playlists, SRT, Text",
    "description": "YouTube transcript scraper and API: get captions for any video, Short, channel, playlist or search as text, timestamped segments or SRT. $3 per 1,000 transcripts, charged only when a transcript is returned. No API key, no login.",
    "version": "0.1",
    "x-build-id": "wSiXJzmTxpcIZcR89"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datagleaner~youtube-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datagleaner-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/datagleaner~youtube-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-datagleaner-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/datagleaner~youtube-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-datagleaner-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": {
          "videos": {
            "title": "Videos",
            "type": "array",
            "description": "Video URLs (watch, youtu.be, Shorts, embed, live) or 11-character video IDs, one per line. A channel or playlist URL pasted here works too. Leave every source empty to run three sample videos.",
            "items": {
              "type": "string"
            }
          },
          "channelUrl": {
            "title": "Channel URL",
            "type": "string",
            "description": "Optional. A channel URL, @handle or channel ID (UC...). The latest videos are listed, then each transcript is fetched."
          },
          "playlistUrl": {
            "title": "Playlist URL",
            "type": "string",
            "description": "Optional. A playlist URL (with `list=`) or playlist ID. Videos are listed in playlist order."
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Optional. Search YouTube for videos and fetch the transcript of each result."
          },
          "maxVideos": {
            "title": "Max videos per channel, playlist or search",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many videos to take from the channel, the playlist and the search (each one separately). Does not limit the `videos` list.",
            "default": 10
          },
          "publishedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Optional. Only videos published on or after this day, for channel, playlist and search sources (the `videos` list is never filtered). A date such as `2026-01-31` or a relative age such as `7 days`. Videos outside the range are skipped and not charged. Max videos then counts matching videos only. A `1 day` window covers yesterday and today, so on daily runs turn on `onlyNew` to avoid receiving (and paying for) the same video twice."
          },
          "publishedBefore": {
            "title": "Published before",
            "type": "string",
            "description": "Optional. Only videos published on or before this day, for channel, playlist and search sources. A date such as `2026-03-31` or a relative age such as `30 days`. Videos outside the range are skipped and not charged."
          },
          "onlyNew": {
            "title": "Only new videos since the last run",
            "type": "boolean",
            "description": "For scheduled runs. Remembers every video this Actor delivered for each channel, playlist, search or video list and skips those next time, before any request and before any charge. Videos with no captions yet are not remembered, so they are retried on the next run. Ignored when no source is given (the sample run).",
            "default": false
          },
          "stateKey": {
            "title": "State name",
            "type": "string",
            "description": "Only used with `onlyNew`. Leave empty to use the name `default`. Runs that share a name share their memory of delivered videos; give each monitor its own name (for example `ai-channels`)."
          },
          "language": {
            "title": "Preferred language",
            "type": "string",
            "description": "Language code of the transcript you want, such as `en`, `es`, `de`, `ja` or `pt-BR`. Without it the video's original or auto-generated track is used, and the item says so in `language` and `languageFallback`.",
            "default": "en"
          },
          "includeTimestamps": {
            "title": "Include timestamps",
            "type": "boolean",
            "description": "Put `start` and `duration` (in seconds) on every segment. Turn off to get segments with the text only.",
            "default": true
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "segments",
              "text",
              "srt",
              "all"
            ],
            "type": "string",
            "description": "`transcriptText` is always included. Segments add a timed list; SRT adds a subtitle file as one string.",
            "default": "segments"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Leave it empty: direct requests come first, and if YouTube blocks them the Actor switches to Apify residential proxy by itself, at no extra charge to you. A proxy set here is used for every request instead."
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Videos fetched at the same time.",
            "default": 5
          },
          "delaySecs": {
            "title": "Random start delay (seconds)",
            "minimum": 0,
            "maximum": 30,
            "type": "number",
            "description": "Each video waits a random time up to this long before its first request, to spread the load.",
            "default": 0.3
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "How long to wait for one YouTube response.",
            "default": 25
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}