{
  "openapi": "3.0.1",
  "info": {
    "title": "Transcript Cleaner: SRT/VTT Subtitles to Text & RAG Chunks",
    "description": "Clean SRT, VTT and transcript text: remove timestamps, fillers (um, uh), speaker labels, [Music] tags and repeated YouTube caption lines. Get clean text, paragraphs or RAG chunks with token limit, overlap and timestamps. Reads transcript scraper datasets. $1 per 1,000.",
    "version": "0.1",
    "x-build-id": "PwVCqA3cHQebZcnIS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/open-data-tools~srt-vtt-transcript-cleaner/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-open-data-tools-srt-vtt-transcript-cleaner",
        "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/open-data-tools~srt-vtt-transcript-cleaner/runs": {
      "post": {
        "operationId": "runs-sync-open-data-tools-srt-vtt-transcript-cleaner",
        "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/open-data-tools~srt-vtt-transcript-cleaner/run-sync": {
      "post": {
        "operationId": "run-sync-open-data-tools-srt-vtt-transcript-cleaner",
        "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": {
          "transcriptUrls": {
            "title": "Transcript or subtitle file links",
            "type": "array",
            "description": "Direct links to .srt, .vtt, .txt or .json transcript files (one per line). Google Drive, Dropbox and GitHub share links work. A JSON link that holds a list of records (a dataset export) is cleaned record by record.",
            "items": {
              "type": "string"
            }
          },
          "text": {
            "title": "Paste a transcript",
            "type": "string",
            "description": "Paste one SRT, VTT, YouTube 'Show transcript' copy, Otter/Rev/Zoom export or plain text."
          },
          "datasetId": {
            "title": "Dataset ID from a transcript scraper run",
            "type": "string",
            "description": "Clean every item in another Actor's dataset, for example a YouTube, TikTok, Loom or podcast transcript scraper run. Pick it from your storage, or paste its ID. The transcript field is found automatically (transcript, data, timestamped, transcript_json, captions, srt, vtt, text and more). In an Actor-to-Actor integration set it to {{resource.defaultDatasetId}}."
          },
          "textField": {
            "title": "Transcript field (optional)",
            "type": "string",
            "description": "Only if auto-detection picks the wrong field: the dataset field that holds the transcript. Dots go into nested objects, for example result.transcript."
          },
          "outputMode": {
            "title": "Output",
            "enum": [
              "document",
              "chunks"
            ],
            "type": "string",
            "description": "Document: one row per transcript with the clean text and paragraphs. Chunks: one row per RAG chunk with token count, start/end time and a YouTube timestamp link, ready for embeddings or a vector database.",
            "default": "document"
          },
          "chunkTokens": {
            "title": "Chunk size (tokens)",
            "minimum": 32,
            "maximum": 32000,
            "type": "integer",
            "description": "Maximum tokens per chunk. Chunks end at a sentence where possible.",
            "default": 500
          },
          "chunkOverlapTokens": {
            "title": "Chunk overlap (tokens)",
            "minimum": 0,
            "maximum": 4000,
            "type": "integer",
            "description": "Tokens repeated from the end of one chunk at the start of the next (at most half the chunk size). Snaps to a sentence start when one fits.",
            "default": 50
          },
          "tokenizer": {
            "title": "Tokenizer",
            "enum": [
              "cl100k_base",
              "o200k_base"
            ],
            "type": "string",
            "description": "How tokens are counted. cl100k_base matches OpenAI text-embedding-3 and GPT-4; o200k_base matches GPT-4o and later.",
            "default": "cl100k_base"
          },
          "removeFillers": {
            "title": "Remove filler words",
            "type": "boolean",
            "description": "Removes um, uh, erm, ah, hmm and similar, and fixes the comma and capital letter around them.",
            "default": true
          },
          "extraFillers": {
            "title": "Extra words or phrases to remove",
            "type": "array",
            "description": "Your own list, for example 'you know', 'I mean', 'like'. Matched as whole words, case-insensitive.",
            "items": {
              "type": "string"
            }
          },
          "speakerLabels": {
            "title": "Speaker labels",
            "enum": [
              "remove",
              "keep"
            ],
            "type": "string",
            "description": "Speaker names from 'Name:', 'Speaker 1 (00:01):', Otter-style headers, VTT <v Name> tags and YouTube '>>' marks. Remove them, or keep them once per speaker turn as 'Name: '.",
            "default": "remove"
          },
          "removeDuplicates": {
            "title": "Remove repeated caption lines",
            "type": "boolean",
            "description": "YouTube auto-captions and live captions repeat each line in the next cue. This drops the repeats and overlapping words.",
            "default": true
          },
          "removeSoundTags": {
            "title": "Remove sound tags",
            "type": "boolean",
            "description": "Removes [Music], [Applause], (laughs), [inaudible], ♪ lyrics ♪ and other bracketed cues.",
            "default": true
          },
          "removeStutters": {
            "title": "Remove stutters",
            "type": "boolean",
            "description": "Turns 'the the' into 'the'.",
            "default": true
          },
          "paragraphs": {
            "title": "Split into paragraphs",
            "type": "boolean",
            "description": "Paragraph breaks at speaker changes, long pauses and blank lines, and every ~120 words at a sentence end. Off gives one line of text.",
            "default": true
          },
          "pauseSeconds": {
            "title": "Pause that starts a new paragraph (seconds)",
            "minimum": 0,
            "maximum": 60,
            "type": "integer",
            "description": "A silence this long between cues starts a new paragraph. 0 turns it off.",
            "default": 2
          },
          "maxParagraphWords": {
            "title": "Paragraph length (words)",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Start a new paragraph at the next sentence end after this many words. 0 turns it off.",
            "default": 120
          },
          "maxTranscripts": {
            "title": "Max transcripts",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many transcripts. Empty means no limit."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}