# YouTube Transcript API

Read the words. Cite the moment.

Give your agent a public YouTube URL. Get available captions as text with segment start times. Each lookup costs $0.0019 through TaskFuel.

One public-video caption lookup. Availability and language depend on the video.

Provider in the worked example: YouTube captions.

Price shown for this route: 0.19¢ per lookup.



## What it can do

### Read available YouTube captions

Send a public video URL or ID and get caption text with timed segments when a usable track is available.

Price: $0.0019 per lookup.


## A real example

Tested on 2026-11-17 through YouTube captions.

Our request for Me at the zoo returned English caption text, six segments and their start times and durations.

Your agent asked: Read the English captions for https://www.youtube.com/watch?v=jNQXAC9IVRw and return the segment start times.

Returned in this test:

- Video: [Me at the zoo](https://www.youtube.com/watch?v=jNQXAC9IVRw)
- Language: English
- Segments: 6
- First segment: [Elephants mentioned at 00:01.2](https://www.youtube.com/watch?v=jNQXAC9IVRw&t=1s)

Charged in this test: $0.0019.

One public-video caption lookup. Availability and language depend on the video.




## Try the API request

Use your TaskFuel API key as TASKFUEL_API_KEY in your terminal or server. Keep it out of browser code.

### 1. Check the price

This request checks the price without paying. This is the request used in the dated caption example.

```sh
curl --fail-with-body https://app.taskfuel.ai/v1/call \
  -H "Authorization: Bearer $TASKFUEL_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-binary @- <<'TASKFUEL_REQUEST'
{
  "url": "https://api.getanyapi.com/v1/run/youtube.video_transcript",
  "method": "POST",
  "body": {
    "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw"
  },
  "dryRun": true
}
TASKFUEL_REQUEST
```

### 2. Run the request

Review amount_usd in the quote. To pay and run, change dryRun to false and add maxAmountUsd with that approved amount inside the same JSON object. Keep the inputs unchanged; this limit applies to one call.

### 3. Read the result

Read output.found, then output.data.transcript and output.data.segments[]. Each segment includes text, startSeconds and durationSeconds. A video can have no usable transcript.

[Free Python transcript library and its limits](https://github.com/jdepoix/youtube-transcript-api)

[Setup and API reference](https://taskfuel.ai/docs/) · [Job polling and timeout recovery](https://app.taskfuel.ai/using.md)


## Connect your agent

Read the [setup guide](https://taskfuel.ai/docs/setup/) and choose the connection your agent supports.

Use one TaskFuel account and prepaid balance. Inspect the provider and request quote before a paid call, then review the returned response and recorded charge.



## When to use it

### Link to a spoken passage.

Your agent can use a segment start time to link a research note to the relevant moment in the source video.

### Work with the caption text.

The plain-text transcript gives your agent material for notes without copying each caption by hand.




## Questions

### Does this YouTube Transcript API transcribe every video?

This example retrieves available captions. A video without a usable caption track can return no transcript. Audio transcription is a separate task.

### Is there a free YouTube transcript API option?

The open-source youtube-transcript-api Python library can retrieve available subtitles without an API key. You run it yourself, and its documentation describes IP-blocking limits.

### How does this differ from YouTube MCP?

This guide shows the tested HTTP request for one caption lookup. The YouTube MCP guide compares options for video search and captions in an MCP client.

### What did the example cost?

The caption lookup cost $0.0019 on 17 November 2026. Your agent shows the price for your own request before it pays.

### Do I need an account, an API key or a server?

No. Your agent pays from your TaskFuel balance. There is no provider account or API key to handle and no server to run.

## Related tool guides

- [List uploads from a public YouTube channel](https://taskfuel.ai/tools/youtube-channel-videos-api/)
- [Compare YouTube MCP options](https://taskfuel.ai/tools/youtube-mcp/)
- [Transcribe a public audio file](https://taskfuel.ai/tools/transcribe-audio/)


## Reference

- [Read this guide on the website](https://taskfuel.ai/tools/youtube-transcript-api/).
- [Browse providers and capabilities](https://taskfuel.ai/catalog/).
- [Pricing](https://taskfuel.ai/pricing/).
- [Agent instructions](https://taskfuel.ai/llms.txt).
