YouTube Connector for MS ExcelRead / write YouTube data inside your app, perform many Youtube operations without coding using easy to use high performance API Connector for YouTube In this article you will learn how to quickly and efficiently integrate YouTube data in MS Excel without coding. We will use high-performance YouTube Connector to easily connect to YouTube and then access the data inside MS Excel. Let's follow the steps below to see how we can accomplish that! YouTube Connector for MS Excel is based on ZappySys API Driver which is part of ODBC PowerPack. It is a collection of high-performance ODBC drivers that enable you to integrate data in SQL Server, SSIS, a programming language, or any other ODBC-compatible application. ODBC PowerPack supports various file formats, sources and destinations, including REST/SOAP API, SFTP/FTP, storage services, and plain files, to mention a few. |
Connect to YouTube in other apps
|
Create ODBC Data Source (DSN) based on ZappySys API Driver
Step-by-step instructions
To get data from YouTube using MS Excel we first need to create a DSN (Data Source) which will access data from YouTube. We will later be able to read data using MS Excel. Perform these steps:
-
Download and install ODBC PowerPack.
-
Open ODBC Data Sources (x64):
-
Create a User data source (User DSN) based on ZappySys API Driver
ZappySys API Driver-
Create and use User DSN
if the client application is run under a User Account.
This is an ideal option
in design-time , when developing a solution, e.g. in Visual Studio 2019. Use it for both type of applications - 64-bit and 32-bit. -
Create and use System DSN
if the client application is launched under a System Account, e.g. as a Windows Service.
Usually, this is an ideal option to use
in a production environment . Use ODBC Data Source Administrator (32-bit), instead of 64-bit version, if Windows Service is a 32-bit application.
-
Create and use User DSN
if the client application is run under a User Account.
This is an ideal option
-
When the Configuration window appears give your data source a name if you haven't done that already, then select "YouTube" from the list of Popular Connectors. If "YouTube" is not present in the list, then click "Search Online" and download it. Then set the path to the location where you downloaded it. Finally, click Continue >> to proceed with configuring the DSN:
YoutubeDSNYouTube -
Now it's time to configure the Connection Manager. Select Authentication Type, e.g. Token Authentication. Then select API Base URL (in most cases, the default one is the right one). More info is available in the Authentication section.
Steps how to get and use YouTube credentials
This walkthrough will help you create an API Key which you will be able to use in all requests and authenticate accordingly.- Go to Google API Console
- From the Project Dropdown (usually found at the top bar) click Select Project
- On Project Popup click CREATE PROJECT
- Once project is created you can click Select Project to switch the context (You can click on Notification link or Choose from Top Dropdown)
- Click ENABLE APIs AND SERVICES
- Now we need to Enable three APIs one by one (YouTube Data API, YouTube Analytics API, YouTube Reporting API).
- Search YouTube Data API. Select and click ENABLE
- Search YouTube Analytics API. Select and click ENABLE
- Search YouTube Reporting API. Select and click ENABLE
- Go to back to main screen of Google API Console
- Click OAuth Consent Screen Tab. Enter necessary details and Save.
- Click Credentials Tab
- Click CREATE CREDENTIALS (some where in topbar) and select API key option.
- In the popup, copy API Key from the field "Your API key", close this window, and use it in the UI configuration, "key" field
Fill in all required parameters and set optional parameters if needed:
YoutubeDSNYouTubeAPI Key [Http]https://youtube.googleapis.com/youtube/v3Required Parameters key Fill-in the parameter... Optional Parameters RetryMode RetryWhenStatusCodeMatch RetryStatusCodeList 403|429 RetryCountMax 5 RetryMultiplyWaitTime True Steps how to get and use YouTube credentials
To register a custom app, perform the following steps (detailed steps found in the help link at the end)- Go to Google API Console
- From the Project Dropdown (usually found at the top bar) click Select Project
- On Project Popup click CREATE PROJECT
- Once project is created you can click Select Project to switch the context (You can click on Notification link or Choose from Top Dropdown)
- Click ENABLE APIs AND SERVICES
- Now we need to Enable three APIs one by one (YouTube Data API, YouTube Analytics API, YouTube Reporting API).
- Search YouTube Data API. Select and click ENABLE
- Search YouTube Analytics API. Select and click ENABLE
- Search YouTube Reporting API. Select and click ENABLE
- Go to back to main screen of Google API Console
- Click OAuth Consent Screen Tab. Enter necessary details and Save.
- Click Credentials Tab
- Click CREATE CREDENTIALS (some where in topbar) and select OAuth Client ID option.
- When prompted Select Application Type as Desktop App and click Create to receive your ClientID and Secret. Later on you can use this information now to configure Connection.
- Go to OAuth Consent Screen tab. Under Publishing Status click PUBLISH APP to ensure your refresh token doesnt expire often. If you planning to use App for Private use then do not have to worry about Verification Status after Publish.
Fill in all required parameters and set optional parameters if needed:
YoutubeDSNYouTubeUser Account [OAuth]https://youtube.googleapis.com/youtube/v3Optional Parameters ClientId ClientSecret Scope https://www.googleapis.com/auth/youtube https://www.googleapis.com/auth/youtube.readonly https://www.googleapis.com/auth/youtubepartner https://www.googleapis.com/auth/youtube.force-ssl https://www.googleapis.com/auth/youtube.upload https://www.googleapis.com/auth/youtubepartner-channel-audit https://www.googleapis.com/auth/yt-analytics-monetary.readonly https://www.googleapis.com/auth/yt-analytics.readonly RetryMode RetryWhenStatusCodeMatch RetryStatusCodeList 403|429 RetryCountMax 5 RetryMultiplyWaitTime True Redirect URL (Only for Web App) Steps how to get and use YouTube credentials
Use these steps to authenticate as service account rather than Google / GSuite User. Learn more about service account here Basically to call Google API as Service account we need to perform following steps listed in 3 sections (Detailed steps found in the help link at the end)Create Project
First thing is create a Project so we can call Google API. Skip this section if you already have Project (Go to next section)- Go to Google API Console
- From the Project Dropdown (usually found at the top bar) click Select Project
- On Project Popup click CREATE PROJECT
- Once project is created you can click Select Project to switch the context (You can click on Notification link or Choose from Top Dropdown)
- Click ENABLE APIs AND SERVICES
- Now we need to Enable three APIs one by one (YouTube Data API, YouTube Analytics API, YouTube Reporting API)
- Search YouTube Data API. Select and click ENABLE
- Search YouTube Analytics API. Select and click ENABLE
- Search YouTube Reporting API. Select and click ENABLE
Create Service Account
Once Project is created and APIs are enabled we can now create a service account under that project. Service account has its ID which looks like some email ID (not to confuse with Google /Gmail email ID)- Go to Create Service Account
- From the Project Dropdown (usually found at the top bar) click Select Project
- Enter Service account name and Service account description
- For Role, do not select anything for now and Click Continue and then click Done. Next we will create Key.
Create Key
Once service account is created we need to create key file (i.e. credentials).- In the Cloud Console, click the email address for the service account that you created.
- Click Keys.
- Click Add key, then click Create new key.
- Click Create and select P12 format. A P12 key file is downloaded to your computer. We will use this file in our API connection.
- Click Close.
- Now you may use downloaded *.p12 key file as secret file and Service Account Email as Client ID (e.g. some-service-account-name@your-project-id.iam.gserviceaccount.com ).
Add Permission
Now last thing is give read/write permission to Service Account. Basically you can create or open Google Sheet and add the Service Account as an editor to it as below.- Copy the email address of your service account we created in previous step (its usually like this some-service-account-name@your-project-id.iam.gserviceaccount.com).
- Create or select an existing Google Sheet.
- Navigate to Sheet for which you like to give read/write access to Service Account.
- Click on the Share button in the top right, and add the email address of the service account as an editor. Here is how to share file(s) with specific people. Juse share with Service Account (use Service Account Email found on previous section)
Fill in all required parameters and set optional parameters if needed:
YoutubeDSNYouTubeService Account (Using Private Key File) [OAuth]https://youtube.googleapis.com/youtube/v3Required Parameters Service Account Email Fill-in the parameter... Service Account Private Key Path (i.e. *.p12) Fill-in the parameter... Optional Parameters Scope https://www.googleapis.com/auth/youtube https://www.googleapis.com/auth/youtube.readonly https://www.googleapis.com/auth/youtubepartner https://www.googleapis.com/auth/youtube.force-ssl https://www.googleapis.com/auth/youtube.upload https://www.googleapis.com/auth/youtubepartner-channel-audit https://www.googleapis.com/auth/yt-analytics-monetary.readonly https://www.googleapis.com/auth/yt-analytics.readonly RetryMode RetryWhenStatusCodeMatch RetryStatusCodeList 403|429 RetryCountMax 5 RetryMultiplyWaitTime True -
Once the data source connection has been configured, it's time to configure the SQL query. Select the Preview tab and then click Query Builder button to configure the SQL query:
ZappySys API Driver - YouTubeRead / write YouTube data inside your app, perform many Youtube operations without coding using easy to use high performance API Connector for YouTubeYoutubeDSN -
Start by selecting the Table or Endpoint you are interested in and then configure the parameters. This will generate a query that we will use in MS Excel to retrieve data from YouTube. Hit OK button to use this query in the next step.
SELECT * FROM MyVideos
Some parameters configured in this window will be passed to the YouTube API, e.g. filtering parameters. It means that filtering will be done on the server side (instead of the client side), enabling you to get only the meaningful datamuch faster . -
Now hit Preview Data button to preview the data using the generated SQL query. If you are satisfied with the result, use this query in MS Excel:
ZappySys API Driver - YouTubeRead / write YouTube data inside your app, perform many Youtube operations without coding using easy to use high performance API Connector for YouTubeYoutubeDSNSELECT * FROM MyVideos
You can also access data quickly from the tables dropdown by selecting <Select table>.AWHERE
clause,LIMIT
keyword will be performed on the client side, meaning that thewhole result set will be retrieved from the YouTube API first, and only then the filtering will be applied to the data. If possible, it is recommended to use parameters in Query Builder to filter the data on the server side (in YouTube servers). -
Click OK to finish creating the data source.
Video Tutorial
Read data in Excel from the DSN
-
In Excel click Data, then select Get Data, proceed with From Other Sources and choose From ODBC item. This will get data from ODBC data source we created:
-
A small window opens, then simply select the data source you created in previous steps:
YoutubeDSN -
Most likely, you will be asked to authenticate to a newly created DSN. Just select Windows authentication option together with Use my current credentials option:
YoutubeDSN -
Finally, you will be asked to select a table or view to get data from. Select one and load the data!
-
Finally, finally, use data extracted from YouTube API in an Excel worksheet:
Actions supported by YouTube Connector
Learn how to perform common YouTube actions directly in MS Excel with these how-to guides:
- Get channels
- Get comments
- Get playlist items
- Get playlists
- Get report
- Get video details
- Get videos
- Get videos rating
- Search
- Generic Request
- Generic Request (Bulk Write)
Conclusion
In this article we showed you how to connect to YouTube in MS Excel and integrate data without any coding, saving you time and effort. It's worth noting that ZappySys API Driver allows you to connect not only to YouTube, but to any Java application that supports JDBC (just use a different JDBC driver and configure it appropriately).
We encourage you to download YouTube Connector for MS Excel and see how easy it is to use it for yourself or your team.
If you have any questions, feel free to contact ZappySys support team. You can also open a live chat immediately by clicking on the chat icon below.
Download YouTube Connector for MS Excel Documentation
More integrations
Other connectors for MS Excel
Other application integration scenarios for YouTube
How to connect YouTube in MS Excel?
How to get YouTube data in MS Excel?
How to read YouTube data in MS Excel?
How to load YouTube data in MS Excel?
How to import YouTube data in MS Excel?
How to pull YouTube data in MS Excel?
How to push data to YouTube in MS Excel?
How to write data to YouTube in MS Excel?
How to POST data to YouTube in MS Excel?
Call YouTube API in MS Excel
Consume YouTube API in MS Excel
YouTube MS Excel Automate
YouTube MS Excel Integration
Integration YouTube in MS Excel
Consume real-time YouTube data in MS Excel
Consume real-time YouTube API data in MS Excel
YouTube ODBC Driver | ODBC Driver for YouTube | ODBC YouTube Driver | SSIS YouTube Source | SSIS YouTube Destination
Connect YouTube in MS Excel
Load YouTube in MS Excel
Load YouTube data in MS Excel
Read YouTube data in MS Excel
YouTube API Call in MS Excel