{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Corpus Audit & RAG Readiness",
    "description": "Extract public YouTube captions, audit transcript coverage, score RAG readiness, and create timestamped supporting chunks without double charging report mode.",
    "version": "0.1",
    "x-build-id": "w22dHb35dy4pd0eUQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/taroyamada~youtube-channel-transcript-rag-intelligence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-taroyamada-youtube-channel-transcript-rag-intelligence",
        "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/taroyamada~youtube-channel-transcript-rag-intelligence/runs": {
      "post": {
        "operationId": "runs-sync-taroyamada-youtube-channel-transcript-rag-intelligence",
        "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/taroyamada~youtube-channel-transcript-rag-intelligence/run-sync": {
      "post": {
        "operationId": "run-sync-taroyamada-youtube-channel-transcript-rag-intelligence",
        "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": {
          "videoUrls": {
            "title": "Video URLs",
            "type": "array",
            "description": "YouTube watch, Shorts, embed, live, or youtu.be URLs.",
            "default": [
              "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
            ],
            "items": {
              "type": "string"
            }
          },
          "videoIds": {
            "title": "Video IDs",
            "type": "array",
            "description": "Direct 11-character YouTube video IDs.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "channelUrls": {
            "title": "Channel URLs or @handles",
            "type": "array",
            "description": "YouTube channel URLs or bare @handles. The actor expands public channel pages into visible video IDs.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "playlistUrls": {
            "title": "Playlist URLs",
            "type": "array",
            "description": "Optional public playlist URLs to expand into visible video IDs.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "language": {
            "title": "Preferred Caption Language",
            "type": "string",
            "description": "Preferred caption language code such as en, ja, or es.",
            "default": "en"
          },
          "includeAutoGenerated": {
            "title": "Include Auto-generated Captions",
            "type": "boolean",
            "description": "Allow YouTube auto-generated captions when manual captions are unavailable.",
            "default": true
          },
          "translationLanguage": {
            "title": "Translation Language",
            "type": "string",
            "description": "Optional YouTube transcript translation target language code.",
            "default": ""
          },
          "maxVideos": {
            "title": "Max Videos",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum videos to process in one run.",
            "default": 5
          },
          "chunkSize": {
            "title": "Chunk Size",
            "minimum": 250,
            "maximum": 8000,
            "type": "integer",
            "description": "Approximate maximum transcript characters per RAG chunk.",
            "default": 1200
          },
          "chunkOverlap": {
            "title": "Chunk Overlap",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Approximate overlap characters carried from the previous chunk, segment-aligned.",
            "default": 150
          },
          "maxTranscriptChars": {
            "title": "Max Transcript Characters",
            "minimum": 500,
            "maximum": 500000,
            "type": "integer",
            "description": "Maximum transcript text characters to chunk per video.",
            "default": 100000
          },
          "timeoutMs": {
            "title": "HTTP Timeout",
            "minimum": 3000,
            "maximum": 60000,
            "type": "integer",
            "description": "Request timeout in milliseconds.",
            "default": 15000
          },
          "reportTier": {
            "title": "Report Tier",
            "enum": [
              "corpus_snapshot",
              "rag_readiness",
              "chunks"
            ],
            "type": "string",
            "description": "Public report tiers produce one decision-ready audit report. Use chunks only when you need legacy per-chunk output; watch summaries are planned and proof-gated.",
            "default": "corpus_snapshot"
          },
          "maxChargeUsd": {
            "title": "Max Charge USD",
            "minimum": 0,
            "maximum": 500,
            "type": "number",
            "description": "Safety cap checked before report-tier charging. If the selected report price exceeds this cap, the actor returns a no-charge limit_reached row.",
            "default": 9
          },
          "maxReports": {
            "title": "Max Reports",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Report-mode safety limit. V1 emits one corpus report per run.",
            "default": 1
          },
          "demoMode": {
            "title": "Demo Mode",
            "type": "boolean",
            "description": "Return a no-charge sample report without external requests.",
            "default": false
          },
          "dedupeVideos": {
            "title": "Dedupe Videos",
            "type": "boolean",
            "description": "Remove duplicate video IDs after combining video, playlist, and channel sources.",
            "default": true
          },
          "limit": {
            "title": "Result Row Limit",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum chunk/warning rows to emit.",
            "default": 50
          },
          "delivery": {
            "title": "Delivery Mode",
            "enum": [
              "dataset",
              "webhook",
              "dataset_and_webhook"
            ],
            "type": "string",
            "description": "Choose whether to write rows to the dataset, post the final payload to webhookUrl, or both.",
            "default": "dataset"
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "HTTPS endpoint used when delivery is webhook or dataset_and_webhook.",
            "default": ""
          },
          "dryRun": {
            "title": "Dry Run",
            "type": "boolean",
            "description": "Validate input and emit sample RAG rows without fetching YouTube or delivering dataset/webhook output.",
            "default": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}