Get a Google API Key

Open Street Maps (OSM) can be used as a free alternative to Google Maps. Simply leave the Google API Key input empty and the system will use Open Street Maps.

Prerequisites

  • API Key - A Google API key is required to use Google Maps features.
  • Google Account - A Google account (which is free) is required to be able to generate an API Key.
  • Billing Account - Google now requires a credit or debit card on file for Maps to work.  You are given $200 free credit each month which will essentially mean the service is still free for the majority of users.

Step 1 - Sign in or Signup to Google

You are required to have a Google account to obtain an API key. Sign in to Google or Create an account.

Step 2 - Generate an API Key

IMPORTANT: Google maps will not work until a billing account has been created, if you do not have an active billing account please follow step 3 after this.
  1. Generate a Key - In your website's GeoDirectory Settings under GeoDirectory > Settings > General > Google Maps API KEY.  You will see a button to generate an API Key, click the button.

  2. Create a Project - You are required to create a project name, we suggest "GeoDirectory" however if you already have a project you wish to use then you can select it from the list. Once done, click NEXT.

  3. Copy & Save API Key - After you click "Next" on the last screen you will be shown your API key, you need to copy this and paste it into your GeoDirectory Settings and Save.

Step 3 - Activate Billing Account

  1. Select Project - Open this Google page and select the project you created or selected in step 2.

  2. Enable Billing - If you do not already have a billing account setup then you will be asked to create one. Click "Create Billing Account".

  3. Enter Billing Details - Follow the instructions and fill out the billing details and Submit

  4. Done - After completion, it may take up to 15 minutes before your API key will start working.

Step 4 - Restrict API Key Access

WARNING: Restricting the API key HTTP referrers will prevent our import feature that attempts to fix addresses with missing location data, if you plan to use this feature then please follow step 5.

At this point, your API key should be working on your site, the issue is that anyone could view your key and use it on their site, using up your budget.

  1. Select Project - Open your Google Console credentials page and select the project you are using for GeoDirectory.

  2. Select the Key to Edit - Click the edit icon next to the key you wish to edit.

  3. Restrict Access - Set the restriction to "HTTP referrers" and then enter any websites you wish your key to work on in the settings.

    Please note the format where * represents a wildcard.  If you enter only mywebsite.com then www.mywebsite.com will not work, so either enter both or use the wild card of *.mywebsite.com/* 

Step 5 - Geocoding API Key (optional)

When importing listing with partial location info our system will attempt to fill in the missing parts by adding either GPS or location data.  If the main API key is HTTP referrer restricted then this functionality will not work, the solution to this is to create a second private key that is unrestricted or IP restricted to your server.

  1. Select Project - Open your Google Console credentials page and select the project you are using for GeoDirectory.

  2. Create API Key - Select "Create Credentials" and then "API key".

  3. Rename - As this key may need to be unrestricted to work we suggest editing and renaming the key such as "Secret Geocode".

  4. Save - On your GeoDirectory Website visit GeoDirectory > Settings > General > (click advanced, top right) > Google Geocoding API Key. Paste the secret key into the setting and save.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us