How to Extract all YouTube Channel Video Links to Google Sheet for FREE?

Key Takeaways

  • App Scripts extracts YouTube channel video links into Google Sheets with just a few lines of code.
  • YouTube API Key is required to access the YouTube API and retrieve video links.
  • The maximum number of results that can be retrieved in one API request is 300.
  • Setting up App Script triggers allows automatic updates of video links every hour in Google Sheets.
  • The YouTube Channel ID is found in the URL after 'channel/' and is essential for extraction.

Using this hack, you can extract all YouTube Videos Links from any YouTube Channel and save them in Google Sheets.

If you are a content creator on YouTube, you know how important it is to keep track of your video links. However, manually copying and pasting each link into a Google Sheet can be time-consuming and tedious.

Fortunately, with App Scripts, you can extract all YouTube channel video links into a Google Sheet in no time. I have found App Scripts to be an incredibly useful tool. With just a few lines of code, I can extract all the video links from my channel and organize them in a Google Sheet. This not only saves me time but also allows me to easily share the links with my team and track the performance of each video.

If you require any customization, you can always connect with me.

Table of Contents

Requirements

To extract all YouTube channel video links into a Google Sheet using App Scripts, we will need the following:

  • A YouTube API Key
  • The YouTube Channel ID that you want to extract
  • A Google Sheet

The YouTube API Key is necessary to access the YouTube API and retrieve the video links. You can obtain a YouTube API Key by following the instructions provided by Google. The YouTube Channel ID is the unique identifier for the channel whose videos you want to extract. You can find the Channel ID in the URL of the channel page on YouTube.

The Google Sheet will be used to store the extracted video links. You can create a new Google Sheet or use an existing one. Make sure to have the necessary permissions to access and edit the Google Sheet.

Once you have the YouTube API Key, YouTube Channel ID, and Google Sheet, you can proceed to the next steps to extract the video links using App Scripts.

How to Get YouTube Data API Keys?

To get your YouTube API Key, you can follow the steps:

Login to Google Cloud Console

To get started with the YouTube Data API, you need to have a Google account. If you don’t have one, create a new account. Once you have a Google account, go to the Google Cloud Console and sign in with your credentials.

Create a New Project and Enable the YouTube Data v3 API

After logging in to the Google Cloud Console, create a new project by clicking on the “Select a project” dropdown menu on the top bar and then clicking on the “New Project” button. Give your project a name and click “Create”. Once your project is created, select it from the dropdown menu on the top bar.

Creating new Google Cloud Platform Project

Next, you need to enable the YouTube Data v3 API. To do this, click on the “APIs & Services” option in the left sidebar and then click on the “Dashboard” option. Click on the “Enable APIs and Services” button and search for “YouTube Data API v3”. Click on the “YouTube Data API v3” result and then click on the “Enable” button.

Enabling YouTube API

Create and Copy the YouTube API Credentials

Now that you have enabled the YouTube Data v3 API, you need to create and copy the API credentials. To do this, click on the “Create Credentials” button and select “API key” from the dropdown menu. Copy the API key that is generated, as you will need it later.

Getting API Key from YouTube

How to Get a YouTube Channel ID?

To get the YouTube channel ID, go to the YouTube channel page and look at the URL. The channel ID is the string of characters that comes after “channel/” in the URL. For example, if the URL is “https://www.youtube.com/channel/UCaXk_yWlCuLGYIJSohc0YOw”, then the channel ID is “UCaXk_yWlCuLGYIJSohc0YOw”.

Check the reference for my YouTube Channel from the image below

How to Find YouTube Channel ID

You can also use this tool to get Channel ID from a pretty channel links, example I will extract videos link from the famous Brian Dean’s channel, but when we open the channel we find – https://www.youtube.com/@BrianDean/ in the URL bar.

So, just paste the URL on the above website and it will show you the channel ID.

Copying Channel ID if you find it

Therefore, by following these steps, you can obtain your YouTube Data API keys and channel ID. With this information, you can use the API Connector and API Requests to extract all YouTube channel video links into Google Sheet using App Scripts. You can also filter the video links by title and parameters as needed.

How to Connect YouTube Data API with Google Sheets?

Connecting YouTube Data API with Google Sheets is a simple process that requires a few steps. Follow the steps below to connect the YouTube Data API with Google Sheets:

Creating the App Script Code in Sheets

The first step is to create an App Script code in Google Sheets. Here’s how:

  1. Open a Google Sheet and click on the “Extensions” menu.
  2. Select “App Scripts” from the drop-down menu.
  3. A new tab will open with a blank script.
chrome j0QQLq7SgL

After opening it, create a script and paste this code below

function listVideos() {
  // Replace CHANNEL_ID with the ID of the channel
  var channelId = "CHANNEL_ID";
  // Replace API_KEY with your API key
  var apiKey = "API_KEY";
  // Get the spreadsheet and the sheet
  var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = spreadsheet.getSheetByName("YouTube");
  // Set the API endpoint and parameters
  var endpoint = "https://www.googleapis.com/youtube/v3/search";
  var params = {
    part: "snippet",
    type: "video",
    channelId: channelId,
    key: apiKey,
    maxResults: 300,
    videoDefinition: "high",
    videoEmbeddable: "true",
    videoSyndicated: "true"
  };
  // Initialize the row index
  var rowIndex = 2;  // <-- Start writing the results from the 2nd row
  // Loop through all the pages of results
  while (true) {
    // Make the API request
    var response = UrlFetchApp.fetch(endpoint + "?" + buildQueryString(params));
    var data = JSON.parse(response.getContentText());
    // Exit the loop if there are no more results
    if (!data.items || data.items.length == 0) {
      break;
    }
    // Loop through the results
    for (var i = 0; i < data.items.length; i++) {
      // Get the video title and URL
      var title = data.items[i].snippet.title;
      var url = "https://www.youtube.com/watch?v=" + data.items[i].id.videoId;
      // Write the URL to the sheet
      sheet.getRange(rowIndex, 8).setValue(url);  // <-- Write the URL to the cell
      rowIndex++;
    }
    // Set the next page token
    params.pageToken = data.nextPageToken;
  }
}

// Helper function to build a query string from an object
function buildQueryString(params) {
  var query = [];
  for (var key in params) {
    query.push(encodeURIComponent(key) + "=" + encodeURIComponent(params[key]));
  }
  return query.join("&");
}

And you’re done with most of the work now.

Adding the Global API & Channel ID in Code

After pasting the App Script code, the next step is to add the global API and channel ID you have collected earlier.

Here’s how:

Replace CHANNEL_ID with the channel you want to collect links of, and API_KEY with the YouTube Global Data API you have generated from your Google Cloud console.

Make a Test Run of App Script

Once you have added the global API and channel ID, you can make a test run of the App Script. Here’s how:

  1. Click on the “Run” menu and select “listVideos”.
  2. Wait for the script to run. You should see a list of video links in your current Sheet Page
Extracting YouTube Links from Any YouTube Channel

If you want to extract other details like Video views, Video Title etc., then I would suggest you to my this blog where I talked about this using a different script.

Please have no hesitation to connect with me if you would like to collect any other details from YouTube API, I open for custom works.

I share what actually works in WordPress, SEO, and AI automation every week. Real numbers. Real experiments. No recycled advice.

BONUS: How to Automate this using App Script Triggers

If you want to automate the process of extracting video links from a YouTube channel to a Google Sheet, you can use App Script triggers. Here’s how:

  1. In the App Script dashboard, click on trigger menu i.e. 3rd icon from top.
  2. Click on the “Add trigger” button in the bottom right corner.
  3. Set the trigger settings to the following:
    • Choose which function to run: listVideos
    • Choose which deployment should run: Head
    • Select event source: Time-driven
    • Select type of time based trigger: Hour timer
    • Select hour interval: Every hour
  4. Click on the “Save” button.
Enabling Time Based Trigger

With the trigger set up, the script will run automatically every hour and update the video links in the Google Sheet.

Conclusion

After going through the steps outlined in this article, I was able to successfully extract all YouTube channel video links into a Google Sheet using App Scripts. This process can be extremely useful for content creators, marketers, and anyone who wants to keep track of their favorite YouTube channels.

By using the YouTube Data API and Google Sheets, we were able to automate the process of extracting video links, titles, and other important information. This saves a lot of time and effort compared to manually copying and pasting links into a spreadsheet.

One thing to note is that the process may take longer for channels with a large number of videos. However, the script can be modified to run in batches to avoid exceeding the API quota limit. Additionally, the script can be customized to extract other types of data such as video descriptions, tags, and comments.

Overall, I found this to be a very helpful and efficient way to extract YouTube channel video links into a Google Sheet. With a little bit of coding knowledge and some patience, anyone can use this method to automate their YouTube data collection process.

Frequently Asked Questions

What should I do if my YouTube API key is not working?

If your YouTube API key is not working, first ensure it is correctly copied from the Google Cloud Console. Check that you have enabled the YouTube Data v3 API for your project. If the API is enabled and the key is still not functioning, consider regenerating the API key and updating it in your App Script code.

Can I extract video links from a private YouTube channel?

You cannot extract video links from a private YouTube channel using the YouTube Data API. The API requires public access to the channel's content. If you need to track videos from a private channel, you will need direct access to the channel or the video links.

What is the best practice for organizing extracted video links in Google Sheets?

Organizing extracted video links in Google Sheets can be optimized by creating separate columns for video titles, URLs, and any additional metadata you want to track. This allows for easier sorting and filtering. Consider using headers like 'Video Title' and 'Video URL' for clarity.

How do I find the YouTube Channel ID for extraction?

To find the YouTube Channel ID, visit the channel's page and look at the URL. The Channel ID is the string of characters following 'channel/' in the URL. Alternatively, you can use online tools that convert user-friendly links to Channel IDs.

What happens if I exceed the YouTube API quota limit?

Exceeding the YouTube API quota limit will result in your API requests being blocked until the quota resets. This can hinder your ability to extract video links. To manage this, consider running your extraction script in smaller batches or scheduling it to run less frequently.

Last reviewed: April 16, 2026

About the Author

Photo of Aditya Sharma CMO & Marketing Head
CMO · POSIMYTH Innovations · 7 years experience

CMO at POSIMYTH Innovations (500K+ users). I do marketing, SEO, server management, AI automation, content, and YouTube. Everything I write here comes from real work and real experiments.

WordPressElementorn8nAIClaudeAutomationServer
Stop Managing Servers!
Start Managing Clients.

Your clients deserve servers that never flinch.
You deserve to never think about servers again.

Whether you need a bulletproof setup built from scratch or someone to take over what you already have  I handle the infrastructure so your agency can focus on what it bills for.

No downtime calls. No 3am panics. No excuses.

Explore Further