All guides

October 4, 2026 · Updated · 4 min read

How to Pull YouTube Transcripts into Google Sheets

In short

Add a =TRANSCRIPT() formula to Google Sheets with a few lines of Apps Script: paste YouTube links in one column and get their transcripts in the next.

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 (or use the YouTube word counter for a single video) 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.

Common questions

Can Google Sheets get YouTube transcripts without code?

Not natively. A short Apps Script adds a =TRANSCRIPT() formula; after that it works like any other formula.

Why is the transcript cut off in the cell?

A Google Sheets cell holds at most 50,000 characters, so long transcripts are trimmed. Store the full text in a Doc or Drive file if you need it all.

Why does =TRANSCRIPT() time out?

Custom functions stop after 30 seconds. Captioned videos return in seconds, but long videos that need AI transcription can take longer; run those through the batch endpoint instead.

Try the YouTube Transcript API

Get transcripts as JSON, text, SRT, or VTT. 100 free credits, no card required.

Free tools for this

More guides