Get Google map Api key

1. Set Up Your Project and Billing

    1. Go to the Google Cloud Console Credentials Page.
    2. Click the project dropdown at the top and select New Project.
    3. Name your project and click Create.
    4. Open the navigation menu (hamburger icon) and select Billing.
    5. Link an existing billing profile or create a new one. Note: Google requires a card on file, but they provide a recurring free monthly usage credit.

2. Enable the Google Maps APIs

    1. Open the navigation menu and click on APIs & Services > Library.
    2. Search for the specific service you need (for example: Maps JavaScript API, Geocoding API, or Places API, Direction Api).
    3. Click on the API from the search results and select Enable. 

3. Generate Your API Key

    1. Go back to APIs & Services and select Credentials.
    2. Click the + Create Credentials button at the top.
    3. Choose API key from the dropdown options.
    4. Your new alphanumeric string will generate instantly. Copy it to your clipboard. 

4. Secure and Restrict Your Key (Highly Recommended)

Unrestricted keys can be stolen and used by third parties, causing unexpected charges on your account. 
  1. On the same credentials screen, click Restrict Key next to your new key.
  2. Under Application restrictions, choose how to lock the key (e.g., HTTP referrers for web domains or IP addresses for servers).
  3. Under API restrictions, select Restrict key and check only the specific Maps APIs you enabled earlier.
  4. Click Save