Is your public Google Maps key also a Gemini key?
Updated Nov 19, 2026
Short answer: maybe. If a Google Cloud project has the Gemini API turned on, an unrestricted key from that project, including the one pasted into your website for Maps, could call Gemini too.
MapIron: static maps and geocoding you can keep, at a flat monthly price that never bills overage.
Get a free keyWhat happened
Google has long told developers that Maps keys are billing identifiers that are fine to put in web pages. On February 25, 2026, Truffle Security published research showing that the same kind of key also authenticates to the Gemini API when Gemini is enabled in the project, and that it had found 2,863 live keys like this in public web pages. Google restricted those keys from Gemini and said it would block leaked keys and make keys created in AI Studio Gemini-only by default.
The risk is money as well as data: in March 2026 The Register reported a developer facing an $82,000+ Gemini bill after an unknown party used their key.
Check your keys in five minutes
- In the Google Cloud console, open APIs & Services → Credentials. Every key used in a browser should have API restrictions (only the Maps APIs it calls) and application restrictions (your sites or apps).
- Open APIs & Services → Enabled APIs in each project that holds a public key. If the Generative Language API is on and you don't need it there, turn it off, or move Gemini work to a separate project with its own keys.
- Set quotas per API per day. Budget alerts email you; quotas stop the requests.
- Scan your own code and history for keys with an open-source scanner such as TruffleHog or Gitleaks, and rotate anything that was ever public. Don't paste keys into websites that offer to check them.
Why caps matter more now
One key now often reaches several paid products, and AI agents call APIs in loops. A per-request bill with no ceiling turns a leaked key or a runaway script into an invoice. That's the reason every MapIron plan stops at a hard monthly cap instead of billing overage.
How MapIron keys work
- A key reaches MapIron's map, geocoding and routing APIs only.
- Each account has a hard monthly cap per product; past it, requests get HTTP 429 and nothing is billed.
- Lock a key to your websites, and revoke and replace it from the dashboard at any time.
- Platform plans can give each client site its own key with its own cap through the keys API.
See also bill rescue and the map API bill calculator.
Sources
Read on Nov 19, 2026. Prices and terms change, so follow the links before deciding.
- Truffle Security: Google API keys weren't secrets, but then Gemini changed the rules (Feb 25, 2026) (opens in a new tab)
- CSO Online: 'Silent' Google API key change exposed Gemini AI data (Feb 27, 2026) (opens in a new tab)
- The Hacker News: thousands of public Google Cloud API keys (Feb 2026) (opens in a new tab)
- The Register: Dev stunned by $82K Gemini bill after unknown API key thief goes to town (Mar 3, 2026) (opens in a new tab)
- Google Maps Platform: API security best practices (opens in a new tab)
- TruffleHog (open-source secret scanner) (opens in a new tab)
- Gitleaks (open-source secret scanner) (opens in a new tab)
Questions
Can a Google Maps API key access Gemini?
It could, if the key had no API restrictions and the Gemini API (Generative Language API) was enabled in the same Google Cloud project. Truffle Security reported 2,863 live keys like this on public web pages in February 2026.
Did Google fix it?
Google restricted the 2,863 reported keys from the Gemini API and said it would block leaked keys it detects and default AI Studio keys to Gemini-only access. Check your own keys anyway: restrictions you set yourself are what protect you.
Do HTTP referrer restrictions protect my key?
They help against other websites embedding your key, but a request from a script or server can send any referrer header it likes. Restrict which APIs a key may call, too.
How are MapIron keys different?
A MapIron key only reaches MapIron's map, geocoding and routing APIs; there is no AI model behind it. Every account has a hard monthly cap, so a leaked key can't run up a bill, and you can lock a key to your websites or revoke it from the dashboard.
A map API with a ceiling
Free key in under a minute, no card. Hard monthly caps on every plan.
More from Learn.