{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube AI Transcript Extractor",
    "description": "Extract YouTube transcripts with AI-generated summary, topics, chapters, action items, sentiment, and quotable highlights. MCP-ready for Claude, GPT, and AI agents.",
    "version": "1.0",
    "x-build-id": "YIl7yPExdFna0bx5D"
  },
  "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",
            "uniqueItems": true,
            "type": "array",
            "description": "YouTube video URLs to analyze. Accepts full watch URLs (https://www.youtube.com/watch?v=ID), short youtu.be/ID links, Shorts URLs, and bare 11-character video IDs. Each URL is processed independently. NOT a channel URL or search query — for those use the youtube-transcript-extractor actor. Example: ['https://www.youtube.com/watch?v=dQw4w9WgXcQ'].",
            "items": {
              "type": "string"
            }
          },
          "includeSummary": {
            "title": "Include AI summary",
            "type": "boolean",
            "description": "Generate a concise narrative summary of the video using Claude Haiku 4.5. 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)",
            "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",
            "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"
          },
          "anthropicApiKey": {
            "title": "Anthropic API key (optional BYOK)",
            "type": "string",
            "description": "Optional. Provide your own Anthropic API key to use your own quota and reduce per-video AI cost. When left blank, the actor uses the platform key and charges the ai-enrichment event. Begins with 'sk-ant-'."
          },
          "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"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}