In­te­grat­ing Google Maps on websites or in apps can make your content look pro­fes­sion­al while providing a better user ex­pe­ri­ence. But to do this, you need Google Maps API keys, which can be generated and used via your own Google account and the Google Maps developer page.

What is a Google Maps API key?

If you want to embed Google Maps features like the map into your website or apps, you’ll need API access. The ap­pli­ca­tion pro­gram­ming interface, ab­bre­vi­at­ed API, enables the exchange of data and cross-ap­pli­ca­tion use of Google Maps. But to use the Google Maps API, you need a one-time secret Google Maps API key.

The au­then­ti­ca­tion key iden­ti­fies au­tho­rized API accesses and au­tho­rizes error-free data exchanges to let you use Google Maps’ functions. Depending on how you integrate Google Maps, Google uses an API key to check if access has been au­tho­rized.

What are the ad­van­tages of in­te­grat­ing Google Maps?

In­te­grat­ing Google Maps can support your website or app by making it look pro­fes­sion­al. In addition, Google Maps offers a variety of APIs with their own ad­van­tages and functions. Embedding Google Maps can also boost the dis­cov­er­abil­i­ty of your business or other online services with its handy map feature.

If you want to embed Google Maps, then there’s the option to get Google Maps embedded in WordPress with or without a plugin. Either way, there’s a clear added value in terms of the user ex­pe­ri­ence for your customers.

If you want to embed maps in your website, but don’t want to use Google Maps, why not try some Google Maps al­ter­na­tives like Apple Maps, Waze, or Maps.me?

IONOS Developer API
Manage your hosting products through our powerful API
  • DNS man­age­ment
  • Easy SSL admin
  • API doc­u­men­ta­tion

How to active Google Maps API

Before you generate and embed an API key, you first need to enable Google Maps APIs. The API key will apply to these and will enable the exchange of data and functions.

Step 1: Open the Google Cloud platform page and sign in. In the left-hand menu, choose “APIs & Services” and then “Library”.

Image: The “Library” sub item in the “APIs & Services” menu
Select the “Library” sub item under “APIs & Services” for an overview of Google Cloud’s available APIs.

Step 2: In the library, choose “Maps”. Here you’ll be able to get an overview of all available Google Maps APIs. These include:

  • Ge­olo­ca­tion API: To determine the location of visitors to the site.
  • Maps Embed API: To embed a standard Maps map as an iFrame.
  • Maps JavaScript API: To embed the map as JavaScript for more control and in­ter­ac­tiv­i­ty.
  • Maps Static API: To embed a map as a static image.
  • Places API: To find and display specific addresses on the map.
Image: Google Maps APIs
An overview of Google Maps APIs.

If the API you’re looking for doesn’t au­to­mat­i­cal­ly show up in the library, you can use the search function.

Step 3: Select an API and open the detailed view. Click on the “Enable” button.

Image: Enabling a Google Maps API
To use a selected Google Maps API, you must enable it.

Re­quire­ments for a Google Maps API key

To create an API key, not only do you need a Google account – you’ll also need your own billing account for the Google Maps platform. Even if you use Google Maps for free, a billing account is mandatory. You’ll also need to associate at least one API key with a project or service when embedding Maps.

Create a Google Maps API key

Step 1: Open the Google Cloud console and choose your project.

Step 2: You can either choose an existing project for the API key or create a new one. Go to the menu icon in the top left corner and choose “APIs & Services” and then “Cre­den­tials”.

Image: Credentials under “APIs & Services”
You can create APIs by going to “Cre­den­tials” under “APIs & Services”.

Step 3: In the menu, go to “Create cre­den­tials” and then “API key”. Once the “API Key Created” window shows, you’ll see the created API key in the “My API Keys” field. You’ll also see the created key listed in the Cre­den­tials menu beneath any previous API keys. The API key can then be inserted into your code, plugin settings, or your CMS (content man­age­ment system).

Tip

Keen to learn to create API keys for ChatGPT, Steam, Open­Weath­er, or YouTube as well? Then take a look at our guides on the following topics:

Re­strict­ing API keys for Google Maps

Once you’ve created an API key, Google already points out that you should restrict the API key. By re­strict­ing it, you prevent unau­tho­rized services or people from using the key. To restrict the key, go to “Restrict key” im­me­di­ate­ly after creation. To restrict the key later, go to “Select project” in the Google Cloud console or “APIs & Services” in the menu in the top left and “Cre­den­tials”. Select the key here.

Possible re­stric­tions include:

  • Ap­pli­ca­tion re­stric­tions
  • Website re­stric­tions
  • API re­stric­tions

Using the API key for Google Maps

To use the key, copy and paste it into HTML code, plugin settings, or the CMS in the ap­pro­pri­ate place. To use a code snippet to embed Google Maps, you need to replace the “YOUR_API_KEY” section with the API key.

Go to Main Menu