How to Apply for a Google API key for YouTube

This tutorial will guide you how to apply for a Google API key for YouTube.

(Updated on August 1, 2018)

Table of Contents:

Step 1: Log into the Google API Console

Visit Google API Console and login with your YouTube/Google ID:

Step 2: Create a project in Google API Dashboard

In Google API dashboard, click the button "Create Project", then follow the screens, enter a project name and create a new project.

Step 3: Enable YouTube Data API v3

In Google API dashboard, click Library on the left menu.

Look for the service YouTube -> YouTube Data API v3:

Click YouTube Data API v3, then click the Enable button to enable the API service.

Step 4: Create a Google API key

In Google API dashboard, click "Credentials" on the left menu, then click the button Create credentials, select API key from the drop down list.

Copy the created API key.

If you want to restrict your key so it can only be used from your own web sites, you can click the button "Restrict Key" and configure the restriction, otherwise you can click the Close button.

Restrict your Google API key

To restrict your key so it can only be used on your own website, you can select the option "HTTP referrers(web sites), then enter your domain name to the accepted list.

You can use * for wildcards, for example, for our website, I entered*.

Please pay attention to the HTTP protocol, it's either http:// or https://. Please also note, is different to Please make sure to enter the HTTP protocol and the domain name of your website correctly, otherwise, the API key will not work and the call to Google API will fail.