{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper - Channels & Playlists",
    "description": "Bulk YouTube transcripts from videos, whole channels and playlists: publish-date window, language priority with fallback, uploaded vs auto captions, video metadata and only-new-since-last-run.",
    "version": "0.4",
    "x-build-id": "s2OjtTm8Jl1WuMFfg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datagrit~youtube-channel-playlist-transcripts/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datagrit-youtube-channel-playlist-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/datagrit~youtube-channel-playlist-transcripts/runs": {
      "post": {
        "operationId": "runs-sync-datagrit-youtube-channel-playlist-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/datagrit~youtube-channel-playlist-transcripts/run-sync": {
      "post": {
        "operationId": "run-sync-datagrit-youtube-channel-playlist-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": "Any mix of YouTube links and IDs, one per line: video links (watch, youtu.be, Shorts, live, embed) or 11-character video IDs; channel links (https://www.youtube.com/@TED, /channel/UC..., /c/..., /user/...) or bare @handles; playlist links (https://www.youtube.com/playlist?list=PL...) or playlist IDs. A channel link ending in /shorts or /streams reads that tab. A watch link that also carries &list= is read as that single video; use the /playlist?list= link for the whole playlist. If the list is empty, the Actor runs a small free example (3 videos from @TED) and says so in the status message.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Maximum transcripts",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many transcripts in total across all sources. Only delivered transcripts count and are charged; rows for videos without captions are free and do not count.",
            "default": 100
          },
          "maxVideosPerSource": {
            "title": "Maximum videos per channel or playlist",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "How many videos to take from each channel or playlist (channels newest first, playlists in playlist order). Videos without captions count toward this limit; videos outside the publish-date window, without the title keywords or already delivered by an earlier run do not. 0 = no per-source limit (the run still stops at Maximum transcripts and reads at most 50 listing pages, about 5,000 videos, per source).",
            "default": 50
          },
          "channelContent": {
            "title": "Channel content",
            "enum": [
              "videos",
              "shorts",
              "live",
              "all"
            ],
            "type": "string",
            "description": "Which uploads to read from a channel: long-form videos (the channel's Videos tab), Shorts, live stream replays, or all uploads mixed. A channel link ending in /shorts or /streams overrides this for that channel. YouTube lists only the newest Shorts of a channel (measured: 100 of 520 for @TED); the run status says when a list is shorter than the channel's total.",
            "default": "videos"
          },
          "publishedAfter": {
            "title": "Published on or after",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}([T ][0-9:.]+(Z|[+-]\\d{2}:?\\d{2})?)?$|^\\d{1,4}\\s*(day|week|month|year)s?(\\s+ago)?$",
            "type": "string",
            "description": "Only videos published on or after this date (UTC). Use a date like 2026-09-01 or a period back from the run start like 7 days, 2 weeks, 3 months or 1 year. Checked against each video's exact publish date. On channels the listing stops once it reaches older videos. Leave empty for no lower limit.",
            "default": ""
          },
          "publishedBefore": {
            "title": "Published before",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}([T ][0-9:.]+(Z|[+-]\\d{2}:?\\d{2})?)?$|^\\d{1,4}\\s*(day|week|month|year)s?(\\s+ago)?$",
            "type": "string",
            "description": "Only videos published before this date (UTC, the day itself excluded), same format as above. Leave empty for no upper limit. On a channel the newer videos still have to be listed first, so a far-back window reads more listing pages.",
            "default": ""
          },
          "titleKeywords": {
            "title": "Title keywords",
            "type": "array",
            "description": "Only videos whose title contains at least one of these words or phrases (case-insensitive substring match). Leave empty to take every video.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "languages": {
            "title": "Caption languages",
            "type": "array",
            "description": "Caption language codes in order of preference, for example en, es, pt-BR. The first language the video has wins; en also matches en-US and en-GB, and pt-BR also matches pt. Leave empty to take the video's default caption track (usually its spoken language).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "captionType": {
            "title": "Caption type",
            "enum": [
              "manualFirst",
              "autoFirst",
              "manualOnly",
              "autoOnly"
            ],
            "type": "string",
            "description": "Uploaded (manual) captions are written by the channel; auto-generated captions come from YouTube speech recognition. Choose which to prefer within each language, or accept only one kind.",
            "default": "manualFirst"
          },
          "languageFallback": {
            "title": "Fall back to another language",
            "type": "boolean",
            "description": "When a video has none of the caption languages above, return its default caption track instead (the row says isLanguageFallback: true). Turn off to get a free row with reason languageNotAvailable instead.",
            "default": true
          },
          "includeSegments": {
            "title": "Include timestamped segments",
            "type": "boolean",
            "description": "Add the caption lines with start time and duration in seconds (segments). The full plain text (transcriptText) is always included.",
            "default": true
          },
          "onlyNewSinceLastRun": {
            "title": "Only videos new since my last run",
            "type": "boolean",
            "description": "For scheduled runs. On a channel the Actor remembers every video an earlier run with the same settings read (with or without a transcript) and stops the listing (newest first) at the first of them, so each run returns only the uploads published since the last run; the first run returns the newest videos up to the per-channel limit. Videos in a temporary state are not remembered and are read again next time: upcoming premieres and scheduled live streams, empty caption files, YouTube bot checks, failed requests and videos without a publish date while a date window is set. On a channel they are read again only while they are newer than the stop point. On playlists and single videos, videos whose transcript was already delivered are skipped and videos without a transcript are tried again. The memory is kept per source and per combination of channel content, date window, title keywords, languages and caption settings (plus the optional memory name).",
            "default": false
          },
          "stateKey": {
            "title": "Only-new memory name",
            "type": "string",
            "description": "Optional name that keeps a separate only-new memory, for example one per schedule or per client. Runs with the same sources, settings and name share the memory.",
            "default": ""
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "YouTube is read through Apify Proxy (datacenter) by default. The Actor switches to a new proxy session when YouTube asks for a sign-in bot check, rate-limits, or returns an empty caption file. If a run fails with a block message, switch to the RESIDENTIAL group.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}