How to Create a Google API Key for your Club Directory / County TV
If you want to put a map on your club directory or display your YouTube videos on County TV, you have to “create an API key.” Think of it like a special digital key that Google gives you so your website can talk to their services. Here’s a step-by-step tutorial on how to do this:
Quicklinks
- TLDR
- Overview
- Create a Google Cloud Platform Account
- Set Up a New Project
- Enable APIs
- Create API Key
- Restrict API Key (Optional but Recommended)
- Monitoring your usage
- Set a Billing Cap (Optional but Recommended)
- C&C Set up (Optional)
TLDR – Too Long, Didn’t Read
- Create a Google Cloud Platform account.
- Enable needed APIs (Maps, Geocoding, Places, YouTube).
- Generate an API key (a digital access key).
- For security, restrict key usage to your website URLs.
- Send key to C&C admin to add to your website’s code.
- Remember to monitor your usage to avoid any unwanted billing.
Overview
As part of the setup, you’ll need to provide billing information. Billing must be enabled for the Google Maps APIs to work, even if you only use the free monthly usage allowance. Google Maps APIs (such as Maps JavaScript, Places, or Directions) include a free monthly usage allowance per API.
For most standard websites, this free allowance is sufficient and you will not be charged unless your usage exceeds Google’s free limits. Free usage limits are applied per API, not shared across all services, so usage of multiple APIs should be monitored individually in the Google Cloud Console.
Club & County use their own Google API key during development, but with the number of Counties/Provinces that we host, there’s a higher chance of us reaching these free limits sooner. This is why, to avoid any issues, it’s recommended that each County/Province creates their own API key once their site is live.
Please note: You should monitor your API usage, as usage beyond Google’s free monthly limits is charged on a pay-as-you-go basis.
Step 1: Create a Google Cloud Platform Account
- Go to the Google Cloud Platform website: https://console.cloud.google.com/.
- Click on the “Get Started” button.
- Follow the prompts to create your account.
Step 2: Set Up a New Project
- On the Google Cloud Platform Console, click the project drop-down menu at the top and select “New Project.”
- Enter a name for your project, and optionally, you can also choose an organization and location for the project.
- Click the “Create” button.
Step 3: Enable APIs
- In the Cloud Platform Console, navigate to the “APIs & Services” > “Library” section.
- Search for the APIs you need to enable:
- Maps JavaScript API
- Geocoding API
- Places API
- YouTube Data API v3
- Click on each API and then click the “Enable” button.
Step 4: Create API Key
- In the Cloud Platform Console, navigate to “APIs & Services” > “Credentials.”
- Click the “Create Credentials” button and select “API Key.”
- A new API key will be created. You can now restrict its usage to ensure security and manage usage limits.
Step 5: Restrict API Key (Optional but Recommended)
- While still on the “APIs & Services” > “Credentials” page, click on your API key.
- Under “Key restriction,” click “API restrictions.”
- Choose “HTTP referrers” from the dropdown menu.
- Add the following URLs to allow the API key to work (make sure to change websiteurl.com to your own URL):
- Click “Save” to apply the restrictions.
Step 5: Monitoring your usage
You can monitor your Google Maps API usage at any time by going to:
Google Cloud Console → APIs & Services → Metrics
This allows you to see how many requests your site is making and helps ensure you stay within the free usage limits.
Step 6: Set a Billing Cap (Optional but Recommended)
To avoid unexpected charges, you can set a spending limit and alerts on your Google Cloud billing account.
- Go to Google Cloud Console → Billing
- Select your Billing Account
- Click Budgets & alerts
- Click Create budget
- Set a monthly budget amount (for example €5 or €10)
- Add alert thresholds (for example at 50%, 90%, and 100%)
You’ll receive email notifications if your usage approaches or exceeds your chosen budget.
Please note: Google does not automatically stop API usage when a budget is reached. If the budget is exceeded, usage continues and charges may still apply.
To fully prevent unexpected costs, you can also:
- Set API quotas under APIs & Services → Quotas, or
- Disable the API temporarily if usage spikes unexpectedly.
C&C Set up (Optional)
If you’d prefer Club & County to set up the API key and restrictions for you, please send kristina@clubandcounty.com the login details to your Google Cloud Platform account once you’ve created your account + set up billing. We can then follow the steps outlined above to create the API key and set up restrictions on your behalf.