# YouTube API: Get video transcript

> Returns the spoken captions and timed segments of a YouTube video, given a video link or a title (top search match). Only captions the video has are returned.

Unofficial. Not affiliated with or endorsed by YouTube.

- Page: https://fous.com/methods/youtube.com/get-video-transcript
- Method: `youtube.com/get_video_transcript`, version 3
- Website: youtube.com
- Returns: video title, link, caption language, auto-generated flag, transcript text, timed segments, available caption languages
- Effect: read (it gets data and changes nothing)
- Sign-in: none needed
- Cost: 1 credit per completed run (1¢ with pay as you go); failed runs are free
- Verified: Nov 2, 2026

## Inputs

| Field | Type | Required | In the run below | Description |
|---|---|---|---|---|
| `video` | string | yes | `"https://www.youtube.com/watch?v=Ks-_Mh1QhMc"` | A YouTube video link or its title, for example https://www.youtube.com/watch?v=Ks-_Mh1QhMc. |
| `language` | string | no | `""` | Caption language name or code, for example Spanish or es; defaults to the original caption language. Default "". |

## Output

From a run on Oct 27, 2026, shortened. Its input:

```json
{
  "video": "https://www.youtube.com/watch?v=Ks-_Mh1QhMc",
  "language": ""
}
```

Its output:

```json
{
  "segments": [
    {
      "text": "Translator: Joseph Geni Reviewer: Morton Bast",
      "start_time": "0:00",
      "start_seconds": 0,
      "duration_seconds": 7
    },
    {
      "text": "So I want to start by offering you a free no-tech life hack,",
      "start_time": "0:15",
      "start_seconds": 15.967,
      "duration_seconds": 5.398
    },
    {
      "text": "and all it requires of you is this:",
      "start_time": "0:21",
      "start_seconds": 21.389,
      "duration_seconds": 2.597
    }
  ],
  "transcript": "Translator: Joseph Geni Reviewer: Morton Bast\nSo I want to start by offering you a free no-tech life hack,\nand all it requires of you is this:\nthat you change your posture for two minutes.\nBut before I give it away, I want to ask you to right now\ndo a little audit of your body and what you're doing …",
  "video_link": "https://www.youtube.com/watch?v=Ks-_Mh1QhMc",
  "video_title": "Your Body Language May Shape Who You Are | Amy Cuddy | TED",
  "auto_generated": false,
  "caption_language": "English",
  "available_language_codes": [
    "sq",
    "ar",
    "hy"
  ]
}
```

## Run it

From code, with a Fous API key in `FOUS_API_KEY`; the answer's `data` holds the output:

```bash
curl https://api.fous.com/v1/runs \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"method":"youtube.com/get_video_transcript","input":{"video":"https://www.youtube.com/watch?v=Ks-_Mh1QhMc","language":""}}'
```

From an AI agent connected to the Fous MCP server: its `run` with the same method and input. To connect one, give it `set up https://fous.com/SKILL.md`.

## Ask your agent

- Get me the full transcript of https://www.youtube.com/watch?v=dQw4w9WgXcQ with timestamps
- What does the speaker actually say in Simon Sinek's 'Start With Why' TED talk? I need the text of the captions.
- Pull the Spanish captions for https://youtu.be/8jPQjjsBbIc so I can study the vocabulary
- I need the YouTube captions for 'How to Make Sourdough Bread Joshua Weissman' in plain text, and tell me if they're auto-generated
- Which caption languages are available for this YouTube video, and can you give me the Japanese ones: https://www.youtube.com/watch?v=aircAruvnKk

## Input schema

```json
{
  "type": "object",
  "required": [
    "video"
  ],
  "properties": {
    "video": {
      "type": "string",
      "description": "A YouTube video link or its title, for example https://www.youtube.com/watch?v=Ks-_Mh1QhMc."
    },
    "language": {
      "type": "string",
      "default": "",
      "description": "Caption language name or code, for example Spanish or es; defaults to the original caption language."
    }
  }
}
```

## Output schema

```json
{
  "type": "object",
  "required": [
    "video_title",
    "video_link",
    "caption_language",
    "auto_generated",
    "transcript",
    "segments",
    "available_language_codes"
  ],
  "properties": {
    "segments": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "start_time",
          "text",
          "start_seconds",
          "duration_seconds"
        ],
        "properties": {
          "text": {
            "type": "string"
          },
          "start_time": {
            "type": "string"
          },
          "start_seconds": {
            "type": "number",
            "x-fous-developer": true
          },
          "duration_seconds": {
            "type": "number",
            "x-fous-developer": true
          }
        },
        "additionalProperties": false
      }
    },
    "transcript": {
      "type": "string"
    },
    "video_link": {
      "type": "string"
    },
    "video_title": {
      "type": "string"
    },
    "auto_generated": {
      "type": "boolean"
    },
    "caption_language": {
      "type": "string"
    },
    "available_language_codes": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-fous-developer": true
    }
  },
  "additionalProperties": false
}
```

## See more

- [YouTube API: Get video](https://fous.com/methods/youtube.com/get-video.md): Gets public details and statistics for one YouTube video by link, ID or title. A title selects the top search match.
- [YouTube API: Get video comments](https://fous.com/methods/youtube.com/get-video-comments.md): Gets public top-level comments on a YouTube video, found by link, video ID or title. Reply text is not included.
- [YouTube API: Get channel](https://fous.com/methods/youtube.com/get-channel.md): Gets a public YouTube channel's profile, links and statistics from its name, @handle or link. Subscriber totals may be rounded as YouTube displays them.
- [YouTube API: List channel videos](https://fous.com/methods/youtube.com/list-channel-videos.md): Lists a YouTube channel's public videos, Shorts, or live uploads, newest first or most popular first, along with channel details. Counts and dates taken from displayed text may be approximate.
- [YouTube API: List top songs chart](https://fous.com/methods/youtube.com/list-top-songs.md): Lists the latest weekly YouTube Music Top Songs chart for a country or globally, with ranks, weekly views and video links.
- [YouTube API: Find a company's channel](https://fous.com/methods/youtube.com/find-company-channel.md): Finds a company's verified YouTube channel by name and returns its name, link, subscriber count, description, country and official website when identifiable.
- [Google API: Translate text](https://fous.com/methods/translate.google.com/translate-text.md): Translates up to 5,000 characters on Google Translate, with the detected source language, Latin-letter pronunciation when shown, and dictionary alternatives for words or short phrases.
- [Vimeo API: Get video details](https://fous.com/methods/vimeo.com/get-video.md): Gets a public Vimeo video's title, creator, play, like and comment counts, length, upload date, description, tags, thumbnail and link from its video link.
- [All YouTube methods](https://fous.com/methods/youtube.com.md)
