How to Query the Google Search Console API

Posted by briangormanh

If you’ve been an SEO for even a short time, you’re likely familiar with Google Search Console( GSC ). It’s a valuable tool for get informed about your website and the effectiveness and efficiency in organic research. That said, it does have its shortcomings.

In this article, you’ll learn how to get better-connected data out of Google Search Console as well as increase the size of your exports by 400%.

Google Search Console limitations

While GSC has a number of parts, we’ll be focusing on the “Performance” report. From the GSC dashboard, there are two ways you can access this report 😛 TAGEND

Once within the “Performance” report, data for queries and sheets can be accessed 😛 TAGEND

This divulges one of the issues with GSC: Query and sheet data is separated.

In other statements, if I want to see the inquiries a specific page is ranking for, I “re going to have to” first click “Pages, ” select the sheet, and then click “back” to “Queries.” It’s a very cumbersome experience.

The other( two-part) concern is with exporting 😛 TAGEND Accomplishment data for queries and pages is required to be exported separately.Exports are limited to 1,000 rows.

We’ll look to solve these issues by exercising the GSC API.

What is the Google Search Console API?

Now we know the GSC user interface does have disadvantages: Connecting query data with sheet data is slippery, and exports are limited.

If the GSC UI represents the factory default, the GSC API represents our usage deep-seateds. It takes a bit more effort, but demonstrates us more controller and opens up more prospects( at least in the realm of query and sheet data ).

The GSC API is a way for us to connect to the data within our history, spawn more customized petitions, and get more customized output. We can even bypass those mill default settings like exportations restricted to 1,000 rows, for instance.

Why expend it?

Remember how I said previously that query and page data is separated in the “vanilla” GSC UI? Well, with the API, we can connect query data with the page that query ranks for, so no more clicking back and forth and just wait things to load.

Additionally, we investigated that exports are limited to 1,000 rows. With the API, we can request up to 5,000 rows, an increase of 400%!

So let’s hook in, spawn our asking, and get back a stronger and more meaningful data set.


Log in to the appropriate GSC account on this sheet( upper right corner ). For speciman, if my website is and I can view that Search Console report under admin @email. com, that’s the report I’ll sign into.

Enter the URL of the relevant GSC account 😛 TAGEND

Set up your asking 😛 TAGEND List startDate. This should be formatted as: YYYY-MM-DD.Set endDate.Set dimensions. A dimension can be: querypagedeviceand/ or countrySet filters( optional ). A filter must be integrated into :d imension( a feature is likely to be: inquiry, sheet, invention, or country) operator( an operator can be: contains , notContains, equals , notEquals) idiom( an speech can be any appreciate associated with the dimensions) Set the rowLimit. With the GSC API, you can request up to 5,000!

The page shared in step one makes all of this setup pretty easy, but it can be tedious and even perplexing for some. I’ve done all the fussing for you and have created JSON you can edit quickly and readily to get the API return you’d like.

Unfiltered request

The following seek will be unfiltered. We’ll determined our opted years, features, and a sequence restraint, and then prepare our request.

The order in which you situate your aspects is the require in which they’ll be returned.

The API will return data for desktop, portable, and tablet, separated out. The numbers you see in the GSC user interface — clicks, for instance — are an aggregate of all three( unless you apply device filtering ).

Remember, your magnitudes can also include “country” if you’d like.

“startDate”: “2 019 -1 1-01”,

“endDate”: “2 020 -0 1-31”,







“rowLimit”: 3000

Filtered petition

This version of our request will include filters in order to be more specific about what is returned.

Filters are stated as dimension/ adventurer/ formulation. Now are some examples to show what’s probable 😛 TAGEND inquiry contains rise fish digitalpage equals https :// machine notContains tablet

It looks like you can only apply one filter per feature, just like in the normal GSC user interface, but if you are aware differently, let us know in the comments!

“startDate”: “2 019 -1 1-01”,

“endDate”: “2 020 -0 1-31”,











“dimension”: “device”,

“operator”: “notContains”,

“expression”: “tablet”



“rowLimit”: 3000

Choose a template, unfiltered or filtered, and fill in your custom ethics( anything after a colon should be updated as your own value, unless you like my presets ).

Execute any such requests

So there you have it! Two asking templates for you to choose from and revise to your affection. Now it’s time to obligate any such requests. Click into the “Request body”, select all, and glue in your custom-built JSON 😛 TAGEND

This is where you could manually put together your application keys and qualities, but as I pointed out earlier, this can be tedious and a little confusing, so I’ve done that work for you.

Scroll down and sounds “Execute.” You may be prompted to sign-in here as well.

If everything was participated correctly and the request could be satisfied, the API will return your data. If you get an error, inspection your petition firstly, then any other paces and inputs if necessary.

Click into the box in the lower right( this is the response from the API ), select all, and mimic the information.

Convert from JSON to CSV

Excel or Membrane will be a much better way to work with the data, so let’s convert our JSON output to CSV.

Use a converter like this one and glue in your JSON output. You can now export a CSV. Update your tower headers as desired.

Query your own data

Most SEOs are pretty comfy in Excel, so you can now query your application yield any direction you’d like.

One of the most frequent enterprises played is looking for data associated with a specific begin of pages. This is done by adding a sheet with your sheet determined and using VLOOKUP to indicate a match.

The API yield being in a spreadsheet also allows for the most common activities in Excel like sorting, filtering, and map creation.

Do more out of Google Search Console

GSC presents important data for SEOs, and the GSC API output offers is not simply more of that data, but in a format that is far less cumbersome and more cohesive.

Today, we overcame two deterrents we often face in service standards GSC user interface: the query/ sheet alliance and limited exports. My hope is that utilizing the Google Search Console API will take your evaluations and revelations to the next level.

While my JSON templates will shield the most common situations in terms of what you’ll be interested in requesting, Google does volunteer documentation that embraces a bit more soil if you’re interested.

Do you have another way of using the GSC API? Is there another API you usually use as an SEO? Let me know in the comments!

Sign up for The Moz Top 10, a semimonthly mailer revising you on the top 10 hottest pieces of SEO news, tips, and rad relates uncovered by the Moz team. Think of it as your exclusive grasp of trash you don’t have time to hunt down but want to read!

Read more: