> For the complete documentation index, see [llms.txt](https://sl-guide.storeify.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sl-guide.storeify.app/google-map-api-key/generating-and-setting-api-keys.md).

# Generating and Setting API Keys

Store Locator shows your locations on a Google map, finds addresses and suggests addresses while customers type. This guide explains which Google services your key needs, how to set it up and check it in the app, and what to do when Google Maps shows a warning.

**Before you begin:** you need access to the app in your Shopify admin and a Google account that can create projects and add billing in Google Cloud.

{% hint style="info" %} <mark style="color:cyan;">**October 27, 2026 update.**</mark> The app now needs three Google APIs instead of five: **Maps JavaScript API**, **Geocoding API** and **Places API (New)**. Geolocation API and Street View Static API are no longer needed. A new **Check API key** button tests your key, address suggestions work with keys created after March 2025, directions open in Google Maps, and the optional **Google Map ID** setting was added.
{% endhint %}

### How the store locator uses your Google key

Your key is the **Google map API key** in Settings › General. Google uses it to show the map and to bill the map usage to your own Google Cloud project.

1. <mark style="color:cyan;">**Needed**</mark> - **Maps JavaScript API:** Shows the map, the location pins and Street View on location pages
2. <mark style="color:cyan;">**Needed**</mark> - **Geocoding API:** Finds the address a customer searches for, and their address when they use their location
3. <mark style="color:cyan;">**Recommended**</mark> - **Places API (New):** Suggests addresses while customers type in the search field

* **Shared key:** a new install starts with a key shared by many stores, so the map works right away. Shared keys can hit Google’s limits on busy days, so create your own key for a stable store locator.
* **Your locations’ coordinates:** when you add or edit a location with **Find coordinates from the address** turned on, the app looks up the coordinates itself. It tries your key first and falls back to its own location service, so this keeps working even if your key only allows your store’s websites.

### Set up your own key

Follow these five steps once. You can keep using the shared key until you finish.

#### Step 1

#### Create a Google Cloud project

1. Open the [Google Cloud console](https://console.cloud.google.com/) and sign in.
2. Create a project for your store, or select an existing one.

#### Step 2

#### Turn on billing

1. In the Google Cloud console, open Billing.
2. Link a billing account to the project, or create one.

Google Maps includes free monthly usage for each service and charges only for usage above it. See [Google Maps Platform pricing](https://mapsplatform.google.com/pricing/) for the current amounts.

> <mark style="color:cyan;">**Don't worry about the cost when using Google Maps service**</mark>, currently Google Map has free caps for each plan, only when you exceed these caps, you have to pay (about 10k maploads):

| **API**                        | **Free Tier/Month** | **Overage Cost (USD/1,000 requests)** | **Plan**   |
| ------------------------------ | ------------------- | ------------------------------------- | ---------- |
| **Geocoding API**              | 10,000 requests     | $5.00                                 | Essentials |
| **Geolocation API**            | 10,000 requests     | $5.00                                 | Essentials |
| **Maps JavaScript API**        | 10,000 requests     | $7.00                                 | Essentials |
| **Places API - Autocomplete**  | 10,000 requests     | $2.83                                 | Essentials |
| **Places API - Place Details** | 10,000 requests     | $5.00                                 | Essentials |
| **Places API - Nearby Search** | 5,000 requests      | $32.00                                | Pro        |
| **Street View Static API**     | 10,000 requests     | $7.00                                 | Essentials |

#### Step 3

#### Turn on the three APIs

1. Open APIs & Services › Library.
2. Search for and enable each API:
   * [Maps JavaScript API](https://console.cloud.google.com/apis/library/maps-backend.googleapis.com)
   * [Geocoding API](https://console.cloud.google.com/apis/library/geocoding-backend.googleapis.com)
   * [Places API (New)](https://console.cloud.google.com/apis/library/places.googleapis.com)

#### Step 4

#### Create the key

1. Open [APIs & Services › Credentials](https://console.cloud.google.com/apis/credentials).
2. Click Create credentials, then API key.
3. Copy the key, then limit it as described in [Limit where your key can be used](https://sl-guide.storeify.app/google-map-api-key/generating-and-setting-api-keys#limit-where-your-key-can-be-used).

#### Step 5

#### Add the key to the app and check it

1. In the app, open Settings › General.
2. Paste the key into Google map API key.
3. Click Check API key and read the result (see [Check your key](https://sl-guide.storeify.app/google-map-api-key/generating-and-setting-api-keys#check-your-key-in-the-app)).
4. Save the settings.

> <mark style="color:cyan;">**Expected result**</mark>: **Check API key** shows **This key works with the store locator**, and the map on your store locator page loads.

<figure><img src="https://2181aa48-a86c-4875-a254-f39dcba6bb0d.frame.claudeusercontent.com/_f/1793076404-6794/img/maps-key-check-success.png" alt="Settings › General with the Google map API key field, the Check API key button and a successful result listing Maps JavaScript API, Geocoding API and Address suggestions as Works"><figcaption><p>A successful check: the map, address search and address suggestions all work with this key.</p></figcaption></figure>

### Limit where your key can be used

Your key is visible in your store’s pages, so limit it to your own websites. Otherwise anyone could use it on their site and you would pay for it.

1. Open [APIs & Services › Credentials](https://console.cloud.google.com/apis/credentials) and click your key.
2. Under Application restrictions, choose Websites.
3. Add one line for each address your store uses:
   * your Shopify address, for example `https://your-store.myshopify.com/*`
   * each of your own domains, including every market or language domain, for example `https://www.your-store.com/*`
   * `https://sl.storeify.app/*`. This lets the app’s pages use your key: the map preview when you add or edit a location, the Analytics map and **Check API key**.
4. Optional: under API restrictions, choose Restrict key and select **Maps JavaScript API**, **Geocoding API** and **Places API (New)**. If your key also uses the older **Places API**, select it too.
5. Save. Changes can take a few minutes to apply.

{% hint style="info" %} <mark style="color:yellow;">**Left out sl.storeify.app?**</mark> Your store locator still works on your store, but **Check API key** shows **This key can’t be checked from here** and map previews inside the app don’t load.
{% endhint %}

### Check your key in the app

**Check API key** (in Settings › General, under the key) loads Google Maps with the key in the field and tries the map, the address search and the address suggestions. It checks the key you typed, even before you save.

| Result                                                                                             | What it means                                               | What to do                                                                                                    |
| -------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| This key works with the store locator                                                              | Map, address search and address suggestions all work        | Nothing                                                                                                       |
| This key works with the store locator, and *Address suggestions* says it uses the older Places API | Everything works. Suggestions use Google’s older Places API | Turn on **Places API (New)** when you can (Google is phasing out the older one)                               |
| Some features need another API turned on                                                           | The map works, but address search or suggestions don’t      | Click the link next to each **Not working** line and enable that API                                          |
| The map can’t load with this key                                                                   | Google refused the key. The reason is shown on the line     | Follow the link: check the key in **Credentials**, enable **Maps JavaScript API**, or **Enable billing**      |
| This key can’t be checked from here                                                                | The key only allows your store’s websites                   | Add `https://sl.storeify.app/*` to the key’s websites, or ignore it if your store locator works on your store |
| Google Maps didn’t answer                                                                          | No reply within 30 seconds                                  | Check your connection and the key, then try again                                                             |

If the field still holds the shared key, the result ends with a reminder to create your own key.

### Address suggestions on your store

While a customer types an address in the store locator’s search field, a list of matching addresses appears under the field. Choosing one fills the field and searches for nearby locations, the same as pressing **Search**.

* The suggestions use **Places API (New)**. If your key doesn’t have it but has the older **Places API**, the app uses that one automatically.
* If your key has neither, customers don’t see suggestions, but searching still works: they type the address and press Enter or **Search**.
* If you pick a country in **Priority search in** (in Settings), suggestions are limited to that country too.
* The list shows “Powered by Google”, as Google requires.

### Directions

Directions open Google Maps in a new tab, with your location as the destination. On location pages that let customers enter a starting point and travel mode, both are passed to Google Maps. Directions don’t use your API key, so they work whichever APIs you turned on.

### Map style and Google Map ID

You can style the map in two ways.

| Setting                  | Where                 | What it does                                                                                         | Default  |
| ------------------------ | --------------------- | ---------------------------------------------------------------------------------------------------- | -------- |
| Map style                | Settings › Appearance | Picks one of the app’s map designs (colors of roads, water, land…)                                   | Standard |
| Google Map ID (optional) | Settings › General    | Uses a map you design in Google Cloud console (**Map management**), and Google’s newer location pins | Empty    |

* Leave **Google Map ID (optional)** empty to use **Map style**. This is what most stores need.
* With a Google Map ID, the map takes its design from Google Cloud and **Map style** is not used. Google doesn’t allow both on the same map.
* The Map ID must come from the same Google Cloud project as your key. It can only contain letters, numbers, hyphens and underscores.

### If your key was set up before this update

Older guides asked for five APIs, including **Places API** (the older one). Your key keeps working as it is.

1. Keep **Maps JavaScript API** and **Geocoding API** on.
2. Turn on [Places API (New)](https://console.cloud.google.com/apis/library/places.googleapis.com). Google no longer offers the older **Places API** to projects created after March 2025, and suggests moving to the new one.
3. You can turn off **Geolocation API** and **Street View Static API**: the app doesn’t use them. Street View on location pages comes from **Maps JavaScript API**.
4. Click **Check API key** to confirm.

### Troubleshooting

| Problem or message                                                                                     | What to check                                                                                                                                                                                                                                                                                     |
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| The map is grey or says “This page can’t load Google Maps correctly”                                   | Click **Check API key**. Check that billing is on, **Maps JavaScript API** is enabled, and your store’s domains are in the key’s websites ([Limit where your key can be used](https://sl-guide.storeify.app/google-map-api-key/generating-and-setting-api-keys#limit-where-your-key-can-be-used)) |
| No address suggestions while typing                                                                    | Click **Check API key**; turn on **Places API (New)**. Suggestions start from the second character                                                                                                                                                                                                |
| A search says the address isn’t found                                                                  | Turn on **Geocoding API**. Try a fuller address (street, city, country)                                                                                                                                                                                                                           |
| “You’re calling a legacy API, which is not enabled for your project”                                   | Your key’s project doesn’t have the older Places API. Turn on **Places API (New)**, which the app uses first                                                                                                                                                                                      |
| “As of March 1st, 2025, google.maps.places.Autocomplete / SearchBox is not available to new customers” | Shown by older versions of the app. The current version no longer uses them. Refresh the page; if it still appears, contact us                                                                                                                                                                    |
| “A Map’s custom map types cannot be set when a mapId is present”                                       | Shown by older versions of the app. If you set a **Google Map ID (optional)**, the map style comes from Google Cloud instead of **Map style**                                                                                                                                                     |
| “Google Maps JavaScript API has been loaded directly without loading=async”                            | Your store pages no longer show it. It can still appear in the app’s own pages; it only concerns loading speed and needs no action                                                                                                                                                                |
| “google.maps.Marker is deprecated”                                                                     | Information only. Google still supports these pins. With a **Google Map ID (optional)**, the newer pins are used                                                                                                                                                                                  |
| `RefererNotAllowedMapError`                                                                            | Add the domain shown in the message to the key’s websites                                                                                                                                                                                                                                         |
| `ApiNotActivatedMapError`                                                                              | Turn on **Maps JavaScript API**                                                                                                                                                                                                                                                                   |
| `InvalidKeyMapError`                                                                                   | The key is wrong or was deleted. Copy it again from **Credentials**                                                                                                                                                                                                                               |
| `BillingNotEnabledMapError`                                                                            | Link a billing account to the key’s project                                                                                                                                                                                                                                                       |
| The map works on one domain but not on another                                                         | Add every domain your store uses, including market and language domains, to the key’s websites                                                                                                                                                                                                    |
| Map style has no effect                                                                                | Clear **Google Map ID (optional)**, save, and refresh your store locator page                                                                                                                                                                                                                     |

{% hint style="info" %} <mark style="color:cyan;">**Contacting us?**</mark> Include your store’s address, the page where the problem happens, and a screenshot of the **Check API key** result and of the browser console message.
{% endhint %}

### Frequently asked questions

<details>

<summary>Do I have to create my own key?</summary>

No, a shared key works when you install the app. Your own key is recommended: the shared key is used by many stores and can reach Google’s limits.

</details>

<details>

<summary>Will I pay for Google Maps?</summary>

Google includes free monthly usage for each service and charges only above it. Billing must be on for the key to work. See [Google Maps Platform pricing](https://mapsplatform.google.com/pricing/).

</details>

<details>

<summary>My key was created years ago. Do I need a new one?</summary>

No. Turn on **Places API (New)** for the same key (see [If your key was set up before this update](https://2181aa48-a86c-4875-a254-f39dcba6bb0d.frame.claudeusercontent.com/_f/1793076404-6794/?__frame_v=manifest.1aa66d859f2afdd4.json#older-keys)) and click **Check API key**.

</details>

<details>

<summary>Why does Check API key say the key can’t be checked?</summary>

Your key only allows your store’s websites, and the check runs on the app’s website. Add `https://sl.storeify.app/*` to the key, or check the map on your store directly.

</details>

<details>

<summary>Do directions cost anything?</summary>

No. Directions open Google Maps and don’t use your key.

</details>

### Checklist

* [ ] Billing is on for the Google Cloud project.
* [ ] **Maps JavaScript API**, **Geocoding API** and **Places API (New)** are enabled.
* [ ] The key is limited to your store’s domains and `https://sl.storeify.app/*`.
* [ ] The key is in **Settings › General › Google map API key** and saved.
* [ ] **Check API key** shows **This key works with the store locator**.
* [ ] On your store, the map loads, typing an address shows suggestions, and a search finds nearby locations.

Need help? Use **contact us now** at the bottom of any page in the app and include the details listed under [Troubleshooting](https://sl-guide.storeify.app/google-map-api-key/generating-and-setting-api-keys#troubleshooting).

You can follow the instruction in the video below:

{% embed url="<https://youtu.be/O-o8xSacFPY>" %}
