YouTube transcript API
One video's full caption transcript, optionally with detected sponsor-read segments. To get these records, set mode to transcript, which reads videoUrls, channelUrls, languages, allowGenerated, allowTranslation, and includeSegments.
- Record type
transcript- Fields
- 23
- From
- $5.00 per 1,000 records
- Billed as
transcripttranscript-sponsor
Example request and record
The request below is the one this record answers, taken from a real run. The names, usernames, photos and contact details of people in it are fictional. Long text and long lists are shortened here. The download has the whole record.
{ "source": "youtube", "videoId": "Qtl8lJwbd4g", "url": "https://www.youtube.com/watch?v=Qtl8lJwbd4g", "title": "Escape 100 Cops, Win $500,000", "channelId": "UCexample100000000000000", "channelName": "Jordan Example", "lengthSeconds": 1228, "viewCount": 108619304, "language": "en", "sourceLanguage": "en", "languageName": "English", "isGenerated": false, "translatedTo": null, "isTranslationRefused": false, "availableLanguages": [ "ar", "bn", "zh-Hans" ], "type": "transcript", "text": "<font color=\"#A0AAB4\"></font><font color=\"#00BCE7\"><b> BEHIND… "wordCount": 14254, "durationSeconds": 1223.18, "segmentCount": 1612, "segments": [ { "start": 0.07, "duration": 0.07, "text": "<font color=\"#A0AAB4\"></font><font color=\"#00BCE7\"><b> BEH… }, { "start": 0.07, "duration": 0.07, "text": "<font color=\"#A0AAB4\"></font><font color=\"#00BCE7\"><b> BEH… }, { "start": 0.13, "duration": 0.07, "text": "<font color=\"#A0AAB4\"></font><font color=\"#00BCE7\"><b> BEH… } ], "srt": "1\n00:00:00,070 --> 00:00:00,140\n<font color=\"#A0AAB4\"></font><f… "id": "Qtl8lJwbd4g", "event": "transcript", "collectedAt": "2026-09-20T19:44:38.244Z"}Each field name links to its row in the field table. Long values are shortened.
| Field | Type | What it holds |
|---|---|---|
videoId | string | ID of the transcribed video. |
title | string | Video title. |
lengthSeconds | integer | Video length in seconds. |
viewCount | integer | View count as an integer, from the player response fetched alongside the captions. |
channelId | string | ID of the video's uploading channel. |
channelName | string | Display name of the video's uploading channel. |
language | string | Language code of the delivered transcript text: the translation target when translated, else the source language. |
sourceLanguage | string | Language code of the original caption track before any translation. |
languageName | string | Human-readable name of the caption track's language, for example "English". |
isGenerated | boolean | True when the delivered caption track is YouTube's auto-generated captions rather than a manual upload. |
translatedTo | null | Language code the transcript was machine-translated to, or null when no translation was needed. |
isTranslationRefused | boolean | True when a machine-translated caption request was refused and the source-language track was used instead. |
availableLanguages | array | Array of caption language codes available for the video; generated ones are suffixed " (auto)". |
text | string | Full transcript text, its segments joined with spaces. |
wordCount | integer | Total word count of the transcript text, as an integer. |
durationSeconds | number | Duration covered by the transcript, in seconds, from the last caption segment's end time. |
segmentCount | integer | Number of caption segments, as an integer. |
segments | array | Array of {start, duration, text} caption segments, start and duration in seconds. |
srt | string | Full transcript formatted as SubRip (.srt) subtitle text. |
Fields
Every field of transcript records, read from real YouTube records. Where a field does not apply to an item it is null or an empty list, not left out. Each record starts with the envelope: source, type, event, id, url, collectedAt.
| Field | Type | What it holds | Present on |
|---|---|---|---|
videoId | string | ID of the transcribed video. | All |
title | string | Video title. | All |
lengthSeconds | integer | Video length in seconds. | All |
viewCount | integer | View count as an integer, from the player response fetched alongside the captions. | All |
channelId | string | ID of the video's uploading channel. | All |
channelName | string | Display name of the video's uploading channel. | All |
language | string | Language code of the delivered transcript text: the translation target when translated, else the source language. | All |
sourceLanguage | string | Language code of the original caption track before any translation. | All |
languageName | string | Human-readable name of the caption track's language, for example "English". | All |
isGenerated | boolean | True when the delivered caption track is YouTube's auto-generated captions rather than a manual upload. | All |
translatedTo | null | Language code the transcript was machine-translated to, or null when no translation was needed. | All |
isTranslationRefused | boolean | True when a machine-translated caption request was refused and the source-language track was used instead. | All |
availableLanguages | array | Array of caption language codes available for the video; generated ones are suffixed " (auto)". | All |
text | string | Full transcript text, its segments joined with spaces. | All |
wordCount | integer | Total word count of the transcript text, as an integer. | All |
durationSeconds | number | Duration covered by the transcript, in seconds, from the last caption segment's end time. | All |
segmentCount | integer | Number of caption segments, as an integer. | All |
segments | array | Array of {start, duration, text} caption segments, start and duration in seconds. | All |
srt | string | Full transcript formatted as SubRip (.srt) subtitle text. | All |
sponsorSegments | array | Detected sponsor reads: start/end/durationSeconds (seconds), brand, url, code, offer, text; only when sponsor detection is requested. | Only transcript-sponsor |
sponsorCount | integer | Number of detected sponsored-read segments; present only when sponsor detection is requested; 0 when none found. | Only transcript-sponsor |
sponsorSeconds | integer | Total seconds spanned by detected sponsored reads, rounded to 2 decimals; present only when sponsor detection is requested. | Only transcript-sponsor |
sponsorShare | integer | Fraction of the video spent on sponsored reads (0 to 1, 4 decimals), null if video length unknown; only when sponsor detection is requested. | Only transcript-sponsor |
Options
These inputs and switches change what comes back. Every request also takes maxItems and maxItemsPerInput.
| Option | Type | Default | What it does |
|---|---|---|---|
videoUrls | array | none | watch?v=, youtu.be, /shorts/ URLs or bare 11-char ids. Batch as many as you like. |
channelUrls | array | none | e.g. @example_channel, https://www.youtube.com/@example_channel, UCexample000000000000000. In video / comments / transcript mode every video of the channel is processed (up to Max results per input). |
languages | array | ["en"] | ISO codes. Manual captions are preferred over auto-generated; if none match, a translatable track is machine-translated to the first language. |
allowGenerated | boolean | true | Accept YouTube's auto-generated captions when no manually authored transcript exists. |
allowTranslation | boolean | true | When none of your preferred languages is available, machine-translate a translatable caption track into the first language. |
includeSegments | boolean | true | Include the timestamped transcript segments, not just the full transcript text. |
detectSponsors | boolean | false | Adds sponsorSegments [{start, end, brand, url, code, offer, text}], sponsorCount, sponsorSeconds, sponsorShare to each transcript; charged as transcript-sponsor instead of transcript. |
YouTube transcripts pricing
You pay once for each record you receive, at the price of the event it carries. A request that returns nothing costs nothing.
| Event | Per 1,000 records | Per record |
|---|---|---|
transcript | $5.00 | $0.00500 |
transcript-sponsor | $6.25 | $0.00625 |
Edge cases
- A video with no captions, or none in the languages you ask for, returns no record and costs nothing. A transcript is never a
not_foundrecord. - Automatic captions and translated tracks are used when no written track matches. Set
allowGeneratedorallowTranslationto false to skip them. - When YouTube refuses a translation, the record carries the original language instead, with
isTranslationRefused: true. - With
detectSponsors: true, sponsor segments are marked and the record is billed astranscript-sponsorinstead oftranscript.