Google Maps API Key Setup Guide
This guide walks you through creating a Google Maps API Key with Places API and Maps JavaScript API enabled, plus domain restrictions for security.
Prerequisites
A Google account
Access to Google Cloud Console
A domain where you'll be using the API
A valid credit card for billing setup (required for Google Maps Platform APIs)
Step 1: Access Google Cloud Console
Navigate to the Google Cloud Console
Sign in with your Google account if not already signed in
Step 2: Create or Select a Project
To Create a New Project:
Click on the project dropdown at the top of the page (next to "Google Cloud")
Click "NEW PROJECT" in the dialog that appears
Enter a project name (e.g., "BulkDelivery PRO Maps")
Optionally select an organization if you have one
Click "CREATE"
Wait for the project to be created and select it
To Use an Existing Project:
Click on the project dropdown at the top of the page
Select your desired project from the list
Step 3: Set Up Billing Account
Important: Google Maps Platform APIs require a billing account with a valid payment method, even if you stay within the free tier limits.
Create or Link a Billing Account:
In the Google Cloud Console, navigate to "Billing" in the left sidebar
If you don't see "Billing", click the hamburger menu (☰) to expand the navigation
If you don't have a billing account:
Click "CREATE ACCOUNT" or "LINK A BILLING ACCOUNT"
Follow the prompts to create a new billing account
Enter your billing information:
Business or individual account type
Contact information
Valid credit card details (required)
Billing address
Review and accept the terms of service
Click "START MY FREE TRIAL" or "SUBMIT AND ENABLE BILLING"
Link Billing Account to Your Project:
After creating the billing account, you'll be prompted to link it to your current project
If not automatically prompted:
Go to "Billing" in the left sidebar
Click "LINK A BILLING ACCOUNT"
Select your billing account from the dropdown
Click "SET ACCOUNT"
Verify Billing Status:
In the left sidebar, go to "Billing"
Confirm that your project shows "Billing Enabled" status
You should see your billing account name listed
Step 4: Enable Required APIs
Enable Maps JavaScript API:
In the left sidebar, navigate to "APIs & Services" > "Library"
In the search bar, type "Maps JavaScript API"
Click on "Maps JavaScript API" from the results
Click the "ENABLE" button
Wait for the API to be enabled
Enable Places API:
While still in the API Library, search for "Places API"
Click on "Places API" from the results
Click the "ENABLE" button
Wait for the API to be enabled
Note: If you receive an error about billing when trying to enable these APIs, ensure your billing account is properly linked to your project (see Step 3).
Step 5: Create API Credentials
In the left sidebar, navigate to "APIs & Services" > "Credentials"
Click "CREATE CREDENTIALS" at the top of the page
Select "API key" from the dropdown menu
Your new API key will be generated and displayed in a dialog
Important: Copy and save this key securely - you'll need it for your application
Click "CLOSE" (don't click "RESTRICT KEY" yet - we'll do this in the next step)
Step 6: Configure API Key Restrictions
Access Key Restrictions:
On the Credentials page, find your newly created API key
Click on the API key name or the pencil icon to edit it
Set Application Restrictions:
In the "Application restrictions" section, select "HTTP referrers (web sites)"
Click "ADD AN ITEM"
Enter your domain restrictions in one of these formats:
https://yourdomain.com/*
(for your main domain)https://*.yourdomain.com/*
(to include all subdomains)
Add multiple entries if you need to support different environments (development, staging, production)
Set API Restrictions:
In the "API restrictions" section, select "Restrict key"
From the dropdown, select the APIs you want to allow:
✅ Maps JavaScript API
✅ Places API
Save Your Changes:
Click "SAVE" at the bottom of the page
Wait for the changes to take effect (may take a few minutes)
Last updated