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:
| Method | Install | Output | Best for |
|---|---|---|---|
| CLI | npx -y firecrawl-cli@latest init --all --browser | File on disk | Long videos — keeps token usage low |
| Claude plugin | claude plugin install firecrawl@claude-plugins-official | Inline in chat | Quick 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.
Plugin — after installing, use /firecrawl:scrape <URL> to get the transcript inline, or /firecrawl:agent "Extract the full transcript from [URL]" for Firecrawl's AI agent to handle edge cases autonomously.
Both handle JavaScript rendering and page structure changes automatically. Get a free API key at firecrawl.dev.
data from the web