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.
Table of Contents
Firstly you will need to correctly register for a Google Cloud Platform account, you’ll likely be able to use your existing Google account.
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.
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:
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 Test:
When adding resources and API’s its vital that you double check to make sure that you’ve selected the correct GCP 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.
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.
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:
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!