How to Get Google Maps JavaScript API Key

The Google Maps JavaScript API provides the easiest way to embed a Google Map on the web page. You can display Google Map and mark the location on it using Google Maps JavaScript API. An API key is required to load and use Google Maps JavaScript API library. Google Maps API Key can be created from Google Developers Console. In this tutorial, we will provide a step-by-step guide to generate an API key on Google Developer Console and get an API key for Google Maps JavaScript API.

  • Log in to your Google account and go to the Google API Console.
  • Click on Project at the top left corner » A dialog window will appear, click the NEW PROJECT link.
    google-developer-console-api-key-project-create-codexworld
  • Enter the Project name and click on Create. It will take some seconds for creating a new project, please wait.
    google-developer-console-create-new-project-codexworld
  • Click the Library link on the left navigation menu and navigate to the API Library page. Select the Maps JavaScript API library.
    google-maps-javascript-api-library-codexworld
  • Click ENABLE to use Google Maps JavaScript API.
    google-maps-javascript-api-library-enable-codexworld
  • Click on Credentials on the left navigation menu. On the Credentials page, click Create credentials » API key.
    google-maps-javascript-create-api-credentials-codexworld
  • A dialog box will appear with your newly created API Key. Use this API key with Google Maps JavaScript API.
    generate-google-maps-javascript-api-key-codexworld

API Key need to be specified in key parameter.

<script src="https://maps.googleapis.com/maps/api/js?key=Your_API_KEY"></script>

Do you want to get implementation help, or enhance the functionality of this script? Click here to Submit Service Request

2 Comments

  1. Shayena Khan Said...
  2. Ankit Singh Said...

Leave a reply

keyboard_double_arrow_up