Skip to content

Instantly share code, notes, and snippets.

@mbissett
Last active September 22, 2021 18:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbissett/7b45ff7fa721b7fe1dbeb3c08ab8ab5c to your computer and use it in GitHub Desktop.
Save mbissett/7b45ff7fa721b7fe1dbeb3c08ab8ab5c to your computer and use it in GitHub Desktop.

When you need to use Google's Geocoding API to provide location data for fields in your import (e.g. property location fields, listing location fields, map fields in ACF), you need to use an API key to access it.

Here is how you can get started:

FAQ

  1. There's a keyless option in your plugin, can't I use that instead?

    No. Google disabled keyless access, unfortunately (so we'll be removing this option in the future).

  2. What about restricting my key?

    If you need to restrict it, choose "IP addresses (web servers, cron jobs, etc.)". Never use "HTTP referrers (web sites)" for an API key you plan to use to access Google's Geocoding API (it doesn't support that restriction method).

  3. I created a key, but it's not working? What now?

    Call the following URL in your browser (replacing "YOURAPIKEYGOESHERE" with your API key):

    https://maps.googleapis.com/maps/api/geocode/json?address=London&key=YOURAPIKEYGOESHERE

    If you're not seeing data like this present: https://d.pr/i/7xR6zY - there's a problem with the key. Note the message & let us know what it is in your support ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment