Keys / Google Maps Platform

GOOGLE_MAPS_API_KEY

The Google Cloud API key your app calls Google Maps Platform APIs with. Google asks you to restrict it to the APIs and apps that use it.

Expires
no expiry setting
API
create and delete, with the API Keys API

Get it

Create one on console.cloud.google.com/projectselector/google/maps-apis/credentials. The steps aren't recorded yet.

Set it

GOOGLE_MAPS_API_KEY=...

No official Google SDK reads this variable; your app passes the key in. Or keep it out of .env with keypin: keypin run -- npm run dev

Replace it

  1. On the Credentials page, open the key and click Rotate key. The new key keeps the old key's restrictions. keypin rotate copies the restrictions itself, using a service account with API Keys Admin; it refuses a key bound to a service account.
  2. Deploy the new key everywhere that uses the old one. Both keys work in the meantime.
  3. Check that the old key has no more traffic, then click Delete the previous key.
Sources, checked 2026-11-16