Search API Connector Documentation

Print

Import Google Search Console Data to Sheets

premium

In this guide, we’ll walk through how to pull Google Search Console data data directly into Google Sheets, using the API Connector add-on for Sheets.

Contents

Before You Begin

Click here to install the API Connector add-on from the Google Marketplace.

Part 1: Connect to the Google Search Console API

If you haven’t connected API Connector to Google Search Console before, you’ll first need to initiate the connection as follows:

  1. Open up Google Sheets and click Add-ons > API Connector > Manage Connections.
  2. In the list of available connections, find “Google Search Console” and click Connect.
    google-search-console-img1
  3. You will be directed to google.com and asked to allow API Connector to view your Google Analytics data.
    google-search-console-img2
  4. You’ll then be returned to your Google Sheet, and can verify that your Google Search Console connection is active in the Connections screen.

Part 2: Create a Google Search Console API Request

For our first request, we’ll pull in summary search performance statistics for your website. Search analytics data from the Google Search Console API is accessed by sending POST requests to this API Request URL:

https://searchconsole.googleapis.com/webmasters/v3/sites/https%3A%2F%2Fmixedanalytics.com/searchAnalytics/query

Where it says https%3A%2F%2Fmixedanalytics.com, substitute in your own URL. Make sure to encode it or the API won’t recognize it.

Breakdown dimensions and dates are specified in the POST body, like this:

{
  "dimensions": [
    "QUERY"
  ],
  "startDate": "2021-06-01",
  "endDate": "2021-06-15"
}

The “QUERY” dimension will return a list of search queries.

Part 3: Pull Google Search Console API Data into Sheets

We can now grab that data into Sheets.

  1. In API Connector, click Create, choose POST from the dropdown menu, and paste in the Request URL we created above.
    google-search-console-img3
  2. Choose ‘Google Search Console’ from the authentication dropdown.
  3. Under headers, enter Key = content-type, Value = application/json.
    google-search-console-img4b
  4. In the POST Body section, paste in the POST body we created above.
    google-search-console-img4
  5. Create a new tab and click ‘Set current’ to use that tab as your data destination.
  6. Name your request and click Run. A moment later you’ll see search analytics stats for each of your keywords populate your sheet.
    google-search-console-img6

Part 4: Other Google Search Console API Data

View the full list of available search analytics parameters here. One easy way to get started is to use their API Explorer tool, which provides an interface to build your request:
google-search-console-img20

Once you’ve created your request, you can copy and paste it into API Connector to get the response data in Sheets.

Previous Import Google PageSpeed Insights Data to Google Sheets
Next Import Harvest Data to Google Sheets

2 thoughts on “Import Google Search Console Data to Sheets”

    • I just tested and it worked on my domain property. However the permissions seem to be different, I got an error unless I connected through the same email account that performed the DNS TXT record verification. With the regular properties, I could use any account with access to Google Search Console. What kind of error are you getting?

      Reply

Leave a Comment

Table of Contents