{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Captions API: Any Language, Timestamps",
    "description": "YouTube captions API: send video, channel, playlist or search inputs and get each video's captions as timed segments and full text, manual or auto-generated, in any language (translated with timings kept), with every caption track listed. JSON, CSV or SRT. No YouTube API key.",
    "version": "0.1",
    "x-build-id": "k9okyajIMCKUPaAuw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/deepmine~youtube-captions-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-deepmine-youtube-captions-api",
        "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/deepmine~youtube-captions-api/runs": {
      "post": {
        "operationId": "runs-sync-deepmine-youtube-captions-api",
        "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/deepmine~youtube-captions-api/run-sync": {
      "post": {
        "operationId": "run-sync-deepmine-youtube-captions-api",
        "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 links or video IDs",
            "type": "array",
            "description": "Videos, Shorts, channels (@handle; add /shorts or /streams for those tabs) or playlists, one per line, e.g. https://youtu.be/9bZkp7q19f0 or an 11-character ID. Empty, with no search = the 3 example videos.",
            "items": {
              "type": "string"
            }
          },
          "maxVideos": {
            "title": "📊 Max videos per input",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Each channel, playlist or search reads at most this many videos (newest first on a channel). A single video link is always one. You pay per transcript.",
            "default": 20
          },
          "languages": {
            "title": "🌐 Transcript languages",
            "type": "array",
            "description": "Language codes in order of preference, e.g. en, es, pt-BR. Captions people made in your language come first; otherwise the captions are translated (see translation). Empty = each video's spoken language, never an auto-dub.",
            "items": {
              "type": "string"
            }
          },
          "outputFormat": {
            "title": "📄 Output format",
            "enum": [
              "segments",
              "text",
              "srt",
              "vtt"
            ],
            "type": "string",
            "description": "Every row has the full plain text. Timed segments add start, end and text per caption line; SRT or WebVTT also add a ready subtitle file.",
            "default": "segments"
          },
          "searchQueries": {
            "title": "🔍 Search YouTube",
            "type": "array",
            "description": "Words to search on YouTube, one search per line, e.g. python tutorial. The top videos of each search are read, up to maxVideos. Empty = no search.",
            "items": {
              "type": "string"
            }
          },
          "translation": {
            "title": "🔤 Translation (when languages are set)",
            "enum": [
              "machine",
              "youtube",
              "none"
            ],
            "type": "string",
            "description": "Used only when a video has no captions in your language. Machine translation keeps every timestamp, at no extra cost. YouTube's own auto-translation is mostly refused for automated downloads. None keeps the original.",
            "default": "machine"
          },
          "captionType": {
            "title": "Caption type",
            "enum": [
              "any",
              "manual",
              "auto"
            ],
            "type": "string",
            "description": "Manual captions first, then auto-generated (default), or only one kind, e.g. Manual only for human-made captions.",
            "default": "any"
          },
          "searchShortsOnly": {
            "title": "Searches return Shorts only",
            "type": "boolean",
            "description": "Search YouTube Shorts instead of regular videos. Applies to 🔍 Search YouTube only.",
            "default": false
          },
          "publishedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Channels, playlists and searches read only videos newer than this date (e.g. 2026-09-01) or period (e.g. 7 days); a channel stops at its first older video. Video links are always read."
          },
          "publishedBefore": {
            "title": "Published before",
            "type": "string",
            "description": "Channels, playlists and searches read only videos published up to this date, that day included (e.g. 2026-08-31), or at least this old (e.g. 30 days). Video links are always read."
          },
          "includeEngagement": {
            "title": "Likes, comments, date and channel stats",
            "type": "boolean",
            "description": "Adds likeCount, commentCount, publishedAt and the channel's handle, subscribers, avatar and verified badge. One light extra request per video, no extra cost.",
            "default": true
          },
          "includeWordTimings": {
            "title": "Word-level timings",
            "type": "boolean",
            "description": "For auto-generated captions, adds the start time of every word inside each segment (a words list per segment).",
            "default": false
          },
          "maxConcurrency": {
            "title": "Videos at a time",
            "minimum": 1,
            "maximum": 32,
            "type": "integer",
            "description": "How many videos are read at once.",
            "default": 32
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Leave as is: Apify datacenter proxy. A video YouTube won't serve on datacenter IPs is read through a residential IP instead: one small call (a few KB), included in the transcript price.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}