create a google api key

Google Maps Platform API keys for WordPress Sites

A Google Maps API key is a simple step you can take to modernize your website while creating a better user experience. The API key allows you to display custom maps on your website — highlight your location, multiple locations, areas you serve or any other geographical location you want to show your visitors. It’s also a way to let website visitors know just how close they are to your location or service areas.

Creating an API Key isn’t as complicated as it can seem. It takes just a few steps to make a big impact on your user experience. In this blog, we will cover how to:

The good news is that Google provides a tool to automatically generate an API key for WordPress sites. If you’re using another platform, skip to the section on manually creating an API key.


Generate a Google Maps Platform API key for WordPress Sites

The simplest way to get your API Key without using a plugin is through the Google Maps Platform. As a standard user, you will be able to visit the Google Maps Platform and have your key automatically set up by following the prompts.

After you sign in, click the “Create a new project and generate an API Key” button:

create a google api key

Choose a project name (examples: location name, company name, website name, subdomain, etc.) and click Next. Project names must be between 4 and 30 characters and may only contain letters, numbers, spaces, and hyphens. Then copy the API Key generated by Google.

To improve your app’s security, restrict this key’s usage in the API Console by clicking the link:

  • Under “Application restrictions”, choose “HTTP referrers (web sites)”
  • Under “Website restrictions”, select “ADD AN ITEM” by replacing yourdomain.com with your domain name: *yourdomain.com/*
  • Choose “Restrict key”, then choose all four:
    • Google Maps JavaScript API
    • Google Maps Geocoding API
    • Google Places API
    • Google Maps Directions API
  • Click “Save”

create a google api key


Create a Google Maps Platform API key manually

If you are unable to use the automatic project setup provided by the Google Maps Platform, you can still get a key manually. After navigating to the Google Maps Platform, click the “Get started” button.

You will be required to create a new account, verify your identity, verify a recovery phone number or email, add your payment information and click “START MY FREE TRIAL”.

Keep in mind that Google gives you a $300 credit free trial. After the trial is over, you will get 28,000 requests per month and 40,000 direction calls each month before being billed. These are high quotas to meet and atypical for a small business/startup, and Google does not bill until you exceed the $200 per month credit limit.

After answering some questions, Google creates a demo Project and API key. You can edit this project or create a new one.

From your project dashboard, enable these four API types:

  • Google Maps JavaScript API
  • Google Maps Geocoding API
  • Google Places API
  • Google Maps Directions API

Choose one and click “Enable”.

create a google api key

Once enabled, you will land on the APIs page. Choose the others from the Additional APIs list and enable each one.

When you are done, choose Credentials from the side menu. You can edit the demo API key by clicking the pencil icon under “Actions”, or you can click “CREATE CREDENTIALS” at the top of the screen.

create a google api key

If you are creating a new API key, copy the new API key and then choose “RESTRICT KEY.” If you choose to edit the existing key, you will be taken to the same Restrict Key page. Select the following:

  • Under “Application restrictions”, choose “HTTP referrers (web sites)”
  • Under “Website restrictions”, select “ADD AN ITEM” by replacing yourdomain.com with your domain name: *yourdomain.com/*
  • Choose “Restrict key”, then choose all four:
    • Google Maps JavaScript API
    • Google Maps Geocoding API
    • Google Places API
    • Google Maps Directions API
  • Click “Save”

This is just one step you can take toward creating a better user experience on your website. Let us help you create a more user-friendly, well-designed, search engine optimized website. Contact us today.

api, google maps, wordpress

Leave a Reply

Your email address will not be published. Required fields are marked *