searchConsoleR demo


Google Search Console

Search Console v3 API docs

Function Quick Guide

Search analytics

Website admin


Error listings

Authentication functions from googleAuthR


Install googleAuthR from CRAN


Install searchConsoleR.


Work flow always starts with authenticating with Google.


Your browser window should open up and go through the Google sign in OAuth2 flow. Verify with a user that has Search Console access to the websites you want to work with.

Check out the documentation of any function for a guide on what else can be done.


If it works, you should see a list of your websites in the Search Console via:

sc_websites <- list_websites()

We'll need sc_websites$siteUrl for the majority of the other functions.

Most people will find the search analytics most useful. All methods from the web interface are available. Here is an example query:

gbr_desktop_queries <- 
                     "2015-07-01", "2015-08-01", 
                     c("query", "page"), 
                     dimensionFilterExp = c("device==DESKTOP","country==GBR"), 
                     searchType = "web", searchAppearance = "AMP_BLUE_LINKS",
                     aggregationType = "byPage", rowLimit = 100))


Filter your API results using this format: filter operator expression

Filter can be one of:

Operator can be one of ~~, ==, !~, != where the symbols mean:

Expression for page or query if freeform.

Expression for country must be the three letter country code as per the [the ISO 3166-1 alpha-3] standard. e.g. GBR

Expression for device must be one of:

Expression for searchAppearance must be one of:

You can have multiple AND filters by putting them in a character vector.


OR filters aren't supported yet in the API.

Try the searchConsoleR package in your browser

Any scripts or data that you put into this service are public.

searchConsoleR documentation built on Sept. 6, 2019, 5:02 p.m.