How to Get Your Google Maps API Key (Step-by-Step)
Follow these instructions to generate a working Google Maps API key for your website. This guide covers everything from creating the project to enabling the right services and setting permissions.
Step 1: Sign In to Google Cloud Console
-
Visit the Google Cloud Console.
-
Sign in using your Google account. If you don't have one, you'll need to create one first.
Step 2: Create a New Project
-
In the top navigation bar, click on the Project drop-down.
-
Click New Project.
-
Enter a Project Name (e.g., "My Website Maps").
-
Select an Organization if needed, or leave it at "No organization."
-
Click Create.
Step 3: Enable Billing
-
In the sidebar, click Billing.
-
Link a billing account if you havenโt already.
-
If you don't have one, youโll be prompted to create a new billing account.
-
Note: Google offers $200/month of free usage, which covers most small to medium sites.
-
-
Assign the billing account to your new project.
Step 4: Enable the Required APIs
-
Make sure your new project is selected.
-
Go to APIs & Services > Library.
-
Search for and Enable the following APIs:
-
Maps JavaScript API
-
Geocoding API
-
-
To enable an API, click it, then click the blue Enable button.
Step 5: Create API Credentials
-
Go to APIs & Services > Credentials.
-
Click + CREATE CREDENTIALS > API key.
-
A new API key will be generated. Copy this key โ youโll need it later.
Step 6: Restrict the API Key (Highly Recommended)
-
Under the API Keys section, click Edit next to the key you just created.
-
In Application restrictions, choose HTTP referrers (websites).
-
Under Website restrictions, add your domain
https://www.yourdomain.com/
-
In API restrictions, choose Restrict Key, and then select:
-
Maps JavaScript API
-
Geocoding API
-
-
Click Save.
Step 7: Complete the OAuth Consent Screen
(This is sometimes required even for Maps if Google prompts you.)
-
Go to APIs & Services > OAuth consent screen.
-
Choose External and click Create.
-
Fill out the following:
-
App Name: Your Company Name
-
User Support Email: Your Email
-
Developer Contact Information: Your Email
-
-
Save and continue through the steps (you can leave Scopes and Test Users blank unless otherwise instructed).
-
Click Publish.
Step 8: Insert the API Key into Your Website
- Log in to the admin portion of your website
- Go to Integrated Apps > Google > Maps
- Paste your Google Maps API into the "API Key" field.
- Select one of your locations as the Central Location.
- Click Submit.
Final Notes
-
It can take a few minutes for new API settings to propagate.
-
Be sure to test the Contact page after inserting your key to confirm the map loads properly.
-
Keep your API key private. If it ever leaks, regenerate it and update your website.