> ## Documentation Index
> Fetch the complete documentation index at: https://getanyapi.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# YouTube Video Transcript (Provenance)

> Sell youtube.video_transcript_full on AnyAPI: the request your endpoint receives, the response it must return, and what the real-request check judges.

Fetch a YouTube video or Short transcript with timed segments and its provenance: whether the words are creator-written captions or machine speech recognition.

This page is the seller-facing summary of one catalog API, `youtube.video_transcript_full`. The transport rules that apply to every API a seller serves - signed requests, the response envelope, timeouts, and body limits - are on [the operator endpoint contract](https://getanyapi.com/docs/sell/operator-endpoint-contract.md).

## The price you compete with

AnyAPI publishes this API from **\$1.99 per 1,000 requests**. That is the price a buyer sees today, so it is the price your endpoint has to come in under to win traffic.

## The request your endpoint receives

| Field | Type | Required | What it means |
| - | - | - | - |
| `captionKind` | string | no | Which caption track to accept: "manual" only creator-written captions, "automatic" only YouTube's speech recognition, "any" whichever exists. One of: `manual`, `automatic`, `any`. Default `"any"`. |
| `language` | string | no | Preferred caption language code (e.g. "en", "es"). Defaults to English. If the video has no captions in that language, you get the transcript in another language the video has; the `language` field in the result says which. With `captionKind` set to "manual" or "automatic", no other language is returned. |
| `requireFields` | array | no | Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `likes`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a transcript that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge. |
| `url` | string | yes | YouTube video or Short URL (e.g. "[https://www.youtube.com/watch?v=dQw4w9WgXcQ](https://www.youtube.com/watch?v=dQw4w9WgXcQ)" or "[https://www.youtube.com/shorts/Fir1x9cw2vg](https://www.youtube.com/shorts/Fir1x9cw2vg)"). |

> [accordion] Full input JSON Schema
>
> ```json theme={"dark"}
> {
>   "$schema": "https://json-schema.org/draft/2020-12/schema",
>   "$id": "https://getanyapi.com/schemas/youtube.video_transcript_full.input.json",
>   "example": {
>     "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
>   },
>   "title": "YouTube Video Transcript (Provenance) input",
>   "type": "object",
>   "additionalProperties": false,
>   "required": [
>     "url"
>   ],
>   "properties": {
>     "url": {
>       "type": "string",
>       "minLength": 1,
>       "description": "YouTube video or Short URL (e.g. \"https://www.youtube.com/watch?v=dQw4w9WgXcQ\" or \"https://www.youtube.com/shorts/Fir1x9cw2vg\")."
>     },
>     "captionKind": {
>       "type": "string",
>       "enum": [
>         "manual",
>         "automatic",
>         "any"
>       ],
>       "default": "any",
>       "description": "Which caption track to accept: \"manual\" only creator-written captions, \"automatic\" only YouTube's speech recognition, \"any\" whichever exists."
>     },
>     "language": {
>       "type": "string",
>       "description": "Preferred caption language code (e.g. \"en\", \"es\"). Defaults to English. If the video has no captions in that language, you get the transcript in another language the video has; the `language` field in the result says which. With `captionKind` set to \"manual\" or \"automatic\", no other language is returned."
>     },
>     "requireFields": {
>       "type": "array",
>       "uniqueItems": true,
>       "items": {
>         "type": "string",
>         "enum": [
>           "category",
>           "createdUtc",
>           "likes"
>         ]
>       },
>       "description": "Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `likes`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a transcript that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge."
>     }
>   }
> }
> ```

## The response your endpoint must return

| Field | Type | Always present | What it means |
| - | - | - | - |
| `data` | null or object | yes | |
| `data.authorId` | string | no | YouTube channel ID of the publishing channel. |
| `data.authorUrl` | string | no | Canonical URL of the publishing channel, tracking query parameters stripped. |
| `data.category` | string | no | YouTube category the video is filed under, for example "Music". |
| `data.channel` | string | no | Channel name that published the video. |
| `data.createdUtc` | number | no | UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. |
| `data.description` | string | no | Full video description text. |
| `data.durationSeconds` | number | no | Video duration in seconds. |
| `data.image` | string | no | URL of the video thumbnail image. |
| `data.isAiGenerated` | boolean or null | no | True when the words were recognized from the audio by the serving lane rather than read from any YouTube caption track, or null when the serving source does not say. |
| `data.isAutoGenerated` | boolean | yes | True when YouTube generated the caption track by speech recognition rather than the creator supplying it. Automatic captions carry recognition errors, especially on names and jargon. |
| `data.keywords` | array | no | Keywords the uploader tagged the video with. |
| `data.language` | string | yes | Caption language code (e.g. "en"). |
| `data.likes` | integer | no | Number of likes. |
| `data.segments` | array | no | Timed transcript segments in playback order. |
| `data.segments[].endSeconds` | number | yes | Segment end offset in seconds. |
| `data.segments[].startSeconds` | number | yes | Segment start offset in seconds. |
| `data.segments[].text` | string | yes | Text of this transcript segment. |
| `data.title` | string | no | Video title. |
| `data.transcript` | string | yes | Full transcript text, segments joined in playback order. |
| `data.url` | string | no | Watch URL of the video. |
| `data.videoId` | string | no | Unique identifier of the video. |
| `data.views` | integer | no | Number of views. |
| `found` | boolean | yes | |

Extra fields are kept, missing declared fields fail.

> [accordion] Full output JSON Schema
>
> ```json theme={"dark"}
> {
>   "$schema": "https://json-schema.org/draft/2020-12/schema",
>   "$id": "https://getanyapi.com/schemas/youtube.video_transcript_full.output.json",
>   "title": "YouTube Video Transcript (Provenance) output",
>   "x-anyapi-result-list": false,
>   "type": "object",
>   "x-anyapi-heavy": true,
>   "additionalProperties": false,
>   "required": [
>     "found",
>     "data"
>   ],
>   "properties": {
>     "found": {
>       "type": "boolean"
>     },
>     "data": {
>       "oneOf": [
>         {
>           "type": "null"
>         },
>         {
>           "type": "object",
>           "required": [
>             "transcript",
>             "language",
>             "isAutoGenerated"
>           ],
>           "properties": {
>             "transcript": {
>               "x-anyapi-must-populate": true,
>               "type": "string",
>               "description": "Full transcript text, segments joined in playback order."
>             },
>             "language": {
>               "x-anyapi-must-populate": true,
>               "type": "string",
>               "description": "Caption language code (e.g. \"en\")."
>             },
>             "isAutoGenerated": {
>               "x-anyapi-must-populate": true,
>               "type": "boolean",
>               "description": "True when YouTube generated the caption track by speech recognition rather than the creator supplying it. Automatic captions carry recognition errors, especially on names and jargon."
>             },
>             "isAiGenerated": {
>               "type": [
>                 "boolean",
>                 "null"
>               ],
>               "description": "True when the words were recognized from the audio by the serving lane rather than read from any YouTube caption track, or null when the serving source does not say."
>             },
>             "title": {
>               "type": "string",
>               "description": "Video title."
>             },
>             "channel": {
>               "type": "string",
>               "description": "Channel name that published the video."
>             },
>             "durationSeconds": {
>               "type": "number",
>               "minimum": 0,
>               "description": "Video duration in seconds."
>             },
>             "segments": {
>               "x-anyapi-must-populate": true,
>               "type": "array",
>               "description": "Timed transcript segments in playback order.",
>               "items": {
>                 "type": "object",
>                 "required": [
>                   "text",
>                   "startSeconds",
>                   "endSeconds"
>                 ],
>                 "properties": {
>                   "text": {
>                     "type": "string",
>                     "description": "Text of this transcript segment."
>                   },
>                   "startSeconds": {
>                     "type": "number",
>                     "minimum": 0,
>                     "description": "Segment start offset in seconds."
>                   },
>                   "endSeconds": {
>                     "type": "number",
>                     "minimum": 0,
>                     "description": "Segment end offset in seconds."
>                   }
>                 }
>               }
>             },
>             "videoId": {
>               "type": "string",
>               "description": "Unique identifier of the video."
>             },
>             "url": {
>               "x-anyapi-domain": [
>                 "youtube.com",
>                 "youtu.be"
>               ],
>               "type": "string",
>               "description": "Watch URL of the video."
>             },
>             "description": {
>               "type": "string",
>               "description": "Full video description text."
>             },
>             "views": {
>               "type": "integer",
>               "description": "Number of views."
>             },
>             "likes": {
>               "type": "integer",
>               "description": "Number of likes."
>             },
>             "authorId": {
>               "type": "string",
>               "description": "YouTube channel ID of the publishing channel."
>             },
>             "authorUrl": {
>               "x-anyapi-domain": "youtube.com",
>               "type": "string",
>               "description": "Canonical URL of the publishing channel, tracking query parameters stripped."
>             },
>             "image": {
>               "x-anyapi-domain": [
>                 "ytimg.com",
>                 "youtube.com",
>                 "lh3.googleusercontent.com"
>               ],
>               "type": "string",
>               "description": "URL of the video thumbnail image."
>             },
>             "createdUtc": {
>               "type": "number",
>               "description": "UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds."
>             },
>             "keywords": {
>               "type": "array",
>               "items": {
>                 "type": "string"
>               },
>               "description": "Keywords the uploader tagged the video with."
>             },
>             "category": {
>               "type": "string",
>               "description": "YouTube category the video is filed under, for example \"Music\"."
>             }
>           }
>         }
>       ]
>     }
>   }
> }
> ```

## Fields that must never come back empty

* `isAutoGenerated`
* `language`
* `segments`
* `transcript`

The repository marks these fields as ones every source must be able to fill. An empty value is only correct when the entity itself genuinely has nothing there.

## Not found, and how it differs from empty

When the entity does not exist, answer 2xx with the not-found shape:

```json theme={"dark"}
{
  "found": false,
  "data": null
}
```

This output schema declares no `reason` field, so `found: false` is the whole not-found answer.

## Example request

```json theme={"dark"}
{
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}
```

The registration tests send this example to your endpoint, with the API's other test inputs. After that, the real-request check sends your endpoint real past customer inputs, and an AI reviewer compares each answer with AnyAPI's own answer to the same input.

## Next

* [The operator endpoint contract](https://getanyapi.com/docs/sell/operator-endpoint-contract.md) for signing, budgets, and the real-request check.
* [Every API open to sellers](https://getanyapi.com/docs/sell/apis/index.md).
* Want to sell an API that is not on that list? Email [support@getanyapi.com](mailto:support@getanyapi.com).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.