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
transcript transcript-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.

Example YouTube transcript recordExample
{  "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.

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.

23 fields on transcript records, besides the envelope
FieldTypeWhat it holdsPresent on
videoIdstringID of the transcribed video.All
titlestringVideo title.All
lengthSecondsintegerVideo length in seconds.All
viewCountintegerView count as an integer, from the player response fetched alongside the captions.All
channelIdstringID of the video's uploading channel.All
channelNamestringDisplay name of the video's uploading channel.All
languagestringLanguage code of the delivered transcript text: the translation target when translated, else the source language.All
sourceLanguagestringLanguage code of the original caption track before any translation.All
languageNamestringHuman-readable name of the caption track's language, for example "English".All
isGeneratedbooleanTrue when the delivered caption track is YouTube's auto-generated captions rather than a manual upload.All
translatedTonullLanguage code the transcript was machine-translated to, or null when no translation was needed.All
isTranslationRefusedbooleanTrue when a machine-translated caption request was refused and the source-language track was used instead.All
availableLanguagesarrayArray of caption language codes available for the video; generated ones are suffixed " (auto)".All
textstringFull transcript text, its segments joined with spaces.All
wordCountintegerTotal word count of the transcript text, as an integer.All
durationSecondsnumberDuration covered by the transcript, in seconds, from the last caption segment's end time.All
segmentCountintegerNumber of caption segments, as an integer.All
segmentsarrayArray of {start, duration, text} caption segments, start and duration in seconds.All
srtstringFull transcript formatted as SubRip (.srt) subtitle text.All
sponsorSegmentsarrayDetected sponsor reads: start/end/durationSeconds (seconds), brand, url, code, offer, text; only when sponsor detection is requested.Only transcript-sponsor
sponsorCountintegerNumber of detected sponsored-read segments; present only when sponsor detection is requested; 0 when none found.Only transcript-sponsor
sponsorSecondsintegerTotal seconds spanned by detected sponsored reads, rounded to 2 decimals; present only when sponsor detection is requested.Only transcript-sponsor
sponsorShareintegerFraction 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.

OptionTypeDefaultWhat it does
videoUrlsarraynonewatch?v=, youtu.be, /shorts/ URLs or bare 11-char ids. Batch as many as you like.
channelUrlsarraynonee.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).
languagesarray["en"]ISO codes. Manual captions are preferred over auto-generated; if none match, a translatable track is machine-translated to the first language.
allowGeneratedbooleantrueAccept YouTube's auto-generated captions when no manually authored transcript exists.
allowTranslationbooleantrueWhen none of your preferred languages is available, machine-translate a translatable caption track into the first language.
includeSegmentsbooleantrueInclude the timestamped transcript segments, not just the full transcript text.
detectSponsorsbooleanfalseAdds 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.

EventPer 1,000 recordsPer 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_found record.
  • Automatic captions and translated tracks are used when no written track matches. Set allowGenerated or allowTranslation to 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 as transcript-sponsor instead of transcript.

Related