Skip to main content

Integrate Google Search Console

Explore Google Search Console Data right inside SerpBear

When you integrate your Google Search Console Account, you will unlock these features:

  • Ability to View the Actual visit counts, impressions, and Average Position beside each tracked data.
  • Ability to Explore already ranking keywords in Google.
  • Ability to View the Stats for the Last 30 days. Easily View the top keywords, countries and pages.
  • Get the Last 7 days' Search Console Data in the notification Email.

To integrate your Google Search Console Account with SerpBear, follow these steps:

Step 1: Create a Google Cloud Project

Create a New Project in Your Google Cloud.

Step 2: Activate the Google Search Console API

Once you have created the project, activate the Google Search Console API by going to your Google Cloud Dashboard > Library.

Then Search for "Google Search Console" and click the "Enable API" button.

Important: Make sure the API status shows as Enabled on the Search Console API page. If you skip this step, SerpBear will return a "Forbidden" error when fetching data, even if your credentials are correct.

Step 3: Create a Service Account Key

  1. Go to Google Service Accounts Dashboard, and then select your Project.
  2. If no service account exists yet, click "+ Create Service Account" at the top. Give it a name (e.g., serpbear), then click Create and Continue. For the Role, select "Viewer" under Basic roles (or skip the role assignment, since access is granted via Google Search Console in Step 4). Click Done. If a service account already exists, proceed to the next step.
  3. Click the three dots beside the service account, and click the "Manage Keys" option.
  4. Once you are on the Manage Keys page, click the Add key button and select JSON.
  5. A JSON file will be downloaded. This file contains the private_key & client_email values needed for the next step.

Note for Google Cloud organizations created after May 2024: Google enforces the iam.disableServiceAccountKeyCreation policy by default on new organizations, which blocks JSON key creation. If you see a "Key creation is not allowed on this service account" error, you need to disable this policy:

  1. Open the Google Cloud Shell.
  2. Run: gcloud org-policies delete iam.disableServiceAccountKeyCreation --organization=YOUR_ORG_ID

You need the Organization Policy Administrator role to run this command. If you are using a personal Google account (not part of an organization), this policy does not apply.

Step 4: Connect your Google Cloud Account with your Google Search Console Properties.

  1. Go to your Google Search Console Dashboard, and select the domain you want to connect with SerpBear.
  2. Go to the Settings page, and click the "Users & Permissions" menu.
  3. From the Users and Permissions page, click the "Add User" button.
  4. In the Add User popup, paste the client_email value from the JSON file downloaded in Step 3. Set the permission level to "Full".

Note: You must perform Step 4 for every domain you want to connect to SerpBear.

Step 5: Connecting Your Google Search Console Property to SerpBear

Choosing the Correct Property Type

Before connecting, you need to know what type of property your domain is in Google Search Console. There are two types:

  • Domain property (e.g., example.com): Covers all subdomains and protocols automatically. Shown in GSC without a protocol prefix.
  • URL-prefix property (e.g., https://example.com/): Covers only the specific URL prefix. Shown in GSC with https:// or http://.

To check your property type, go to Google Search Console and look at the property selector dropdown. Domain properties appear as example.com, while URL-prefix properties appear as https://example.com/.

When connecting through the Domain Settings UI in SerpBear, you must select the matching Property Type:

  • If your GSC property is a Domain property → select "Domain" in SerpBear.
  • If your GSC property is a URL-prefix property → select "URL" in SerpBear and enter the exact URL as it appears in GSC (e.g., https://example.com/).

Common cause of "Forbidden" errors: Selecting "Domain" in SerpBear when your GSC property is actually a URL-prefix type (or vice versa) will result in a Forbidden error. The property type in SerpBear must match what is configured in Google Search Console.


There are a few ways to connect your Google Search Console credentials to SerpBear:

Method 1: Connecting through the App Settings UI.

Open the SerpBear App Settings Panel, click the "Search Console" tab, and insert the private_key & client_email into the relevant fields. These two values will be automatically used globally for all your domains added to SerpBear.

Connecting through the App Settings

Method 2: Connecting through the Domain Settings UI.

You can connect a specific account to a specific domain by inserting the private_key & client_email values through the Domain Settings Modal. Make sure to select the correct Property Type as described above.

Connecting through the Domain Settings

Method 3: Connecting through the environment variable

When you pass the private_key & client_email via environment variables, the values are used for all the domains, assuming the service account has access to all your domains in Google Search Console.

If you are deploying locally, open the .env.local file and add the 2 values like this:

SEARCH_CONSOLE_PRIVATE_KEY=-----BEGIN PRIVATE KEY-----\ssssaswdkihadho\nlnb/Kt88qQC6gO638o062+5peN8/UAE1+SbaQ10Vtrh7j9c5HoFjEE3BQjLv37qu\nxFtQ7JJ2IottyRnssrUf7RlmpjaAV0zc27IrQcI5bZQIBHiM1G5qdMThh3eDjKzI\nGvWP0LIQsoyAzoU29D3gS0/9deR0bpxK7/xtk7ClifKguewMWYNd8jVw9TvoNXRI\nSkK7m0sOTgp6f/xC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EpeXOQbdfvlecVB6EAvXMpn\nUqJAPeKynzbVdG6YeijIkX2qfi6tH/WcEem87OlVk2YvrT3o/HLyCcHBjwj+1raG\nEk155Ail+MLkl+xu04nO/rNw5XS7rdp6R6RUibECgYAuuCMfonurnYqzQGhH35TT\ng+Ruk4WaOH/cYavwBbsCrrBBNjcaziGjayJ1+uZ1kKmgfU7DDCF3hZl7iZXqbdbe\n1GWBOcNgsqAG+wqWP4VVXQmEGh/kgG+w1Ck+fT4AnpN2O9+1t/MzxxWq/6vQRG4r\n9vwn1x8VDHvFrKuPYKYv6A==\n-----END PRIVATE KEY-----\n
SEARCH_CONSOLE_CLIENT_EMAIL=myemail@appspot.gserviceaccount.com

If you are deploying with Docker and passing environment variables directly with the docker run command, you must also pass these 2 variables.

If you use docker-compose, you can insert these 2 values in the environment section.