# YouTube transcript demo

YouTube transcript demo. Follow concrete contracts, examples and reviewable steps using YouTube.

Canonical page: https://datanavoapi.com/en/tools/youtube-transcript/

This is a local simulation. Program-generated samples are not live platform data and do not establish provider availability.

## Input and result

This tool maps the task to youtube.videos.transcript.get. Check the input fields below, then run it in the local console; results are fixtures.

## Input contract

Inspect meanings, examples and conditional rules for the selected method. view and fields control the response without changing the TEST unit price.

- GET: supply exactly one of id / url.

| Method | Field | Type | Requirement | Meaning | Enum or bound | Example |

| --- | --- | --- | --- | --- | --- | --- |

| GET | id | string | Optional / conditional | Video ID | — | "dQw4w9WgXcQ" |

| GET | url | string | Optional / conditional | Link to the video: a watch, shorts, embed, live or youtu.be link | — | — |

| GET | lang | string | Optional / conditional | Which language of captions to get, as a language code (en, es, ja, zh-Hans, say); left out, the captions of the video's own language come first. A video without captions in that language is answered as one without captions | — | — |

| GET | view | string | Optional / conditional | How much of each item: compact (the most used fields, long text cut short), standard, or full (adds `ext`). | ["compact","standard","full"] | — |

| GET | fields | array | Optional / conditional | Return only these fields of each item, by path (`author.name`). | maxItems: 64 | — |

## Try it locally

Use demo to inspect the fields, then explicitly select simulated with a customer test key to exercise settlement. Never put a customer key in a URL.

```json
{
  "capability": "youtube.videos.transcript.get",
  "method": "GET",
  "params": {
    "id": "dQw4w9WgXcQ"
  }
}
```

- [Open this capability in the console](https://datanavoapi.com/console/?mode=demo&capability=youtube.videos.transcript.get&method=GET&params=%7B%22id%22%3A%22dQw4w9WgXcQ%22%7D)

## Output fields and interpretation

The transcript object permits missing or null values; do not replace missing measurements with zero. This table shows the main structure; the object reference covers nested fields.

| Field | Type | Meaning | Source scope |

| --- | --- | --- | --- |

| post_id | string \| null | ID of the post it belongs to | YouTube |

| lang | string \| null | Language code | YouTube |

| text | string \| null | The whole text | YouTube |

| segments | array \| null | Timed segments (standard view and up) | YouTube |

| segments[].start | number \| null | Start, in seconds (standard view and up) | YouTube |

| segments[].end | number \| null | End, in seconds (standard view and up) | YouTube |

| segments[].text | string \| null | Text of the segment (standard view and up) | YouTube |

| approximate | array \| null | Which numbers of this item are approximate or lower bounds; absent when all are exact | YouTube |

| approximate[].field | string \| null | Path of the field, such as metrics.views | YouTube |

| approximate[].kind | string \| null | Approximate, or a lower bound | YouTube |

| ext | object | The platform's own fields (full view). | YouTube |

- [Complete object reference](https://datanavoapi.com/en/docs/objects/transcript/)

## Related pages

- [YouTube video transcript](https://datanavoapi.com/en/apis/youtube/videos/transcript/get/)
- [YouTube APIs](https://datanavoapi.com/en/apis/youtube/)
- [YouTube MCP](https://datanavoapi.com/en/mcp/youtube/)
- [Transcript fields](https://datanavoapi.com/en/docs/objects/transcript/)
- [Video transcript workflow workflow](https://datanavoapi.com/en/skills/transcripts/)

[中文](https://datanavoapi.com/tools/youtube-transcript/)
