
Adding Google Maps to a website can look like a technical job, but creating a Google Maps API key is fairly straightforward. The confusing part is usually billing.
Google Maps Platform is not simply a case of generating a key and getting unlimited free access. Current Google Maps Platform services use usage-based pricing, with free monthly usage available for eligible services and a billing account generally required for production use.
For a small website, development project, WordPress site, or basic business application, the available free usage may be enough to keep costs at zero. The key is setting up the project correctly and restricting the API key before putting it online.
What Is a Google Maps API Key?
A Google Maps API key is a unique credential that identifies an application when it makes requests to Google Maps Platform.
It can be used with services such as:
- Maps JavaScript API
- Places API
- Geocoding
- Routes
- Maps Embed API
- Maps Static API
- Street View services
The exact API required depends on what the website or application needs to do. Displaying an interactive map, searching for places and converting an address into coordinates are separate use cases and may require different Google Maps APIs.
Google recommends restricting API keys so that an exposed key cannot be freely reused by someone else.
Create a Google Cloud Project
The first step is creating a project in Google Cloud.
Open the Google Cloud Console and sign in with a Google account.
From the project selector:
- Select New Project.
- Enter a project name.
- Choose the relevant organisation or location, if applicable.
- Click Create.
- Select the new project once it has been created.
Keeping Maps-related services inside a dedicated project makes usage, credentials and billing easier to manage later.
Enable the Required Google Maps API
Creating the key alone does not automatically give access to every Maps service.
Open APIs & Services in Google Cloud and select Library. Search for the service required by the application and select Enable.
For a website displaying an interactive Google map, the Maps JavaScript API is commonly required. A location search feature may also require the Places API.
Only enable services that are actually needed. This keeps the project cleaner and makes API-key restrictions easier to maintain.
Create the Google Maps API Key
Once the required API has been enabled, go to APIs & Services → Credentials.
Select:
Create Credentials → API Key
Google will generate the key immediately. The newly created credential appears in the project’s API keys section.
Copy the key and store it securely. Do not publish it in a public GitHub repository or paste an unrestricted server-side key into publicly accessible code.
For production websites, the next step should be key restriction—not skipping straight to deployment.
Restrict the API Key
An unrestricted Google Maps API key can become an expensive mistake if somebody obtains it and sends requests through the account.
Open the newly created key and look for Key restrictions.
For a normal website, select Websites or HTTP referrers, then add the approved website addresses. For server-side web services, IP address restrictions are generally more appropriate. Android and iOS applications have their own restriction methods.
API restrictions should also be applied. Select Restrict key, then choose only the Maps APIs that the project actually uses.
This two-layer approach—application restriction plus API restriction—reduces the chance of unwanted usage.
Is a Google Maps API Key Really Free?
The key itself does not have a separate purchase price. The services accessed through it can generate charges depending on usage.
Google Maps Platform currently provides free monthly usage thresholds for individual Core Services SKUs. The amount depends on the service and pricing category. Google also offers a $300 welcome credit for eligible new Google Cloud customers.
That means “free Google Maps API key” should not be interpreted as unlimited free Google Maps usage.
A small project may remain within the applicable free usage threshold, while a busy application can exceed it.
Set Usage Limits and Billing Alerts
A billing account should not be left without monitoring.
Google Cloud provides quota controls, budgets and alerts that can help identify unusual usage before costs get out of hand. Quotas can also limit how many requests a project can make.
For a new project, a sensible setup includes:
- API-key restrictions
- API restrictions
- Appropriate quotas
- A billing budget
- Usage alerts
- Separate keys for separate applications where practical
Google states that account owners can be financially responsible for charges caused by abuse of unrestricted API keys.
Add the API Key to a Website
For a Maps JavaScript implementation, the key is typically included when loading the Maps JavaScript API.
The exact implementation depends on the website framework and Google Maps service being used. WordPress sites may also rely on plugins that request the key through their settings rather than requiring manual code changes.
Before publishing the map, test the page and check Google Cloud usage reports. If an authorization error appears, review the enabled API, website restriction and API restriction first.
Final Thoughts
Creating a Google Maps API key is free, but using Google Maps Platform is governed by service-specific usage limits and billing rules.
The safest setup is simple: create a dedicated Google Cloud project, enable only the required APIs, generate the key, restrict it to the correct website or application, and monitor usage.
For a low-traffic website, the available free monthly usage may cover normal requirements. For larger projects, billing should be treated as part of the initial technical setup rather than an afterthought.
Also Read:
