How to Query the Google Search Console API

In the event that you’ve been a SEO for even a brief timeframe, you’re likely acquainted with Google Search Console (GSC). It’s an important instrument for getting data about your site and its exhibition in natural search. All things considered, it has its restrictions.

In this article, you’ll figure out how to show signs of improvement associated data out of Google Search Console just as increment the size of your fares by 400%.

Google Search Console impediments

While GSC has various areas, we’ll be concentrating on the “Execution” report. From the GSC dashboard, there are two different ways you can get to this report:

Google Search Console

Once inside the “Execution” report, data for inquiries and pages can be gotten to:

Google Search Console

This uncovers one of the issues with GSC: Query and page data is isolated.

At the end of the day, in the event that I need to see the inquiries a particular page is positioning for, I need to initially click “Pages,” select the page, and afterward click “back” to “Questions.” It’s an extremely awkward encounter.

The other (two-section) issue is with trading:

  • Execution data for questions and pages must be traded independently.
  • Fares are constrained to 1,000 lines.

We’ll hope to settle these issues by using the GSC API.

What is the Google Search Console API?

Presently we know the GSC UI has impediments: Connecting query data with page data is precarious, and sends out are restricted.

On the off chance that the GSC UI speaks to the industrial facility default, the GSC API speaks to our custom settings. It requires more exertion, yet gives us more control and opens up more prospects (at any rate in the domain of query and page data).

The GSC API is a path for us to associate with the data inside our record, make more altered requests, and get more redid yield. We can even sidestep those manufacturing plant default settings like fares restricted to 1,000 lines, for example.

Why use it?

Recollect how I said before that query and page data is isolated in the “vanilla” GSC UI? Indeed, with the API, we can associate query data with the page that query positions for, so no more clicking to and fro and trusting that things will stack.

Furthermore, we saw that fares are restricted to 1,000 lines. With the API, we can request up to 5,000 lines, an expansion of 400%!

So how about we snare in, make our request, and get back a more vigorous and important data set.

Setup

Sign in to the proper GSC account on this page (upper right corner). For example, if my site is example.com and I can see that Search Console account under [email protected], that is the record I’ll sign into.

Enter the URL of the proper GSC account:

Google Search Console

Set up your request:

  1. Set startDate. This ought to be arranged as: YYYY-MM-DD.
  2. Set endDate.
  3. Set measurements. A measurement can be:
    • query
    • page
    • gadget
    • or potentially nation
  4. Set channels (discretionary). A channel must include:
    • measurement (a measurement can be: query, page, gadget, or nation)
    • administrator (an administrator can be: contains, notContains, rises to, notEquals)
    • articulation (an articulation can be any worth related with the measurements)
  5. Set the rowLimit. With the GSC API, you can request up to 5,000!

The page partook in sync one makes the entirety of this setup quite simple, yet it tends to be repetitive and in any event, mistaking for a few. I’ve done all the objecting for you and have made JSON you can alter rapidly and effectively to get the API return you’d like.

Unfiltered request

The accompanying request will be unfiltered. We’ll set our favored dates, measurements, and a column breaking point, and afterward make our request.

The request where you put in your measurements is the request wherein they’ll be returned.

The API will return data for work area, portable, and tablet, isolated out. The numbers you find in the GSC UI — clicks, for example — are a total of each of the three (except if you apply gadget sifting).

Keep in mind, your measurements can likewise incorporate “nation” in the event that you’d like.

{

“startDate”: “2019-11-01”,

“endDate”: “2020-01-31”,

“measurements”:

[

“query”,

“page”,

“gadget”

],

“rowLimit”: 3000

}

Separated request

This form of our request will remember channels for request to be more explicit about what is returned.

Channels are expressed as measurement/administrator/articulation. Here are a few guides to show what’s conceivable:

query contains go fish advanced

page rises to https://gofishdigital.com/

gadget notContains tablet

It would seem that you can just apply one channel for every measurement, much the same as in the ordinary GSC UI, yet on the off chance that you know in an unexpected way, let us know in the remarks!

{

“startDate”: “2019-11-01”,

“endDate”: “2020-01-31”,

“measurements”:

[

“query”,

“page”,

“gadget”

],

“dimensionFilterGroups”:

[

{

“channels”:

[

{

“measurement”: “gadget”,

“administrator”: “notContains”,

“articulation”: “tablet”

}

]

}

],

“rowLimit”: 3000

}

Pick a format, unfiltered or separated, and fill in your custom qualities (anything after a colon ought to be refreshed as your own worth, except if you like my presets).

Execute the request

So there you have it! Two request layouts for you to look over and alter just as you would prefer. Presently it’s an ideal opportunity to make the request. Snap into the “Request body”, select all, and glue in your custom JSON:

Google Search Console

This is the place you could physically set up your request keys and qualities, yet as I expressed before, this can be monotonous and a bit of confounding, so I’ve accomplished that work for you.

Look down and click “Execute.” You might be incited to sign-in here too.

On the off chance that everything was entered effectively and the request could be fulfilled, the API will restore your data. On the off chance that you get a blunder, review your request first, at that point some other advances and information sources if essential.

Snap into the case in the lower right (this is the reaction from the API), select all, and duplicate the data.

Google Search Console

Convert from JSON to CSV

Exceed expectations or Sheets will be a greatly improved approach to work with the data, so how about we convert our JSON yield to CSV.

Utilize a converter like this one and glue in your JSON yield. You would now be able to trade a CSV. Update your segment headers as wanted.

Query your own data

Most SEOs are entirely agreeable in Excel, so you would now be able to query your request yield any way you’d like.

One of the most widely recognized undertakings performed is searching for data related with a particular set of pages. This is finished by including a sheet with your page set and utilizing VLOOKUP to show a match.

The API yield being in a spreadsheet likewise takes into consideration the most widely recognized activities in Excel like arranging, separating, and graph creation.

Get more out of Google Search Console

GSC offers significant data for SEOs, and the GSC API yield offers more of that data, yet in a configuration that is far not so much unwieldy but rather more firm.

Today, we conquered two obstructions we frequently face in the standard GSC UI: the query/page association and constrained fares. My expectation is that using the Google Search Console API will take your examinations and experiences to the following level.

While my JSON layouts will cover the most widely recognized situations as far as what you’ll be keen on requesting, Google offers documentation that makes more progress in case you’re intrigued.

Do you have another method of utilizing the GSC API? Is there another API you generally use as a SEO? Tell me in the remarks!