youtube-transcript-fetcher is an OpenClaw skill and CLI for extracting full YouTube transcripts reliably.
Instead of generating a short summary first, it returns the transcript text itself. That means OpenClaw can read the full content of the video directly and decide for itself how to analyze, summarize, translate, quote, or structure it.
A lot of YouTube transcript tools fail on videos where normal caption fetching breaks, or only work when the uploader has explicitly provided subtitle tracks.
youtube-transcript-fetcher takes a more resilient path:
watch page scrape -> INNERTUBE_API_KEY extraction -> InnerTube player API fallback across multiple client profiles -> caption XML download -> transcript text extraction
This makes it much better at recovering transcripts from videos where simpler libraries return No transcript available.
It is built around three ideas.
First, it fetches the transcript itself, not just a summary. Because there is no summary layer in the middle, OpenClaw can inspect the entire spoken content and keep full context.
Second, it can often recover YouTube's automatic captions even when manually attached subtitles are not present. In practice, this is the big win. A video may look like it has no uploader-provided subtitle set, but YouTube auto-generated captions are still available through the InnerTube caption path.
Third, it outputs plain JSON with the transcript included, so it is easy to plug into other OpenClaw flows.
youtube-transcript-fetcher can extract transcripts from:
- a single YouTube video URL
- a recent set of videos from a channel or handle
- a batch config for repeated runs
When transcript extraction succeeds, the JSON output includes a transcript field containing the full extracted text.
The core recovery flow is:
- Fetch the YouTube watch page HTML
- Extract
INNERTUBE_API_KEY - Call
youtubei/v1/player - Try multiple client identities in order:
ANDROIDWEBTVHTML5_SIMPLY_EMBEDDED_PLAYERIOS
- Read caption track metadata from the player response
- Download the caption XML from the selected
baseUrl - Parse the XML into transcript text
This fallback approach is based on the same family of techniques used to recover captions in cases where normal transcript APIs are flaky.
A summary throws information away.
If the goal is to let OpenClaw understand a video well, returning only a summary is weaker than returning the transcript. With youtube-transcript-fetcher, OpenClaw can read the source material directly, which is better for:
- detailed analysis
- extracting exact claims or quotes
- translation
- structured output generation
- custom summaries tailored to the user's task
- reusing the transcript in other tools or agents
This is also what makes the output flexible downstream. Once you have the transcript, you can summarize it, translate it, extract quotes, or turn it into structured data later with whatever model and prompt you want.
So this project is intentionally transcript-first, not summary-first.
Single video:
./youtube-transcript-fetcher --url "https://www.youtube.com/watch?v=VIDEO_ID"It also accepts raw video IDs, youtu.be/..., and youtube.com/shorts/... URLs.
Recent videos from a channel or handle:
./youtube-transcript-fetcher --channel "@channel_handle" --hours 24Batch mode with config:
./youtube-transcript-fetcher --config config/channels.example.json --dailyYou can also write output to a specific file:
./youtube-transcript-fetcher --url "https://www.youtube.com/watch?v=VIDEO_ID" --output /tmp/youtube_transcript_fetcher.jsonThe tool writes JSON like this:
{
"generated_at": "2026-04-09T04:00:00+00:00",
"items": [
{
"video_id": "...",
"title": "...",
"url": "...",
"channel": "...",
"duration": "12:34",
"published": "20260408",
"has_transcript": true,
"metadata": {
"view_count": 12345,
"like_count": 678
},
"transcript": "full transcript text here"
}
],
"stats": {
"total_videos": 1,
"with_transcript": 1,
"without_transcript": 0
}
}If transcript extraction fails, has_transcript becomes false and an error message is included.
This project depends on:
python3yt-dlp- Python packages from
requirements.txt
Quick setup example:
pip install -r requirements.txtInstall yt-dlp with your package manager, for example:
brew install yt-dlpor:
sudo apt install yt-dlpThis repository is structured as an OpenClaw skill.
The simplest way is to clone or copy this repository into your OpenClaw skills directory.
Example:
cd ~/clawd/skills
git clone https://github.com/ioridev/youtube-transcript-fetcher.gitAfter that, OpenClaw can discover the skill from the SKILL.md metadata.
If you just want to run it directly, use the bash entrypoint:
./youtube-transcript-fetcherThe Python implementation lives at:
scripts/youtube_transcript_fetcher.pyDo not run python youtube-transcript-fetcher, because youtube-transcript-fetcher itself is a shell wrapper.
Typical OpenClaw-side use is: fetch the transcript first, then let OpenClaw read the transcript text directly for analysis, translation, extraction, or summarization.
A good pattern is:
- run
youtube-transcript-fetcheron the target video - get JSON containing
transcript - pass that transcript to OpenClaw as source material
That keeps the workflow transcript-first and avoids losing information through a premature summary layer.
One of the main reasons to use this project is that uploader-provided subtitles are not required.
If YouTube has generated automatic captions for the video, youtube-transcript-fetcher can often recover them even when ordinary transcript methods fail. That is the core value of the project.
This project fetches caption data directly from YouTube. It does not route caption downloads through a third-party proxy.
This repository is set up so Git tags can be used as the publish version.
The GitHub Actions workflow watches tags like v0.1.1 and publishes that exact version to ClawHub.
Example:
git tag v0.1.1
git push origin v0.1.1That will publish ClawHub version 0.1.1.
Before this works, add this repository secret in GitHub:
CLAWDHUB_TOKEN: your ClawHub API token used byclawdhub login --token ...
You can also trigger the workflow manually with workflow_dispatch and pass a version and changelog.
See LICENSE.