1

I want to know if anybody have a list of available dimensions to use with the webmaster tools API.

In the official documentation I can't find availables dimensions.

Here is my code :

$webmastersService = new Google_Service_Webmasters($client);
$searchanalytics = $webmastersService->searchanalytics;
$request = new Google_Service_Webmasters_SearchAnalyticsQueryRequest;

$request->setStartDate('2013-01-01');
$request->setEndDate('2015-01-01');
$request->setDimensions(array("[query]"));

$qsearch = $searchanalytics->query("http://www.example.com", $request); 
$rows = $qsearch->getRows();

I want to know what datas is possible to to get from webmaster tools api with changes on this line

$request->setDimensions(array("[query]"));

My idea is to get the maximum type of datas from the google webmasters tools, like query, query details, pages, crawl stats, external links, backlinks, ....

stef-chrif
  • 33
  • 10

1 Answers1

3

Information about search queries you can find in Search Analytics. Supported dimensions are listed below.

Acceptable values are:
"country": Filter against the specified country, as specified by 3-letter country code (ISO 3166-1 alpha-3).
"device": Filter results against the specified device type. Supported values:
DESKTOP
MOBILE
TABLET
"page": Filter against the specified URI string.
"query": Filter against the specified query string.

https://developers.google.com/webmaster-tools/v3/searchanalytics/query

Also you can gen crawl errors:

https://developers.google.com/webmaster-tools/v3/urlcrawlerrorscounts/query https://developers.google.com/webmaster-tools/v3/urlcrawlerrorssamples

Alex
  • 639
  • 1
  • 5
  • 7
  • I have another question please, you've already managed to get the details of a query in webmaster tools. For example for a date like 20/11/2015 we have a list of queries, and if we click on a query we get the details (pages ... in two other tables) ? have you ever done this with the API ? – stef-chrif Nov 25 '15 at 19:46
  • @stef-chrif Yes, you can do this via API. Just play with https://developers.google.com/apis-explorer/#p/webmasters/v3/webmasters.searchanalytics.query . Here is example query: http://prntscr.com/97315x Or may be it is better to create new question, because i can't add code and screenshots to this comment. – Alex Nov 26 '15 at 08:30
  • Yhanks a lot @alex here is the new question [link](http://stackoverflow.com/questions/33939113/dimensions-of-query-webmasters-tools-api) – stef-chrif Nov 26 '15 at 12:47
  • Thanks again and please I have another question on this topic here is the [link](http://stackoverflow.com/questions/34067587/how-to-get-more-than-5000-query-from-webmasters-tools-api) – stef-chrif Dec 03 '15 at 15:11