Google Map API free
This guide shows how to create, restrict, and use your API Key for your Cloud project. Show Before you beginBefore you start using the Maps Embed API, you need a project with a billing account and the Maps Embed API enabled. To learn more, see Set up in Cloud Console. Creating API keysThe API key is a unique identifier that authenticates requests associated with your project for usage and billing purposes. You must have at least one API key associated with your project. To create an API key: Console
Cloud SDKgcloud alpha services api-keys create \ --project "PROJECT" \ --display-name "DISPLAY_NAME"Read more about the Google Cloud SDK , Cloud SDK installation , and the following commands:
Restricting API keysRestricting API keys adds security to your application by ensuring only authorized requests are made with your API key. We strongly recommend that you follow the instructions to set restrictions for your API keys. For more information, see API security best practices. To restrict an API key: Console
Cloud SDKList existing keys. gcloud services api-keys list --project="PROJECT"Clear existing restrictions on existing key. gcloud alpha services api-keys update "projects/PROJECT/keys/KEY_ID" \ --clear-restrictionsSet new restrictions on existing key. Read more about the Google Cloud SDK , Cloud SDK installation , and the following commands:
Adding the API key to your requestYou must include an API key with every Maps Embed API request. In the following example, replace YOUR_API_KEY with your API key. https://www.google.com/maps/embed/v1/MAP_MODE?key=YOUR_API_KEY¶metersFor more information about MAP_MODE and parameters options in the code above, see Embedding a map. Others also read:
|