the new api webmasters tools is not mentioned how to get the details of queries in php.
Here is my code to get the queries, but I dont know how to get for each query the details :
<?php
require_once ('google-api-php-client-2.2.2/vendor/autoload.php');
$client->setAccessToken("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
$webmastersService = new Google_Service_Webmasters($client);
$searchanalytics = $webmastersService->searchanalytics;
// Build query
$request = new Google_Service_Webmasters_SearchAnalyticsQueryRequest;
$request->setStartDate('startdate');
$request->setEndDate('enddate');
$request->setDimensions("query");
$request->setSearchType("web");
$request->setRowLimit(10);
$qsearch = $searchanalytics->query("siteurl", $request);
$rows = $qsearch->getRows();
var_dump($rows);
?>
But our code was not working.
what is the issue in our code?
Appreciate any help and ideas. Thanks!