YouTube transcript API: transcripts for your agent
A YouTube transcript API for agents: one looot call returns timestamped captions and plain text. A real output, the price per call and the limits.
The looot team · , updated · 7 min read
On this page
A YouTube transcript API takes a video link and returns the caption text. Through looot, your agent calls scrapecreators-youtube-video-transcript with the URL and gets a timestamped array and a plain-text version in one call. It works on long videos when YouTube exposes public captions, and the transcript fields come back null when the video has no matching caption track.
Most people who search for a YouTube transcript API hit one of two walls. The official YouTube Data API only lets you download captions for videos you have permission to edit. The popular open-source Python library works on a laptop and then gets blocked once it runs on a cloud server. This guide shows a third route with a real call and its output, which field to read, what a call costs, and where it stops.
Is there an official YouTube transcript API?
Partly. The YouTube Data API has a captions download method, but it is built for channel owners, not for reading other people's videos. Per Google's captions.download reference, read 2026-10-14, the method requires OAuth authorization, "requires the user to have permission to edit the video", and costs 200 quota units per call.
So if your agent needs the transcript of a competitor's talk or a podcast you do not own, the official API does not cover it. That is the job third-party transcript endpoints do: they read the public caption track of a public video and return it as JSON.
Why does the youtube-transcript-api library get blocked?
The library calls YouTube the way the YouTube web page does, and YouTube blocks most cloud server addresses. Its README on GitHub, read 2026-10-14, says it uses "an undocumented part of the YouTube API" and needs no API key. It also says "YouTube has started blocking most IPs that are known to belong to cloud providers", so a deployed script will "most likely run into `RequestBlocked` or `IpBlocked` exceptions".
The README's workaround is proxies, and it names rotating residential proxies as the most reliable option. The other fix is to let a provider fetch the captions and return them to you, which is what the call below does. You trade a free library plus a proxy bill for a price per call.
Call the YouTube transcript API with looot
Install the CLI and sign in once. `looot init` logs you in if needed and offers to connect Claude Code, Cursor or Codex.
npx looot initInspect the endpoint before you spend. Inspecting is free and shows the inputs and the price.
looot inspect scrapecreators-youtube-video-transcriptThen run it. This is the exact command behind the output below, run on 2026-10-13 at 23:18 UTC on a short public video.
looot run scrapecreators-youtube-video-transcript --input '{"url":"https://www.youtube.com/watch?v=jNQXAC9IVRw","language":"en"}' --wait=60The only required input is `url`. The optional `language` takes a language code, and `cache_max_age` lets the provider answer from its cache.
What the YouTube transcript API returns
Here is the run, shortened. The `transcript` array holds one entry per caption line with start and end times in milliseconds. `captionTracks` lists every caption language the video has. `transcript_only_text` is the same words as one string.
{
"status": "completed",
"endpointId": "scrapecreators-youtube-video-transcript",
"result": {
"videoId": "jNQXAC9IVRw",
"language": "English",
"transcript": [
{ "text": "All right, so here we are, in front of theelephants", "startMs": "1200", "endMs": "3360", "startTimeText": "0:01" },
{ "text": "the cool thing about these guys is that theyhave really...", "startMs": "5318", "endMs": "7974", "startTimeText": "0:05" },
"... 4 more lines"
],
"captionTracks": [{ "languageCode": "en" }, { "languageCode": "de" }],
"transcript_only_text": "All right, so here we are, in front of the\nelephants the cool thing about these guys is that they\nhave really... ...",
"credits_charged": 1
},
"actualCost": 0.00188
}One detail worth knowing before you build on it. In the array, words that sat on two caption lines are glued together: "theelephants", "theyhave". The plain-text field keeps a line break there instead. Feed `transcript_only_text` to a model and use the array only when you need timestamps, for example to link a quote to the second it was said.
The provider answered in under six seconds once the run started. The looot catalog's 30-day stats for this endpoint, read 2026-10-14, showed 12 calls with a success rate of 1, so all 12 succeeded. Twelve calls is a small sample.
YouTube transcript extractor, generator or API: which do you need?
They are the same job at three sizes. An extractor or generator page handles one video in a browser. An API handles a list, inside a script or an agent.
| You have | Use |
|---|---|
| One video, right now | The free YouTube transcript tool |
| A list of videos for an agent to read | The endpoint above, one call per link |
| A channel to turn into posts | The YouTube transcripts to blog posts recipe |
Four YouTube transcript endpoints are in the looot catalog. Each line comes from `looot inspect`, read on 2026-10-14. The YouTube transcript API use case compares them with live prices.
| Endpoint | Provider | You send | Notes |
|---|---|---|---|
| scrapecreators-youtube-video-transcript | Scrape Creators | `url`, optional `language` | Timestamped array and plain text, no two-minute limit |
| dataforseo-youtube-video-subtitles-advanced | DataForSEO | `tasks`, an array of task objects | Subtitles returned live in the same call |
| searchapi-io-youtube-transcripts | SearchAPI.io | `video_id`, optional `lang` and `transcript_type` | Automatic or manual captions, lists available languages |
| anysite-api-youtube-video-subtitles | Any Site API | `video` ID or URL, optional `lang` | Subtitles or captions |
What does a YouTube transcript API call cost?
You pay per call, one call per video, from a prepaid balance. The run above reported its cost in `actualCost`. This table reads the live price from the looot catalog when the page loads.
For a whole channel, the agent lists the videos first and then makes one transcript call per video. Price the short list you need, not every upload.
Run it with an agent
Paste this into Claude Code, Cursor or any agent that reads a skill file. It prices first and stops at five videos.
Prompt for your agent
YouTube transcripts for five videos
What else an agent can read from YouTube, channel videos and comments included, is in the YouTube scraper guide.
What this post does not cover
- Videos without captions. If YouTube exposes no matching caption track, the transcript fields come back null. We did not run such a video for this post, so we cannot say whether that call is billed.
- Caption quality. Per YouTube's automatic captions help page, read 2026-10-14, automatic captions "are generated by machine learning algorithms, so the quality of the captions may vary". Check names and numbers before you quote them.
- Private or members-only videos. The endpoints read public captions only.
- Re-reading a channel on a timer. That needs scheduled runs, not available yet. Your agent runs the calls when you ask.
- Speech-to-text of the audio. These endpoints read captions. They do not transcribe sound themselves.
Last checked 2026-10-14. The output above is from one real run on 2026-10-13 at 23:18 UTC. Endpoint details come from `looot inspect` on 2026-10-14, and prices in the table are read from the live catalog when the page loads.
Questions
Keep reading
YouTube scraper for agents: videos, views, channels
A YouTube scraper for AI agents: pull a channel's videos and view counts through looot, see what each call returns and costs, and where the data stops.
Walid Boulanouar · · 8 min read
Set up looot with one line: skill.md and llms.txt
Give your agent one URL and it can set up looot itself. What skill.md and llms.txt are, what each one tells an agent, and a prompt you can paste today.
The looot team · · 3 min read
What 1,000 lookups cost: reading the looot catalog
How to work out the cost of 1,000 lookups from the live looot catalog, and why the cheapest provider is chosen per call instead of once per project.
Luisa · · 4 min read
Try it with the agent you already use
Start your workspace, top up, and paste one prompt into your agent.
