Skip to main content

Protect your Google Maps key

Restrict the key to the Places API (New), set quota limits and create budget alerts so your bill never surprises you.

Your Google Maps key is tied to your billing. If someone used it outside Pranory, the cost would land on your account. Three settings in Google Cloud keep it under control.

1. Restrict the key to a single API

  1. In the Google Cloud console, go to APIs & Services → Credentials.
  2. Click the name of your key.
  3. Under API restrictions, select Restrict key.
  4. Choose only Places API (New).
  5. Click Save.

Even if the key leaks, it won't work for any other Google API.

2. Pick the right application restriction

On the same screen you'll see Application restrictions.

  • Don't use "Websites" (HTTP referrers). Pranory queries Google from its servers, not from your browser. With that restriction, every search would fail.
  • None always works. Together with the API restriction from step 1 and the limits below, the risk stays contained.
  • IP addresses is the strictest option. If you want it, add this IP: 217.154.97.193. If it ever changes, we will email you beforehand.

3. Set a quota limit

A quota limit stops requests once you hit a maximum number. It's your emergency brake.

  1. Go to APIs & Services → Enabled APIs & services.
  2. Open Places API (New) and go to the Quotas & System Limits tab.
  3. Find the Text Search requests quota and edit it. Depending on the account, Google shows it per minute or per day.
  4. Pick a number that suits you. To work it out, see How much Google Maps costs with Pranory.

If a search hits the limit, Pranory marks the zones it couldn't read. You can retry them later without using another search from your plan.

4. Create a budget alert

An alert doesn't stop the spend, but it emails you before it gets out of hand.

  1. Go to Billing → Budgets & alerts.
  2. Click Create budget.
  3. Scope it to the project you use for Pranory.
  4. Enter the monthly amount you're happy to spend, for example €20.
  5. Keep the alerts at 50%, 90% and 100%.

If you think your key has leaked

  1. In Credentials, create a new key with the same restrictions.
  2. In Pranory, go to Settings → Providers and replace the key with the new one.
  3. Back in Google Cloud, delete the old key.

The Google Cloud console menu paths were checked on the last-updated date. If one has changed, use the console's search bar.

Back to help