We Benchmarked Three Ways to Get a YouTube Transcript: Home Connection vs Cloud Server

youtube-transcript-api, yt-dlp and a hosted API on 54 videos from a home connection and a cloud runner. Success rates, latency, failures, and every way the numbers can mislead you. Data and code are open.

00:08:00 · OCT 18, 2026

Quick answer

Where your code runs matters at least as much as which tool you pick. From a home connection all three methods worked for nearly every video. From a cloud server, the two free tools were blocked on their first request, and only the hosted API returned transcripts. One day, two networks, 54 videos: read the limits below before quoting any number.

We make GetYouTubeTranscript, which is one of the three methods tested, so we ran this in the open: the video list was fixed before the first result, and the code and raw data are public. Results below are from 18 October 2026.

01

What we tested

Three ways to get the transcript of a YouTube video: youtube-transcript-api (a free Python library), yt-dlp (a free command line tool), and our hosted API, used only through its public documentation. Each ran the way its own documentation recommends.

The 54 videos were chosen from 1,049 search results in a fixed order, in categories: English videos with manual captions (short, medium, long), English videos with automatic captions only, Spanish, Hindi, Japanese and German videos, Shorts, and edge cases (captions disabled, age-restricted, unavailable). They ran from two places: a home connection in India and a GitHub-hosted runner, which uses a cloud address.

02

From a home connection

On the 44 videos that have captions, all three methods mostly worked. Latency is for successful requests, and for the hosted API only for responses that were not served from its cache.

MethodGot a transcriptMedian95th percentile
Hosted API (GetYouTubeTranscript)44 of 441.4 s11.8 s
youtube-transcript-api (library)44 of 441.6 s2.1 s
yt-dlp39 of 443.8 s6.3 s

yt-dlp's five misses were all HTTP 429 errors on the subtitle download, concentrated in Shorts and long videos with automatic captions. The hosted API's median looks fine, but its slow tail is real: 11.8 seconds at the 95th percentile, against about 2 seconds for the library. It is not explained by video length, since a 42-second video took 12 seconds. We do not know why yet.

03

From a cloud server

The same videos from a GitHub-hosted runner. A method that is blocked five times in a row stops, and its remaining videos are recorded as not attempted instead of being counted as failures.

MethodGot a transcriptWhat happened
Hosted API (GetYouTubeTranscript)43 of 44One HTTP 504 after 25 s. Median 0.9 s, 95th percentile 11.0 s.
youtube-transcript-api (library)0 of 5RequestBlocked on all 5 attempts, then stopped. 49 videos not attempted.
yt-dlp0 of 5Bot check on all 5 attempts, then stopped. 49 videos not attempted.

This is the result that matters most if you run code on a server, a serverless function or a workflow tool: free tools that fetch directly from YouTube can fail from the first request when the address belongs to a cloud provider. The library says so in its own documentation.

04

Where these numbers can mislead you

  • The library's score is partly circular. The caption labels used to choose the videos came from youtube-transcript-api itself. A video only entered a "has captions" category if the library could list its tracks. That favours the library and tells you nothing for or against the other two.
  • One network per type, one day. Another home connection, country or week can look different, and not every cloud address is treated alike.
  • Small sample. 54 videos support broad patterns. Treat gaps under about ten percentage points as noise.
  • Cache. The hosted API caches transcripts. Its latency here counts uncached responses only (16 of 44 home responses and 8 of 43 cloud responses came from cache).
  • We are one of the vendors. That is why the video list was frozen first, every failure is counted, and all of it is public so you can find our mistakes.
05

What to take from it

  • For a few videos from your own machine, the free tools work and cost nothing.
  • On a server, plan for blocks: back off, cache what you fetch, and treat blocked requests differently from videos that have no transcript. Our errors guide sorts them.
  • Language codes must match exactly in both free tools: a request for es misses a track coded es-ES, and yt-dlp then exits successfully without writing a file. Check that a file exists.
  • If you would rather not own the blocking problem, a hosted service is one answer, including ours (compared without ranking in the tools roundup). Look at the tail and the failures, not only the median.
06

How we got it wrong first

The first runs gave misleading numbers, and we found out by inspecting the failures. We ran yt-dlp without a JavaScript runtime, called the library with exact language codes, and assumed yt-dlp matched languages loosely when it does not. We fixed the setup, kept the earlier results marked as superseded, and wrote the order of events into the methodology. A run also froze for a day on a request with no timeout, and another stopped early for a reason we never found. Both are documented, and both were repeated.

Run it from your own network and send us the results. Tools, code, video list, raw data and methodology are in the repository. If we got something wrong about any tool, tell us there and we will correct it.

Frequently asked questions

Q01

Does youtube-transcript-api work from a cloud server?

In our test it did not. From a GitHub-hosted runner, which has a cloud IP address, it raised RequestBlocked on each of its first 5 attempts. From a residential connection the same code returned a transcript for all 44 videos that have captions. That is one runner on one day, but it matches what the library documents about cloud providers.

Q02

Why was yt-dlp slower?

It starts a new process for every video and downloads a subtitle file, which the other two methods do not. Its median here was 3.8 seconds against 1.4 to 1.6 seconds. It also hit five HTTP 429 errors on subtitle downloads from the home connection.

Q03

Is the hosted API the best option, then?

No, and these results do not say that. It was the only method that worked from the cloud runner, and it worked from home. It also had the slowest tail (95th percentile 11 to 12 seconds) and one failure of its own. For a few videos from your own machine the free tools are fine and cost nothing.

Q04

Can I trust a benchmark run by one of the vendors?

Treat it as a claim you can check. The video list was fixed and published before any result, the code and raw data are in a public repository, failures are counted instead of hidden, and anyone can run it from their own network and add the results. We also had to correct our own setup three times after seeing odd failures, and the repository says so.

Q05

How do I run it myself?

Install youtube-transcript-api and yt-dlp, clone the repository, and run the harness with a description of your network. Send the results file as a pull request to add your network. The hosted method only runs if you set an API key and is skipped otherwise.

Related