October 4, 2026 · 4 min read
How to Pull YouTube Transcripts into Google Sheets
A spreadsheet is often the quickest place to review a batch of videos: links in one column, transcripts or word counts in the next. Google Sheets cannot read YouTube transcripts on its own, but a short Apps Script custom function can call the TranscriptYT API.
Add the script
In your sheet, open Extensions → Apps Script, replace the contents with the code below, and save. Put your API key in Project Settings → Script properties as TRANSCRIPTYT_KEY so it is not visible in the sheet.
function TRANSCRIPT(url, language) {
if (!url) return "";
const key = PropertiesService.getScriptProperties().getProperty("TRANSCRIPTYT_KEY");
const params = { url: url, format: "text" };
if (language) params.translate_to = language;
const query = Object.keys(params)
.map((k) => k + "=" + encodeURIComponent(params[k]))
.join("&");
const res = UrlFetchApp.fetch("https://transcript-yt.com/v1/transcript?" + query, {
headers: { Authorization: "Bearer " + key },
muteHttpExceptions: true,
});
if (res.getResponseCode() !== 200) {
return "Error: " + JSON.parse(res.getContentText()).error.code;
}
return res.getContentText().slice(0, 50000);
}Use it like any formula
With a YouTube link in A2, type =TRANSCRIPT(A2) in B2 and fill down. Add a second argument such as "es" to translate the transcript into Spanish. The text is trimmed to 50,000 characters, which is Google Sheets' limit for a single cell.
Each successful transcript costs 1 credit. Sheets caches custom function results, so reopening the sheet does not fetch them again unless the link changes.
Useful formulas on top
Once transcripts are in a column, ordinary formulas go a long way: count words with =COUNTA(SPLIT(B2, " ")), check whether a video mentions a brand with =REGEXMATCH(LOWER(B2), "keyword").
When to use something else
Custom functions time out after 30 seconds, which is plenty for videos with captions but can be too short for long videos that need AI transcription from audio. For whole channels or hundreds of rows, use the batch endpoint from a script, n8n, or Make, and write the results into the sheet.