{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube AI Transcript Extractor",
    "description": "Extract YouTube transcripts with an AI-generated summary, topics, chapters, action items, sentiment and quotable highlights. Built for research workflows and AI agents.",
    "version": "1.1",
    "x-build-id": "OPkJXUj8VEYNRY8gb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~youtube-ai-transcript-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-youtube-ai-transcript-extractor",
        "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/khadinakbar~youtube-ai-transcript-extractor/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-youtube-ai-transcript-extractor",
        "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/khadinakbar~youtube-ai-transcript-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-youtube-ai-transcript-extractor",
        "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",
        "required": [
          "videoUrls"
        ],
        "properties": {
          "videoUrls": {
            "title": "YouTube video URLs",
            "minItems": 1,
            "maxItems": 200,
            "uniqueItems": true,
            "type": "array",
            "description": "1–200 YouTube video URLs or 11-character IDs. Supports watch, youtu.be, Shorts, live replays and embed links. Alternate links for the same video are analyzed once. Channels and playlists are not expanded.",
            "items": {
              "type": "string"
            }
          },
          "includeSummary": {
            "title": "Include AI summary",
            "type": "boolean",
            "description": "Generate a concise narrative summary of the video with AI. Length controlled by summaryLength. Default true. Set false to skip AI summarization and save cost when only structured fields are needed.",
            "default": true
          },
          "summaryLength": {
            "title": "Summary length",
            "enum": [
              "short",
              "medium",
              "long"
            ],
            "type": "string",
            "description": "How long the AI summary should be. 'short' = 2-3 sentences (~50 words), 'medium' = 1 paragraph (~150 words), 'long' = 3-4 paragraphs (~400 words). Default 'medium'. Only applies if includeSummary is true.",
            "default": "medium"
          },
          "includeTopics": {
            "title": "Include topic tags",
            "type": "boolean",
            "description": "Extract 3-8 topic/keyword tags representing the main themes of the video (e.g., 'machine learning', 'pricing strategy'). Useful for content categorization, search indexing, and semantic clustering. Default true.",
            "default": true
          },
          "includeChapters": {
            "title": "Include AI chapters",
            "type": "boolean",
            "description": "Generate timestamped chapter breakdown of the video — title + 1-sentence summary per chapter, based on transcript content. Useful for navigation, content discovery, and video TOC generation. Default true.",
            "default": true
          },
          "includeActionItems": {
            "title": "Include action items",
            "type": "boolean",
            "description": "Extract actionable takeaways or instructions mentioned in the video (e.g., 'subscribe to newsletter', 'try the recipe at 12:30'). Best for tutorial, how-to, and educational content. Default false — skip for entertainment/music videos.",
            "default": false
          },
          "includeSentiment": {
            "title": "Include sentiment analysis",
            "type": "boolean",
            "description": "Score the overall sentiment of the video transcript (positive / neutral / negative) with confidence. Useful for brand monitoring, review/feedback analysis. Default false.",
            "default": false
          },
          "includeQuotes": {
            "title": "Include quotable highlights",
            "type": "boolean",
            "description": "Extract 3-6 standalone quotable lines from the transcript with their timestamps and surrounding context. Useful for social-media clips, blog quotes, podcast pull-quotes. Default false.",
            "default": false
          },
          "transcriptLanguage": {
            "title": "Transcript language (ISO 639-1)",
            "pattern": "^[a-zA-Z]{2,3}(-[a-zA-Z0-9]{2,8})?$",
            "maxLength": 16,
            "type": "string",
            "description": "Preferred caption language to fetch from YouTube. ISO 639-1 code (e.g., 'en', 'es', 'fr', 'de', 'ja'). Falls back to English then the first available track if the requested language is not present. Default 'en'.",
            "default": "en"
          },
          "aiOutputLanguage": {
            "title": "AI output language",
            "maxLength": 60,
            "type": "string",
            "description": "Language the AI fields (summary, topics, chapters, etc.) are written in. Independent of transcriptLanguage — you can fetch a Japanese transcript and have the summary written in English. Plain language name or ISO code. Default 'English'.",
            "default": "English"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings used for the YouTube transcript fetch (YouTube blocks datacenter IPs on some videos). Defaults to Apify residential. AI calls bypass this proxy.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "includeKeyTakeaways": {
            "title": "Include key takeaways",
            "type": "boolean",
            "description": "Add up to eight concise, transcript-supported takeaways in aiKeyTakeaways. Uses the existing AI enrichment event. Default false preserves transcript-only inputs.",
            "default": false
          },
          "includeTranscript": {
            "title": "Include transcript in output",
            "type": "boolean",
            "description": "Include transcriptText and timestamped transcriptSegments in Dataset records. Disable for compact summary exports; the transcript is still fetched and used for AI, and private run checkpoints retain it.",
            "default": true
          },
          "questions": {
            "title": "Questions about the video",
            "maxItems": 5,
            "uniqueItems": true,
            "type": "array",
            "description": "Optional. Up to 5 questions (for example: \"What tools does the speaker recommend?\"). Each video gets one answer per question in aiAnswers, based only on what the transcript says. Counts as AI analysis: one ai-enrichment event per video.",
            "items": {
              "type": "string"
            }
          },
          "includeSubtitleFiles": {
            "title": "Save SRT and VTT subtitle files",
            "type": "boolean",
            "description": "Save a ready-to-use .srt and .vtt subtitle file for every video with a transcript. The download links are in srtUrl and vttUrl. No extra charge.",
            "default": 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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}