google api

How To Get Google Map API

If you want to use Google maps on your website, you need to have Google Maps API code, so in this article, I will show you how to get Google Maps API key in detail.

Step By Step

Step 1: Go to and log in with your gmail account.

google API

After logging in, select a project and choose NEW PROJECT to create a new project.

google API create

Enter the project name as you wish and select CREATE.

After creating the project, we go to Library.

In the Library you search for Maps JavaScript API and Places API and select Enable to enable.

API library

Select Enable to activate Maps JavaScript API, and wait a moment for the activation process.

Then, we enable the Places API.

Step 2: After activation, we return to the main page and select Credentials.


Next, select CREATE CREDENTIALS -> API key.

The API key is generated; you choose RESTRICT KEY.

restrict key

You scroll down to Application restrictions, select the application depending on your needs, to use for the web, and select HTTP referrers (web sites).

The Website restrictions section, you can add your website URL to use only for 1 page, or if left blank, the API key will be used for all websites.

Next, scroll down to the API restrictions section, click on Restrict key, select 2 APIs, Maps JavaScript API, and Places API, and then SAVE again.

API restrict

Wait for a while, then click on the copy icon to copy the Google Maps API code.

So I have finished the instructions on how to get the Google Maps API key. Hope this guide help you!