New pricing changes will go into effect starting July 16, 2018. For more information, check out the Guide for Existing Users.

Get API Key

To use the Maps Embed API, you must register your app project on the Google Cloud Platform Console and get a Google API key which you can add to your app or website.

Quick guide to getting a key

Step 1: Get an API Key from the Google Cloud Platform Console

Click the button below, which guides you through the process of registering a project in the Google Cloud Platform Console, and generates an API key.

Get Started

Notes:

  • Tip: During development and testing, you can register a project in the Google Cloud Platform Console and use a generic, unrestricted API key. Before moving your app or website into production, you should secure your API key by adding browser restrictions to the key. Read more about restricting an API key.
  • For more information, see the detailed guide to getting an API key.

Step 2: Add the API key to your application

When loading the Maps Embed API, substitute YOUR_API_KEY in the code below with the API key you got from the previous step.

https://www.google.com/maps/embed/v1/MODE?key=YOUR_API_KEY&parameters

For more information on MODE and parameters options for the code above, read the guide to forming the URL for the Maps Embed API.

More about API keys

  • The API key allows you to monitor your application's API usage in the Google Cloud Platform Console. See Google Cloud Platform Console help for more information.
  • Registering for an API key ensures that Google can contact you about your application if necessary.

Detailed guide to getting an API key

Follow these steps to get an API key:

  1. Go to the Google Cloud Platform Console.
  2. Create or select a project.
  3. Click Continue to enable the API.
  4. On the Credentials page, get an API key.
    Note: If you have an existing unrestricted API key, or a key with browser restrictions, you may use that key.
  5. From the dialog displaying the API key, select Restrict key to set a browser restriction on the API key.
  6. In the Key restriction section, select HTTP referrers (web sites), then follow the on-screen instructions to set referrers, then click Save. Read more about restricting API keys.


In the Google Cloud Platform Console, you can also look up an existing key or view a list of enabled APIs.

For more information on using the Google Cloud Platform Console, see API Console Help.

Restricting an API key

Google Maps Platform APIs are available for web browsers, Android or iOS apps, and via HTTP web services. APIs in any platform can use a generic (unrestricted) API key. You can optionally add a restriction (for example, HTTP referrer) to the API key. Once restricted, a key will only work on platforms that support that type of restriction.

Tip: Before moving your app or website to production, you should secure your API key. Keys for the Maps Embed API use the HTTP referrers (web sites) key restriction. Learn more about keys and credentials.

To add web browser restrictions to an existing, generic API key, do the following:

  1. Go to the Credentials page of the Google Cloud Platform Console.
  2. Select the project that contains the API key you want to edit.
  3. On the Credentials page, from the list of API keys, select the name of the API key to edit the details of the key.
  4. In the Key restriction section of the page, select HTTP referrers (web sites), follow the on-screen instructions to set referrers, then click Save.

Send feedback about...

Maps Embed API
Maps Embed API
Need help? Visit our support page.