View Categories

How to Create a Google API key from the Google Cloud Console

< 1 min read

You can create a Google API key from the Google Cloud Console in a few minutes.

 

1. Open Google Cloud Console #

 
Go to → Google Cloud Console

Login with your Google account.

 

2. Create a Project #

 
At the top:

  • Click the project dropdown
  • Click New Project
  • Enter a name

Example:

Books Gallery API

Then click Create.

 

3. Enable Google Books API #

 
Open → Google API Library

Search for → Books API

Open it and click → Enable

 

4. Create Credentials #

 
Go to → Credentials Page

Click → Create Credentials

Choose → API Key

Google will generate a key like:

AIzaSyAxxxxxxxxxxxxxxxx

 

5. Restrict the API Key (IMPORTANT) #

 
Click the created key.

Application Restrictions

Choose one:

For Website

HTTP referrers

Add your domain:

https://your-domain.com/*

 

6. Restrict API Usage #

 
Under:

API restrictions

Choose:

Restrict key

Select:

Books API

This prevents other Google services from using your key.

Powered by BetterDocs