SEO

Google Search Console - Queries

Alex Black

Alex Black

Overview

Here we'll show how to use the Google Search Console API to pull a list of all your site's queries to get their clicks, impressions, CTR and position. We'll also show how to get stats for a single query, which you can then use with Cell References to pull stats on just the queries you care about.
To put these examples together I read Google's API reference docs.

Step 1: List your sites

The first step is to get a list of your sites, this is an important first step to make sure you have access to the site(s) that you're interested in, and to make sure you have the correct siteUrl for each, which you'll need in the next step.

List sites [Google Search Console]

Please fill in any necessary fields and click Run.

GET

Preview

View the API data, get a live Google Sheet dashboard

siteUrl
permissionLevel
  
  
  

Get a live Google Sheet

Export your data to a google sheet, with the SyncWith Addon, or download to CSV

Automatically updated

Add data sources

Build reports & dashboards

Step 2: Export your queries

Armed with the siteUrl from step 1, we can now pull stats for all search queries. Paste your siteUrl below, and you can also modify the to/from dates if you want.

Queries [Google Search Console]

Please fill in any necessary fields and click Run.

POST

Preview

View the API data, get a live Google Sheet dashboard

query
clicks
impressions
ctr
position
     
     
     

Get a live Google Sheet

Export your data to a google sheet, with the SyncWith Addon, or download to CSV

Automatically updated

Add data sources

Build reports & dashboards

Step 3: Pull stats for a single query

In Step 2 we pulled stats for all the search queries for your site. But, if you have a list of queries you want to get data for, then you'll need to try this.
Here we'll make the same request as in Step 2, but we'll filter to just one query that we care about.
In the Body JSON section below, replace {insertKeywordHere} with a keyword (query) for your site.

Individual query [Google Search Console]

Please fill in any necessary fields and click Run.

POST

Preview

View the API data, get a live Google Sheet dashboard

query
clicks
impressions
ctr
position
     
     
     

Get a live Google Sheet

Export your data to a google sheet, with the SyncWith Addon, or download to CSV

Automatically updated

Add data sources

Build reports & dashboards

Want Data for Multiple Queries?

Once you get this working, you can then create a list of queries in a Google Sheet, and use our Cell References feature to call the API once for each query in your list, compiling all the results into a single sheet.