1. Go to this address: https://console.developers.google.com/apis
  2. Create new project and Create Credentials (API key)
  3. Click on "Library"
  4. Click on any API that you want
  5. Click on "Enable"
  6. Click on "Credentials" > "Edit Key"
  7. Under "Application restrictions", select "HTTP referrers (web sites)"
  8. Under "Website restrictions", Click on "ADD AN ITEM"
  9. Type your website address (or "localhost", "127.0.0.1", "localhost:port" etc for local tests) in the text field and press ENTER to add it to the list
  10. SAVE and Use your key in your project
Answer from Sajad Mirzaei on Stack Overflow
🌐
Google
developers.google.com › google maps platform › web › maps javascript api › set up the maps javascript api
Set up the Maps JavaScript API | Google for Developers
To create an API key, navigate to the Google Maps Platform Credentials page and select \"Create credentials \\\u003e API key.\" Restricting API keys to specific applications and APIs is strongly recommended for security and to prevent financial ...
🌐
Reddit
reddit.com › r/webdevbuddies › why google requires an api key to embed maps?
r/WebDevBuddies on Reddit: Why Google requires an API key to embed Maps?
February 19, 2022 -

https://developers.google.com/maps/documentation/embed/embedding-map

Why does it make sense for Google to require an API key to embed their Maps web application via iFrame in another website (some-site.com)?

  • The API key can be copied and used by anyone who visits the website (some-site.com)

  • Google is anyway expecting the Referrer some-site.com in the request and I expect they track the usage looking at the referrer

What am I missing? Why do they require an API key?

I'm here to learn.

Discussions

google maps - Googlemaps API Key for Localhost - Stack Overflow
How do I get Google Maps API key to work on localhost? I've created an API key and under referrers I add the following: Accept requests from these HTTP referrers (websites) (Optional) Use asterisk... More on stackoverflow.com
🌐 stackoverflow.com
Where the heck is the map key hidden for Google Maps?!??? I have searched in vain for it. - Google Maps Community
Google Maps Help · Sign in · Google Help · Help Center · Community · Google Maps · Privacy Policy · Terms of Service · Submit feedback · Send feedback on... This help content & information · General Help Center experience · Next · Help Center · Community · Google Maps · More on support.google.com
🌐 support.google.com
September 1, 2019
How to secure google map api key
you should restrict it to your application so no one can use it outside your app https://developers.google.com/maps/documentation/android-sdk/get-api-key#restrict_key More on reddit.com
🌐 r/androiddev
15
13
October 16, 2024
How to get an API Key for Google Maps - iKeyMonitor Guide - Guides - iKeyMonitor Community
If you notice that some coordinates in your Cloud Panel aren’t being converted into locations, you can resolve this by adding a Google Maps API key. Google provides a free monthly quota for each key, which is generally sufficient for personal use in the Cloud Panel. More on community.ikeymonitor.com
🌐 community.ikeymonitor.com
0
July 10, 2024
🌐
GitHub
gist.github.com › RyanOkamuro › 3829cde1b7db51a739c7ca5f11055c54
Google Maps API Key · GitHub
Regarding your error, you loaded the api key using http://, but the correct one is https://, for SSL. Thanks, @Antoh3! ... Error fetching location: {'error': {'code': 403, 'message': 'Geolocation API has not been used in project 778648361568 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/geolocation.googleapis.com/overview?project=778648361568 then retry.
🌐
Google
developers.google.com › google maps platform › web › maps embed api › set up the maps embed api
Set up the Maps Embed API | Google for Developers
To create one, go to the Google Maps Platform Credentials page and select \"Create credentials\" then \"API key.\" Restrict your key via the Credentials page, selecting \"HTTP referrers\" for application restrictions and choosing specific APIs ...
Find elsewhere
🌐
Yoast
yoast.com › home › help center › wordpress › yoast local seo › how to generate and set a google maps api key
How to generate and set a Google Maps API key • Yoast
February 17, 2025 - Copy the API key and click Close You can also find the API key under Credentials. ... It’s recommended to secure your Google Maps API key against quota theft.
🌐
Google
mapstyle.withgoogle.com
Styling Wizard: Google Maps APIs
The effect of the following stylers will change whenever Google updates the base map style. Use with caution. Saturation · Invert lightness · Lightness · Gamma · Hue · [[ heading ]] [[ item.name ]] [[ item.description ]] [[ item.name ]] [[ item.description ]] [[ item.name ]] [[ item.description ]] Copy and paste this JSON into your app or website code · Copy JSON · [[tooltipText]] key=YOUR_API_KEY& Copy Static Map URL ·
🌐
Google Maps Platform
mapsplatform.google.com › pricing
Google Maps Platform Pricing - Subscriptions and Pay as you go
Offering subscription plans of our most popular APIs or Pay as you go where you can mix and match across 3 API and SDK product categories.
🌐
Google
earth.google.com › web
Google Earth
Aw snap! Google Earth isn't supported on your device. Please try Google Earth on a supported device or your desktop browser
🌐
Crocoblock
crocoblock.com › home › articles › how to create google maps api key
How to Embed Google Maps on Your Site — JetElements | Crocoblock
August 13, 2025 - API keys are the credentials that identify the project to which the application is making a call. Google Maps API key is used to access Google Maps.
🌐
Google Support
support.google.com › maps › thread › 13328713 › where-the-heck-is-the-map-key-hidden-for-google-maps-i-have-searched-in-vain-for-it
Where the heck is the map key hidden for Google Maps?!??? I have searched in vain for it. - Google Maps Community
September 1, 2019 - Google Maps Help · Sign in · Google Help · Help Center · Community · Google Maps · Privacy Policy · Terms of Service · Submit feedback · Send feedback on... This help content & information · General Help Center experience · Next · Help Center · Community · Google Maps ·
🌐
WP Store Locator
wpstorelocator.co › document › create google api keys
Create Google API Keys - WP Store Locator
March 25, 2025 - This happens when the map is loaded in the admin area or on the store locator page itself on the front-end. The server key is used when a request is made to the Google Maps Geocoding API to convert an address into a set of coordinates.
🌐
Reddit
reddit.com › r/androiddev › how to secure google map api key
r/androiddev on Reddit: How to secure google map api key
October 16, 2024 -

As far as i ve checked, the api key should be in android manifest which will be used by the MapView that we are using in the app. But the problem is if i decompile my app, i can see my api key in the manifest.

I even checked the apk (cloned the repo found in android documentation website itself which has the example on implementing maps in project), its the same.

How to secure it? I saw that we can use google console and we can restrict the use of api, but still the api should be set in manifest and still it can be decompiled and misused. How to solve this?

🌐
Google Maps
google.com › maps › about
About – Google Maps
Discover the world with Google Maps. Experience Street View, 3D Mapping, turn-by-turn directions, indoor maps and more across your devices.
🌐
Ikeymonitor
community.ikeymonitor.com › guides
How to get an API Key for Google Maps - iKeyMonitor Guide - Guides - iKeyMonitor Community
If you notice that some coordinates in your Cloud Panel aren’t being converted into locations, you can resolve this by adding a Google Maps API key. Google provides a free monthly quota for each key, which is generally s…
Published   July 10, 2024
🌐
Google Groups
groups.google.com › g › google-visualization-api › c › 3phZHpMR28w
Map Key API for local development
So for example, if you're virtual host is at http://MyVirtualHostName, then you can register a key for that through google's key registration service, and it will work. Note that if you're not using serving the page and just want to look at a local page directly in the browser (e.g.
🌐
Google
developers.google.com › google maps platform › android › maps sdk for android › set up the maps sdk for android
Set up the Maps SDK for Android | Google for Developers
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-12-18 UTC."],[],["To use the Maps SDK, you need an API key, created via the Google Cloud Console or Cloud SDK.
🌐
Google Support
support.google.com › maps › thread › 11263007 › how-to-determine-which-google-account-created-an-api-key
How to determine which Google account created an API key? - Google Maps Community
August 4, 2019 - Google Maps Help · Sign in · Google Help · Help Center · Community · Google Maps · Privacy Policy · Terms of Service · Submit feedback · Send feedback on... This help content & information · General Help Center experience · Next · Help Center · Community · Google Maps ·