Connecting to the Google Search Console API requires several steps. Here is a step-by-step guide on how to connect to the Google Search Console API:

First, connect your website to Google Console in URL Prefix mode:

Google Console in URL Prefix mode

1. Create a Google Cloud Platform (GCP) project and enable the Search Console API

First, you need to create a Google Cloud Platform (GCP) project and enable the Search Console API. Follow these steps:

  1. Go to the Google Cloud Console and sign in with your Google account.
  2. Click on the project dropdown menu at the top of the page and select "New Project".
  3. Give your project a name and click on the "Create" button.
  4. Once the project is created, select it from the project dropdown menu.
  5. Go to the APIs & Services Dashboard and click on the "Enable APIs and Services" button.
  6. Search for "Search Console API" and click on the result.
  7. Click on the "Enable" button to enable the API.

Create API credentials

Create API credentials

Next, you will need to create API credentials for your project.

Set up OAuth 2.0 authentication

To authenticate your API requests, you will need to set up OAuth 2.0 authentication. Follow these steps:

Save Your Data

  1. Open the dashboard sidebar on the left side of the screen.

  2. Find the input fields labeled "API Key" and "Client ID". These are the fields where you will need to enter your Google Search Console API credentials.

  3. Enter your API key in the "API Key" input field.

  4. Enter your client ID in the "Client ID" input field.

  5. Once you have entered your credentials, click on the "Save" button located at the bottom of the sidebar. This will save your credentials and allow you to connect to the Google Search Console API.

  6. After clicking the "Save" button, you should see a success message indicating that your credentials have been saved.

  7. You can now use the dashboard to access your Google Search Console data and perform various tasks related to your website's search performance.


Note: Please be aware that storing API credentials in local storage can pose a security risk if the device or browser is compromised. It is recommended that you use a secure storage mechanism for production environments.