How To Easily Setup A Google Cloud Project With APIs

James Phoenix
James Phoenix

Learning Outcomes

  • To learn the appropriate steps for setting up a Google Cloud Platform project.
  • To learn how to activate specific APIs which can then be accessed via a Service Account.
  • To learn the importance of hiding your .json service account keys from the internet.

This will be a short guide on how you can get started as quickly as possible using Google Cloud Platform with some of Google’s APIs.



Step 1 – Setup A Google Cloud Platform Account

Firstly you will need to correctly register for a Google Cloud Platform account, you’ll likely be able to use your existing Google account.

Unleash Your Potential with AI-Powered Prompt Engineering!

Dive into our comprehensive Udemy course and learn to craft compelling, AI-optimized prompts. Boost your skills and open up new possibilities with ChatGPT and Prompt Engineering.

Embark on Your AI Journey Now!

Step 2 – Activate Billing

After successfully registering for a trial account you will be entitled to ~$300 free credits that you can spend within the Google Cloud Platform (GCP). However I’d recommend taking the time now to setup billing by adding a valid credit / debit card.

You can create a Billing Account here and its worthing remembering that one billing account can be used across multiple GCP projects.


Step 3 – Create A Google Cloud Platform Project

Similarly to Google Ads campaigns, there is a hierarchy to how your Google Cloud Account is structured:

Therefore whenever you create a new project, you will need to perform the following:

  • Link your active billing account to the project.
  • Activate the relevant resources (BigQuery, App Engine, Cloud Storage) etc.
  • Turn on the relevant APIs (Google Search Console, Google Analytics) etc.

Step 4 – Create A New GCP Project

You can create a new google cloud project here or alternatively navigate to it within the UI, then click Create Project in the top right corner.


For this tutorial we’ll be creating a new project called Google Sheets API:


Step 5 – Select The Newly Created Google Cloud Project

When adding resources and API’s its vital that you double check to make sure that you’ve selected the correct GCP project.


Step 6 – Turn On The Relevant Resources And API’s For Your Project

As we’ll be using Google Sheets within the next lesson, let’s navigate to the API section and turn on that specific API for this new project.



Step 7 – Authentication With A Service Account

Now that we’ve got the google sheets API turned on, let’s create a service account so that you can programmatically access the resources of your google cloud project.

Create A Service Account

Name Your Service Account

Give Your Service Account Ownership + Programmatic Access

In the example below, I have given my service account admin level access to Google Cloud Functions:

Create a JSON Key

Creating a .json key will allow you to easily interact with your Google Cloud Project using Python. So let’s create and download the .json file:

Okay great so you should have just downloaded a .json service_account key!


If you’re following along from the Python For SEO Course, please can you do the following so that the next tutorials will work:

  • Rename your some_name.json key to service_account.json
  • Move the .json key into the root directory of this folder: 5_google_sheets_with_pandas

Protip: You must keep your .json key safe and away from the internet. It gives anyone that accesses complete control over that Google Cloud Project.

If you have forked my Github repository then please create a .gitignore file and remove the service-account.json key from your own repository!

Alternatively, please keep the .json key outside of the repository and reference it throughout the course. (This is only a problem for forked/cloned Github repos and if you are just git pulling but not git pushing then there is nothing to worry about here).


Now that we’ve got a .json key with the google sheets api activated we can now move on to reading and writing data from a live google sheet, see you in the next episode!

TaggedPython For SEO


More Stories

Cover Image for Why I’m Betting on AI Agents as the Future of Work

Why I’m Betting on AI Agents as the Future of Work

I’ve been spending a lot of time with Devin lately, and I’ve got to tell you – we’re thinking about AI agents all wrong. You and I are standing at the edge of a fundamental shift in how we work with AI. These aren’t just tools anymore; they’re becoming more like background workers in our digital lives. Let me share what I’ve…

James Phoenix
James Phoenix
Cover Image for Supercharging Devin + Supabase: Fixing Docker Performance on EC2 with overlay2

Supercharging Devin + Supabase: Fixing Docker Performance on EC2 with overlay2

The Problem While setting up Devin (a coding assistant) with Supabase CLI on an EC2 instance, I encountered significant performance issues. After investigation, I discovered that Docker was using the VFS storage driver, which is known for being significantly slower than other storage drivers like overlay2. The root cause was interesting: the EC2 instance was already using overlayfs for its root filesystem,…

James Phoenix
James Phoenix