CleanScript API Documentation

Get clean, well-formatted transcripts from YouTube videos, specifically designed for LLMs.

Why CleanScript?

Bot Protection Handling

YouTube's frequent bot protection changes and captchas break most scraping tools. CleanScript handles these complexities for you, ensuring reliable transcript access.

Clean, Formatted Transcripts

Get properly punctuated, well-formatted transcripts that are immediately ready for LLMs without further processing or cleaning.

Semantic Chunking

Our semantic chunking intelligently groups subtitles by meaning, not just timestamps, creating coherent paragraphs that LLMs can better understand.

Production Ready

Built for developers with reliable uptime, clear rate limits, and detailed usage tracking to support production applications.

Example Output

Notice the clean formatting, proper punctuation, and coherent paragraphs in our transcript output:

1{
2  "title": "Introducing Large Language Models",
3  "description": "Learn about the revolutionary technology behind AI chatbots",
4  "channel": "AI Explained",
5  "duration": 360,
6  "totalTokenLength": 512,
7  "chapters": [
8    {
9      "title": "Introduction",
10      "startTime": 0.0,
11      "endTime": 65.5,
12      "transcript": "Welcome to this introduction to large language models. Today we'll be exploring how these models work, why they're so powerful, and what their limitations are. Large language models, or LLMs for short, have revolutionized natural language processing in recent years.",
13      "tokenLength": 180,
14      "subtitles": [
15        {
16          "startTime": 0.0,
17          "endTime": 4.2,
18          "text": "Welcome to this introduction to large language models."
19        },
20        {
21          "startTime": 4.3,
22          "endTime": 8.7,
23          "text": "Today we'll be exploring how these models work, why they're so powerful, and what their limitations are."
24        }
25      ]
26    }
27  ]
28}