Extract YouTube stats to Google Sheet

Pull channel, video, and playlist metadata to a Google Sheet using the YouTube Data API.

This solution includes a Google Apps Script that uses the YouTube Data API to extract information about channels and their videos and playlists. The script reads a list of channel IDs from a sheet, gets the channel metadata, and iterates through the videos and playlists of each channel and gets their own metadata. All information is saved into the sheet.

Easy to use

The script uses an initialization object that centralizes the names of the tabs, as well as the data keys to pull from YouTube. This makes it easy to make changes in the data you want to pull and store for channels, videos, and playlists.

You can configure a time-based trigger to have the script pull data periodically, or run it manually via a custom menu item or directly from the editor.

YouTube channel data

When the script runs, it pulls the channel IDs from the "Channel IDs" tab and writes the metadata of each channel.

You can see in the code the various data elements that are available, and make modifications as you need.

YouTube video data

For each channel ID, the script pulls all the uploaded videos. It then displays the video metadata based on the columns specified in the code.

The script makes subsequent API calls to fetch more videos using "nextPage" tokens, similar to how search result pages work.

YouTube playlist data

For each channel ID, the script also pulls all of the channel's playlists. It then displays the playlist metadata based on the columns specified in the code.

The script makes subsequent API calls to fetch more playlists using "nextPage" tokens, similar to how search result pages work.

Technologies and libraries in project
Google Apps Script
Google YouTube Data API
Google Sheets

BUY THIS PRODUCT

$45

The price is a one-time fee for the purchase of a script.

  • Spreadsheet-bound Google Apps Script
  • Unlimited script use
  • Fully customizable
  • Implementation instructions
  • Free email support for 30 days
pay with stripe

More information

What do I receive after I complete the purchase? +
You will receive a link to copy the Google Sheet that contains the script, and add it to your Google Drive.
What if I need technical support? +
Please use the contact form to submit your issue. You will receive a response within 24 hours Mon-Fri 9am-5pm PT. Please note that support does not include any customizations or new features.
What if I need to customize this script? +
You have two options here: You can either customize the script on your own, or hire me to customize it for you. Please use the contact form to describe your customization needs. I'll provide you with the amount of hours you'll need to prepay, and the hourly rate.
What are the requirements for using this script? +
You need to have a Gmail account or a Google Workspace account.
What is your refund policy? +
At this time there is no refund, unless you experience a technical problem that I am unable to resolve.