# 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.

## Summary

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](https://developers.google.com/youtube/v3/docs/captions/download), 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](https://github.com/jdepoix/youtube-transcript-api), 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.

Inspect the endpoint before you spend. Inspecting is free and shows the inputs and the price.

Then 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.

The 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.

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](https://looot.ai/use-cases/youtube-transcript-api) 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.

YouTube transcript, live price per video. Prices read on 2026-10-14 from the live looot catalog. They change when a provider changes its price.

| Option | Cheapest provider | Price per call |
|---|---|---|
| YouTube transcript through Scrape Creators | ScrapeCreators | $0.00188 per call |
| YouTube subtitles through DataForSEO | DataForSEO | $0.0020 per call |

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.

What else an agent can read from YouTube, channel videos and comments included, is in [the YouTube scraper guide](https://looot.ai/blog/youtube-scraper-with-an-agent).

## 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](https://support.google.com/youtube/answer/6373554), 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

### Is there a YouTube transcript API?

Yes, two kinds. The official YouTube Data API downloads captions only for videos you have permission to edit. Third-party endpoints, such as the four in the looot catalog, return the public captions of public videos as JSON.

### Is the YouTube transcript API free?

The open-source youtube-transcript-api library is free under the MIT license, but its README says YouTube blocks most cloud server addresses and recommends proxies as the workaround. Hosted endpoints charge per call, shown in the live table on this page. For one video, the free YouTube transcript tool on looot needs no setup.

### How do I get the transcript of a YouTube video?

Send the video link to a transcript endpoint and read the text back. With looot that is one command: `looot run scrapecreators-youtube-video-transcript` with the URL as input. An agent does the same when you paste the prompt on this page.

### Why does youtube-transcript-api say my IP is blocked?

YouTube blocks most IP addresses known to belong to cloud providers, according to the library's README read on 2026-10-14. That raises `RequestBlocked` or `IpBlocked` on servers. The fixes are a proxy, or a hosted endpoint that fetches the captions for you.

### Does it work on long videos and podcasts?

Yes, when the video has public captions. The Scrape Creators endpoint states there is no two-minute limit for YouTube, and that long videos, podcasts included, work when YouTube exposes public captions.

### What happens if a video has no captions?

The transcript fields come back null. Ask your agent to list those links so you can skip them or transcribe the audio another way.

### Which field should my agent read, transcript or transcript_only_text?

Read `transcript_only_text` for the words. In the run on this page, the timestamped array glued words together where a caption line broke, while the plain-text field kept them apart. Use the array when you need start and end times.

### How much does a YouTube transcript cost per video?

One call per video, at the price in the live table on this page. Each run also reports its cost in the `actualCost` field, and inspecting an endpoint before the run is free.

## For agents

### Code (bash)

```bash
npx looot init
```

### Code (bash)

```bash
looot inspect scrapecreators-youtube-video-transcript
```

### Code (bash)

```bash
looot run scrapecreators-youtube-video-transcript --input '{"url":"https://www.youtube.com/watch?v=jNQXAC9IVRw","language":"en"}' --wait=60
```

### Code (json)

```json
{
  "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
}
```

### YouTube transcripts for five videos

```text
Use looot to get the transcripts of these YouTube videos: <link 1> to <link 5>. First set up https://looot.ai/skill.md. Inspect scrapecreators-youtube-video-transcript and tell me its price per call before you run anything. Run it once per link with language en. Use the transcript_only_text field for the text. List any link where the transcript came back null, give me a three line summary of each video, and report the total cost. Do not run more than 5 calls.
```
