Search API Connector Documentation
Import Google Search Console Data to Sheets
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.
- Before You Begin
- Part 1: Connect to the Google Search Console API
- Part 2: Fetch Data from Google Search Console
- Part 3: Create a Custom API Request
- Part 4: Handle Pagination
- Part 5: API Documentation
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
The easiest way to get started with the Google Search Console API is through API Connector’s built-in integration.
- Select Google Search Console from the drop-down list of applications
- Under Authorization, click Connect to Google Search Console
- You will be directed to google.com and asked to allow API Connector to view your Google Search Console data. Click Allow.
- You’ll then be returned to your Google Sheet, and can verify that your Google Search Console connection is active.
Part 2: Fetch Data from Google Search Console
Now that we’re connected, let’s pull some data into Sheets.
- Under Endpoint, choose the”Get search analytics” endpoint.
- Under siteUrl, fill in your site domain using the syntax
https%3A%2F%2Fmixedanalytics.com. Make sure to encode it or the API won’t recognize it. If you’re using a domain property, enter it like
sc-domain:mixedanalytics.com. If you aren’t sure of your exact URL, run a request to the
/sitesendpoint first, as that endpoint will return the correct URL.
- Now fill in a date range (required), and any optional parameters. Here I’ve selected
queryto retrieve a list of keywords for my site.
- Set a destination sheet, name your request, and hit Run.
Part 3: Create a Custom API Request
Alternatively, you can run a custom request instead of using API Connector’s built-in integration, using any of the data points shown in Google Search Console’s API documentation. Here is an example setup:
- Request method:
- Request URL:
Google Search Console
- Headers: Key =
Content-Type, Value =
- Request body:
Part 4: Handle Pagination
By default, Google Search Console will send 1,000 records unless you use the rowLimit and startRow parameters as described in their documentation.
In API Connector you can loop through these pages automatically with the following settings:
- Pagination type: offset-limit body
- Offset body parameter: startRow
- Limit body parameter: rowLimit
- Limit value: 25000
- Run until: choose when to stop fetching data
Part 5: API Documentation
Official API documentation: https://developers.google.com/webmaster-tools/v1/api_reference_index