5 Best YouTube Transcript APIs for AI Agents (Tested)
The free youtube-transcript-api library was the fastest YouTube transcript API I tested on December 2, 2026, pulling a 26-minute video into Claude Code in 2.6 seconds. The bigger finding: where your agent runs decides which tool you can count on.
How I Tested These YouTube Transcript APIs (and What I Didn't)
In this post, a YouTube transcript API is a tool an AI agent can call to turn a YouTube link into the video's caption text: a Python library, a paid REST API, an Apify Actor or a command-line tool.
The test video was my own walkthrough on tracking AI search visibility, 26 minutes 28 seconds long, with YouTube's auto-generated captions only. Every tool got the same link from my Mac, and I saved what came back, how long it took and what it cost.
This tested pulling existing captions from my home connection. It did not cover a cloud server, transcription accuracy or videos without captions. The cloud warnings below come from each tool's own docs.
Google's top two results for this search are the library's own pages. Most of the rest are vendors selling an API, so I ran my own test.
Four tools returned the transcript, and the library, DataForSEO and Blotato each came back at about 5,380 words. The differences that matter are timestamps, freshness, price and whether the tool keeps working once your agent leaves your laptop.
| Tool | Best for | Cost per 1,000 transcripts | Timestamps | Result in my test |
|---|---|---|---|---|
| youtube-transcript-api | Claude Code on your own computer | Free (cloud servers may need paid proxies) | Yes | 825 lines in 2.6 seconds |
| DataForSEO | Cloud agents that need timestamped transcripts | $1.80 in the Standard queue, $6 in Live mode | Yes, start, end and duration | 824 lines in 5.7 seconds for $0.006 |
| Apify (johnvc Actor) | Bulk channel pulls from Apify, n8n or Make | $2.75 on Apify's free plan (the Store page says "from $2.00") | Yes | 768 lines in 3 seconds, served from a 32-day-old cache |
| Blotato | Turning a video into social posts | No per-transcript fee on paid plans (Solo is $29 a month) | No | Full text for 0 credits |
| yt-dlp | Saving caption files with a video download | Free | Yes, in subtitle files | Blocked with HTTP 429 on all four tries |
Why Your Agent's Location Changes the Answer
The free library asks YouTube for captions straight from whatever machine runs it. On my Mac, that worked both times.
Its own README warns that YouTube "has started blocking most IPs that are known to belong to cloud providers (like AWS, Google Cloud Platform, Azure, etc.)" and recommends rotating residential proxies.
That splits this list in two. Claude Code on a laptop can lean on the free library. An agent on a cloud server or a hosted n8n instance needs a paid API that makes the request for it, or a proxy bill of its own.
YouTube's official Data API doesn't solve this either. Its caption download needs OAuth sign-in and "requires the user to have permission to edit the video," so it works for your own channel and not for anyone else's. My test with a plain API key listed the caption track, then returned a 401 error on the download.
Best YouTube Transcript APIs for AI Agents in 2026
Ranked by how well each one got a full transcript into Claude Code in my test. Timestamps, cost per 1,000 videos and each tool's documented cloud limits all count. The library ranks first because it was the fastest and costs nothing, as long as your agent runs on your own computer.
1. youtube-transcript-api (Best for Claude Code on your own computer)
youtube-transcript-api is a free, open-source Python package, and the name Google ranks first for this search. You install it and run it yourself, and its GitHub page says it needs no API key and no headless browser.
Claude Code installed it with one pip install and fetched my video twice: 825 lines in 2.6 seconds, then 824 lines in 1.1 seconds. It also listed 14 auto-generated language tracks for the video and can return YouTube's own translation.
Pros:
- Free under the MIT license, with 8.7k GitHub stars and a new release (1.2.5) on November 5, 2026.
- Timestamps on every line, plus built-in formatters for plain text, JSON, SRT and WebVTT.
- No account, no API key and no per-video fee.
Cons:
- YouTube blocks most cloud-provider IPs, per the README, so a cloud agent needs rotating residential proxies. The README recommends Webshare through a referral link that supports the project.
- Age-restricted videos are off the table for now. The README says cookie sign-in is broken.
- An open-source project with no support contract, so a YouTube change can break it until a fix ships.
Best for: Claude Code, Codex or any agent running on your own computer.
Pricing: Free. Proxies, if you need them, are billed by the proxy provider.
Free trial: Not needed. The library is free to install and use.
Bottom line: The first thing to try on a laptop. Once your agent moves to a server, add proxies or switch to a paid API.
2. DataForSEO (Best for cloud agents that need timestamped transcripts)
The SEO data API behind my keyword research has a YouTube subtitles endpoint. DataForSEO returns the transcript with start time, end time and duration on every line. My DataForSEO review covers the rest of the product.
My test used Live mode: 824 lines in 5.7 seconds for $0.006, one line short of the library's 825. DataForSEO makes the request from its own servers, so your agent's IP address never reaches YouTube.
Pros:
- $1.80 per 1,000 transcripts in the Standard queue (about 5 minutes per task), the lowest paid price on this list.
- Start, end and duration times on every line, ready for chapters or clip lists.
- Pay as you go, with no subscription. The same key covers Google results, keyword data and AI search data, and its MCP server already runs in my Claude Code setup.
Cons:
- A $50 minimum top-up after the $1 trial credit.
- Live mode costs $6 per 1,000, more than three times the Standard queue.
- The Standard queue takes about 5 minutes, so an agent waiting on a reply needs Live mode at the higher price.
Best for: Agents on a cloud server that need transcripts with timestamps.
Pricing: Pay as you go. Subtitles cost $0.0018 a video in the Standard queue, $0.0036 in Priority and $0.006 in Live mode.
Free trial: New accounts get a $1 trial credit, then a $50 minimum top-up.
Bottom line: The cheapest paid transcript on this list in the Standard queue, and the one I would point a cloud agent at first.
3. Apify YouTube Transcript Actor (Best for bulk channel pulls)
The Apify Store has several transcript Actors. The one I ran, YouTube Transcript & Subtitles Scraper by johnvc, charges per video, so a five-hour lecture costs the same as a Short. Claude Code ran it through Apify's MCP server, the plug-in standard Claude uses to call outside tools. My Apify alternatives breakdown prices this Actor against the free library on the same video.
It finished in 3 seconds with 768 timestamped lines, but that was a stored copy. The result was marked as cached, fetched from YouTube on October 31, 32 days before my run. The Actor reuses transcripts for up to 90 days and charges the same for a cached copy as a fresh one.
Pros:
- $2.75 per 1,000 videos on Apify's free plan, and the Store page lists "from $2.00" per 1,000. Failed videos and videos without captions aren't charged.
- Plain text, SRT and VTT in the same result, plus title, channel and view count at no extra charge.
- Lists a whole channel and fetches the transcripts in the same run, up to 100 per run.
Cons:
- Cached copies can be up to 90 days old, so a corrected caption track may take a while to show up.
- A community-maintained Actor whose price has already changed once, on October 13, 2026, "to cover proxy costs."
Best for: Bulk channel pulls, and anyone already running Apify from Claude, n8n or Make.
Pricing: Pay per video: $0.00275 a transcript on Apify's free plan, "from $2.00" per 1,000 on the Store page, plus fractions of a cent in start and storage fees per run.
Free trial: Apify's free plan includes $5 of usage a month, about 1,800 transcripts at the free-plan rate.
Bottom line: A simple way to pull a whole channel from Claude, n8n or Make. Check the fetched date on each result if freshness matters.
4. Blotato (Best for turning a video into social posts)
Blotato is the social media scheduler I post with, and its API and MCP server can pull a YouTube transcript as a "source" for writing posts. My Blotato review covers the scheduling side, and my YouTube repurposing workflow runs on this same transcript pull.
The extraction cost 0 credits and returned the full transcript, 5,372 words, in about 20 seconds. It came back as plain text with no timestamps, and 66 speaker-change markers came through as garbled HTML symbols that needed a cleanup step.
Pros:
- No per-transcript charge, because sources are unlimited on every paid plan.
- The same source call also reads TikTok videos, articles, PDFs and audio.
Cons:
- No timestamps, so the output can't feed chapters or clip lists.
- English captions only. Blotato's docs say a non-English video or one without captions fails.
- The 7-day free trial excludes the API and MCP server, so testing it from an agent means paying for Solo.
Best for: Creators who turn videos into posts and want one tool for both.
Pricing: Solo is $29 a month, billed monthly, with the API and MCP server included. Team is $97 a month and Agency is $197.
Free trial: 7 days with a card on file, without API or MCP access.
Bottom line: Worth using for transcripts if you already schedule posts with Blotato. As a standalone transcript API, the three above add timestamps without a subscription.
5. yt-dlp (Best for saving caption files with a video download)
yt-dlp is a free, open-source command-line video downloader. My runs used flags that skip the video and save only the subtitle files.
Four runs across two versions, including the latest 2026.11.23 release, all ended in HTTP 429 (too many requests) on the subtitle download. The library above worked from the same Mac right after.
Pros:
- Free under the Unlicense, with 212k GitHub stars.
- Saves captions, video, audio and metadata with one tool.
Cons:
- Blocked on all four of my runs while the library worked from the same connection.
- Command-line flags and output files take more wiring than a Python call or a REST API.
- My guess is cloud servers hit the same blocking the library warns about, since yt-dlp also talks to YouTube directly.
Best for: Workflows that already download the video file and want captions in the same step.
Pricing: Free.
Free trial: Not needed. yt-dlp is free and open source.
Bottom line: Worth retrying if you already download videos with it, but not the tool to build a transcript workflow on right now.
What About TranscriptAPI.com, Supadata and the Official YouTube API?
My three questions about YouTube transcript APIs went to ChatGPT, Claude, Gemini and Perplexity with web search on, through DataForSEO's AI answer APIs. In that December 2 snapshot of which tools get named, the library came up in all 12 answers, the official YouTube Data API in 10, TranscriptAPI.com in 9, Apify in 8 and Supadata in 7.
DataForSEO and Blotato didn't come up once. None of the tools below went through my transcript test (the official API only got the credentials check above), so they stay unranked, and the details come from each company's own pages:
- TranscriptAPI.com is a REST API and MCP server built for YouTube. A transcript costs 1 credit, new accounts get 100 free credits with no card, and the paid plan is $5 a month for 1,000 credits.
- Supadata charges 1 credit per transcript and can generate one with AI when a video has no captions, at 2 credits a minute. Its pricing page lists a free tier and plans "from $5/mo," notes that its Basic plan is annual-only, and says unused credits don't roll over.
- ScrapeCreators is a social media scraping API that 6 of the 12 AI answers named for transcripts. Its /pricing page returned a 404 in my check.
- The official YouTube Data API is free up to 10,000 quota units a day, but a caption download costs 200 units and only works on videos you can edit.
- Firecrawl's connector has a YouTube transcript capability at 5 credits a call. My daily credits ran out before I could run it, the same limit behind my Firecrawl alternatives test.
TranscriptAPI.com and Supadata also sponsor the library's README. Nothing wrong with that, but keep it in mind when you see them recommended side by side. If you test either one, run the same video through it and compare the line count, the timestamps and the bill.
How to Pick a YouTube Transcript API
Which YouTube Transcript API Should You Pick?
- Claude Code on your own computer: youtube-transcript-api.
- An agent on a cloud server: DataForSEO, Standard queue for batches and Live mode when the agent is waiting.
- A whole channel in one run: the Apify Actor.
- Videos into social posts: Blotato.
- Captions saved alongside a video download: yt-dlp, when YouTube lets it through.
These are the questions I ask before wiring a transcript tool into an agent:
- Where will the agent run? A cloud server means a paid API or a proxy bill.
- Do you need timestamps? Chapters, clip lists and quotes that link to a moment in the video all need them.
- How fresh does it need to be? A cached copy is fine for most videos, less so for one with corrected captions.
- What do 1,000 videos cost? From free to $6 for the pay-per-use tools on this list, before proxies.
- Library, REST API or MCP server? Claude Code can run a Python library in its own terminal. Hosted tools like n8n usually call an HTTP API or an MCP server.
youtube-transcript-api vs DataForSEO, in One Line Each
- youtube-transcript-api: free, fastest in my test, and likely blocked on cloud servers without proxies.
- DataForSEO: $1.80 to $6 per 1,000 transcripts, and your server's IP never matters because it makes the request for you.
What I Run Now for YouTube Transcripts
After this test, one-off transcripts in Claude Code on my Mac go through the free library. Anything running in the cloud goes to DataForSEO's Standard queue, on the same key as my SEO data.
Test from wherever your agent will actually run. A tool that works on your laptop can fail the day it moves to a server.
For Instagram, TikTok and X data, my social media scraper roundup covers the scrapers I tested.
YouTube Transcript API FAQs
Is the YouTube transcript API free?
The one Google ranks first is. youtube-transcript-api is a free, MIT-licensed Python library that needs no API key, and it pulled my 26-minute video in 2.6 seconds. On a cloud server it may not work without help. YouTube blocks most cloud-provider IPs, so you may need paid rotating proxies or a paid API like DataForSEO.
Which YouTube transcript API is the best?
For Claude Code on your own computer, youtube-transcript-api was the best in my December 2, 2026 test: free, fastest and timestamped. For agents running in the cloud, DataForSEO was the best paid option I tested, at $1.80 per 1,000 transcripts in its Standard queue or $0.006 a call in Live mode, with start and end times on every line.
Is it possible to get a transcript from YouTube without an API?
Yes. On YouTube's website, open the video's description and look for the Show transcript button to read and copy the captions by hand. That works for one video at a time. For an agent or a batch of videos, a transcript API skips the copy and paste: the free youtube-transcript-api library on your own computer, or a paid API like DataForSEO or Apify on a server.
Is there a YouTube transcript MCP server for Claude?
Yes, several. DataForSEO's MCP server includes a YouTube subtitles tool, the Apify Actor in this test runs through Apify's MCP server, and Blotato's MCP server pulls a video's transcript to write posts from. TranscriptAPI.com also offers its own YouTube MCP server. The free youtube-transcript-api library has no built-in MCP server, but Claude Code can run it directly in its terminal.
Can the official YouTube Data API download captions?
Only for videos you can edit. The captions.download method needs OAuth sign-in, costs 200 of the default 10,000 daily quota units and requires permission to edit the video. My plain API key got a 401 error on the download. For anyone else's videos, use a transcript API or the open-source library.
Disclosure: DataForSEO and Blotato pay me a commission on signups through my links. All five ranked tools went through my test, and TranscriptAPI.com, Supadata, ScrapeCreators and Firecrawl's transcript capability did not. All pricing checked December 2, 2026, with monthly billing where a plan offers it. Full disclosure.
