The Marketer's Toolkit Support Center
All Categories GHL Customizer Features Google Address Autocomplete API Key

Google Address Autocomplete API Key

Creating a Google Maps API Key for Forms, Surveys & Inside of the Contacts Area

By Tom Bristol
May 24, 2024

You can add Google Address Autocomplete functionality in several places:

GHL Customizer Feature - Add Auto Complete to the Contacts Page

To add autocomplete on the Contacts Page inside of Go High Level, create your Google Maps API key following the instructions below and place it inside of the Customizer Features option: Address Auto Complete.

image.png

Creating a Google Maps API key

To create a Google Maps API key:

  1. Create or sign in to your Google account and then go to Google Cloud.

  2. Select the projects dropdown in the top toolbar to create a new project or select an existing project.

    add-new-project-8e1c8afa-6b38-441f-9e30-87d8f2583369-ed52297-1122x232.png

  3. Open the menu in the top left and select Billing. Follow the steps to set up billing information for your account. If this is your first time setting up billing and creating a key, a series of modals will appear, introducing you to the product and generating an API key for you. You may close these modals as we will walk through the individual setup steps later.

    billing-04d3d789-9ec1-446d-9ac7-3cf5974f4d0b-040f0ec-399x341.png

  4. Open the menu and go to Google Maps Platform > APIs & Services.

    apis-1ccf0cd6-ab58-42c1-ab11-f5b29634b944-8deecd1-424x355.png

  5. Find and enable Maps JavaScript API, Places API, and Places API (New).

    enable-maps-api-1059f566-49b8-40a4-aa76-e1f14c75cf3a-b44feed-1128x636.png

  6. Open the menu and go to APIs & Services > Credentials.

    credentials-9bd7c895-78f0-4a66-ac02-d30fc79a4803-c7c0784-476x422.png

  7. Select + CREATE CREDENTIALS > API key. If an API key was generated for you after billing was set up, you may ignore this step and continue with the key that was created for you.

    api-key-credentials-285315bf-e858-4a4a-b1c0-177258fbb758-090121d-875x214.png

  8. To rename your key, select the key name from the list to open the key settings. Make sure to click Save when you’re done!

    api-key-list-f77075a6-59e8-4a79-8ce1-6b8bef1e9b18-1631d37-873x128.png

Setting key security

To set key security in the Google Maps platform:

If your key is not locked down to just the websites or apps you want it used on, it can lead to unexpected expenses if someone grabs your key and uses it on their own app. In order to use the Google API, they do require that you put a credit card in.

IMPORTANT: There are two ways of locking it down.

a) You can lock it down by restricting access to certain sites or apps.

b) You an lock it down by just capping the usage so you won't be charged unexpectedly.

Personally I prefer (b) because if you are using this on client sites, you don't want to be updating your API key each time you add a new site.

That being said, if you are only using this on your GHL app, then I would suggest a combo of Restricting Access to Certain Apps & setting a Usage Limit

A) Restricting Access to Certain Apps or Sites

  1. Open the menu and go to APIs & Services > Credentials.

    credentials-9bd7c895-78f0-4a66-ac02-d30fc79a4803-c7c0784-476x422.png

  2. Select your API key from the list.

    `.png

  3. Under Set an application restriction, select Websites.

  4. Under Website restrictions, select + ADD and enter your white label information - for instance https://app.gohighlevel.com/*. AND https://app.yourappname.com/* Please note that this URL is case-sensitive and must match your app name.

  5. Be sure to add any domains where your form is embedded as well. If you are using this for clients websites you'll need to updates this as you go along.

    image.png

  6. Under API restrictions, select Restrict key.

  7. In the dropdown, check Maps JavaScript API, Places API, and Places API (New) on the dropdown and click Save.

    api-restrictions-1544e3ba-5935-4878-ac2e-a9d0ac799ece-ef3769b-461x423.png

B) Restricting it with a Daily Usage Limit

The Google Maps API currently gives you a $200 credit each month. Scroll on this page to see a calculator to estimate your costs. Google Maps Platform Pricing

To set a usage quota in the Google Maps platform:

  1. Open the menu and go to Google Maps Platform > Quotas.

    quotas-62f98d79-a6b0-4330-96bd-1f65717975ad-c919fe2-439x369.png

  2. Use the dropdown in the top toolbar to select Places API.

    places-api-579e094e-0553-4d75-842b-08e46bb3a7ef-646b219-698x417.png

  3. Expand the “Requests” section and find the quota table at the bottom.

  4. Click the pencil icon to edit Requests per day and enter your usage quota. Refer to the Places section in the Google Maps Platform Pricing for more information about monthly usage costs.

    edit-quota-limit-590185a1-9805-4b68-bb30-e19fdbd81e30-6454b40-409x439.png

Enabling budget alerts

To enable budget alerts in the Google Maps platform:

  1. Open the menu and go to Billing.

    billing-menu-e9ffcde1-9884-4ee5-9f54-fa1b08756fd9-23342ce-373x301.png

  2. Select your billing account and go to Budgets & alerts.

    budgets-alerts-5d989d6c-5964-4dae-b8c5-234a2a4db341-165b419-258x438.png

  3. Select + CREATE BUDGET from the top toolbar.

  4. Name the budget and set the time range to Monthly.

  5. Select your project name and All services and click Next.

    budget-settings-753d5d85-2315-4e9f-a956-3f341f0747dc-44bf279-447x758.png

  6. Set Budget type to Specified amount and set Target amount to $0.

    set-budget-amount-93448b8e-c908-4801-b517-6f7273a95ad2-8711f4b-448x443.png

  7. Click Finish. You will receive an email if you exceed the limit.

Was this article helpful?

Thanks for your feedback!