Skip to main content

Generating a Google Places API key

Use business auto complete on our lead generation with an API key

Written by Zoe Fletcher

Bespoke lead generation is available to partners upon purchase. Please contact your Customer Success Manager to find out more. You can also check out our self-serve lead generation widget.

To use business autocomplete on your lead-generation pages, you must create a Google Cloud account and generate an API key with access to Places API (New). Legacy API like Maps will not work.

You are responsible for any costs associated with Google Places requests. See Google’s current Places API pricing for details.

If you already use other Google APIs, we strongly recommend creating a separate API key for your Insites landing page. This allows you to control its security and usage separately from your other projects and integrations.

  1. If you don’t already have an account, you’ll need to sign up for one. It is necessary to activate your account and provide billing details in order for the key to work correctly.

  2. Once you’re in the Google Cloud console, use the left hand menu to navigate to APIs & Services > Library

  3. Search for the “Places API (New)“, click on it and click “Enable“. If it already says “Manage”, you’re good to go.

  4. Now use the left hand menu to browse to APIs & Services > Credentials

  5. At the top, click on “+ Create credentials” then “API key

  6. Copy your key.

  7. Log in to your Insites account. From the account settings dashboard, go to Lead generation > General settings and scroll down to find Google Places autocomplete API key. Paste in your API key and hit “Save changes“.

  8. Back in the Google Cloud console, hit “Restrict Key”. You need to make sure a third party cannot use your API key to generate usage against your account. We recommend restricting “HTTP referrers” – in simple terms this means the key will only work on your landing page. To finish setting this up, you’ll need to add your landing page URL under “Website restrictions”.

  9. If your Google console account deals with other APIs, you may wish to restrict which services this API key can access. Under API restrictions, activate “Restrict key” and then select the required Places API.

  10. Once you’re done, hit Save. Note that changes to your API key may take up to 5 minutes to save.

We hope you found this guide useful – please let us know if you have any feedback.

Did this answer your question?