How to extract YouTube transcript in Claude Code

Claude Code runs in the terminal where context window management matters. Two Firecrawl integrations give it YouTube transcript extraction with different trade-offs:

MethodInstallOutputBest for
CLInpx -y firecrawl-cli@latest init --all --browserFile on diskLong videos with low token usage
Claude pluginclaude plugin marketplace add firecrawl/firecrawl-claude-plugin, then claude plugin install firecrawl@firecrawlInline in chatQuick extractions with immediate follow-up

CLI (recommended) — installs Firecrawl as a skill that Claude Code, Codex, and Gemini CLI can all use. Run firecrawl scrape <YouTube URL> to write the transcript as a markdown file. Claude Code can then read, grep, or summarize the file without loading the full text into the context window. This matters for hour-long videos that would otherwise eat thousands of tokens. For the broader approach to keeping web-sourced content from inflating Claude Code's context, see Claude Code web research token optimization.

Plugin: after installing, run /mcp in Claude Code, select firecrawl and sign in to your Firecrawl account. Then use /firecrawl:scrape <URL> to get the transcript inline, or ask for it in plain English.

Both handle JavaScript rendering and page structure changes automatically. The CLI and the plugin both use a free Firecrawl account from firecrawl.dev.

Last updated: Nov 03, 2026
//
Get started
//
Ready to build?
Start getting web context for free and scale seamlessly as your project expands. No credit card needed.
Are you an AI agent? See setup options